Let $A$ and $B$ be matrices such that:
$$A\neq 0$$ $$B \neq 0$$ $$A^2=0$$ $$B^2=0$$ $$AB=A$$ $$BA=B$$
Is there a solution to this set of equations? I tried looking for a solution in $2\times 2$ matrices but couldn't find one. Is there a way to prove no such solution exists for $n \times n$ matrices?
(Or if it makes a difference the last two can be replaced with $AB=B$ and $BA=A$ .)
I like the version with $A B = B$ better. This means in particular that if $v \in \operatorname{im} B$ then $A v = v$. In turn this means that either $\operatorname{im} B = 0$ or no power of $A$ can ever be zero (including $A^2$). But your other hypotheses prohibit both of these things.
(The version with $A B = A$, etc. is converted to this version by taking the transpose.)