<s>[INST] Kernel and image of a product of two rectangular matrices I cannot find any concise and effective answer to the following problem :
Problem : given two matrices $A$ and $B$ of size $3\times 2$ and $2\times 3$ such that $AB = \left(\begin{matrix} 0 & 1 & 1 \\ 1 & 0 & 1\\ 1  & 1 & 2 \end{matrix}\right)$ find the kernel and the image of $AB$ and $BA$. 
What I have found so far : Ker$(AB)=$ Vect$\left(\begin{pmatrix} 1 \\ 1 \\ -1 \end{pmatrix} \right)$ and Im$(AB) = $ Vect$\left(\begin{pmatrix} 1 \\ 0 \\ 1 \end{pmatrix} , \begin{pmatrix} 0 \\ 1 \\ 1 \end{pmatrix} \right)$. Furthermore $AB \in S_3(\mathbb{R})$ so AB is diagonalizable, and I have $\chi_{AB}=X(X+1)(X-3)$ so :
$\mathrm{Sp}(AB) = \{-1,0,3 \}$ and $E_{-1}(AB) = \mathrm{Vect}\left( \begin{pmatrix} 1 \\ -1 \\ 0 \end{pmatrix} \right) \quad E_{0}(AB) = \mathrm{Vect}\left( \begin{pmatrix} 1 \\ 1 \\ -1 \end{pmatrix} \right) \quad E_{3}(AB) = \mathrm{Vect}\left( \begin{pmatrix} 1 \\ 1 \\ 2 \end{pmatrix} \right) $ 
Then I had the idea of saying if $X$ is an eigenvector of $AB$ then there exists $\lambda \in \{-1,0,3\}$ such as $ABX = \lambda X$ so $BABX = \lambda BX$ and thus $BX$ is either null or an eigenvector of $BA$ for the eigenvalue $\lambda$. Furthermore $BA$ is a square matrix of size 2 so $BA$ cannot have $3$ distinct eigenvalues, it has at most $2$ eigenvalues that can be found within $\{-1,0,3\}$.
I have stopped here. I don't expect any complete answer, just any idea will be welcomed.
 [/INST] Notice that rank($AB$) $=2$
This implies $A$ and $B$ are full rank, i.e. $B$ is surjective and $A$ is injective. 
Since $A$ is injective, Ker $(AB) = $ Ker $B$
Since $B$ is surjective, Im $(AB) = $ Im $A$
Since   $\left(\begin{pmatrix} 1 \\ 0 \\ 1 \end{pmatrix} , \begin{pmatrix} 0 \\ 1 \\ 1 \end{pmatrix}, \begin{pmatrix} 1 \\ 1 \\ -1 \end{pmatrix} \right)$ are linearly independent, we see that 
Ker $B$ $\cap$ Im $A =$ Ker $AB$ $\cap$ Im $AB = 0$
Thus, 
Ker $BA = $ Ker $A = 0$ so that $BA$ is invertible since it is square
</s>