I am wondering if the elimination theory in computational algebraic geometry can be more efficiently carried out if all variables lies within some given matrices. For instance, consider the following:
Problem: Let $A$ be a $k\times l$ matrix, and $B$ be a $l \times k$ matrix, and $X$ be a $l\times l$ matrix. Suppose $X$ is nilpotent: $X^n = 0$. Find the complete set of constraints for the matrices $Y_j$:
\begin{equation} Y_j = A X^j B, \ \ \ j = 0,1,\dots, n-1 \end{equation}
Naively, one can write down each entry in $Y_j$ as independent variable and perform elimination theory to get constraints. However:
Is it always true that those constraints expressed in terms of components can actually be packaged into matrix equations?
Is there a faster way that one can deal with matrix directly to perform elimination, without having to rely on the naive method described above?