How can I shift elements in a non-square matrix

170 Views Asked by At

Suppose I have the following non-square 4x3 binary matrix:

$A=\begin{bmatrix}0&0&0\\0&0&0\\1&0&0\\1&0&0\end{bmatrix}$

I can shift the non-zero columns of A to the right as follows:

$\begin{bmatrix}0&0&0\\0&0&0\\1&0&0\\1&0&0\end{bmatrix}\begin{bmatrix}0&1&0&0\\0&0&0&0\\0&0&0&0\end{bmatrix}=\begin{bmatrix}0&0&0\\0&0&0\\0&1&0\\0&1&0\end{bmatrix}$

Is there a shift matrix X (or similar object) such that non-zero entries are shifted one column to the right and up one row, producing:

$\begin{bmatrix}0&0&0\\0&0&0\\1&0&0\\1&0&0\end{bmatrix}X=\begin{bmatrix}0&0&0\\0&1&0\\0&1&0\\0&0&0\end{bmatrix}$

1

There are 1 best solutions below

2
On

Pre-multiply $\begin{bmatrix} 0 & 1 & 0 & 0\end{bmatrix} $ on both sides, we can see that the LHS is zero but the RHS is non-zero. Hence no such $X$ exist.

For shifting row up, consider pre-multiplication as well.