A question about matrix whose rank is smaller than $n.$

Suppose det$(A)=0,$ then is there always a non-zero matrix $B$ satisfying $AB=BA=0?$(where $0$ means a matrix whose elements are all $0$)

It's easy to prove there is a matrix $B$ s.t. $AB=0$ and a matrix $C$ s.t. $CA=0,$ but can $B$ and $C$ be the same?


There is always such a matrix $B$. The matrix $A$ has a right eigenvector, call it $v$, with zero eigenvalue: $Av=0$. And it has a left eigenvector, $w$ with zero eigenvalue: $w^T A=0$.

Take the outer product of them. $$B = vw^T$$

This can be generalized if $A$ has rank $n-k$ then $$B=\sum_j^k v_j w_j^T$$ where $v_j$ are all the right eigenvectors with ev 0 and $w_j$ are the associated left eigenvectors.


Yes, there is always such a matrix. Suppose the matrices act on a vector space $V$. Then $AB=0$ iff $\operatorname{im} B\subseteq\ker A$, and $BA=0$ iff $\operatorname{im} A\subseteq\ker B$. So we need a matrix $B$ whose kernel contains the image of $A$, and whose image is in the kernel of $A$.

Now to actually find such a matrix it's easier to talk in terms of linear maps. Let $f_A$ and $f_B$ denote the linear maps corresponding to $A$ and $B$. Take a base of $V$. Now make $f_B$ send all of the basis vectors which are in the image of $f_A$ to $0$. Then $\operatorname{im} f_A\subseteq\ker f_B$. And send all the remaining basis vectors to some element of $\ker f_A$. Then $\operatorname{im}f_B\subseteq\ker f_A$. We get a linear map $f_B$ whose matrix representation fulfills the condition $AB=BA=0$.

As a side note, $B\neq0$ because $\operatorname{im} A\subsetneq V$ due to $\det A=0$.