Prove if $B^2=I+BA$ and $A^2=AB$ then $A=0$ I need to prove that if $B^2=I+BA$ and $A^2=AB$ then $A=0$, $A$ and $B$ are square matrices. I'm not sure if my answer is correct but I thought of this:
$$
A^2-B^2=A^2+AB-BA-B^2=A^2+A^2-(B^2-I)-B^2=2(A^2-B^2)+I 
$$
$$
\Rightarrow B^2-A^2=I=(B-A)(B+A)
$$
This means that $(B-A)$ is invertible. It is also given that $I=B^2-AB$ then:
$$
B^2-AB=B^2-A^2
$$
$$
\Leftrightarrow B(B-A)=(B+A)(B-A)
$$
Because we proved that $(B-A)$ is invertible then we can simplify and get $B=B+A \Rightarrow A=0$

$B^2 = I +BA\implies B(B - A) = I$, so $B-A$ is invertible; hence $A-B$ is invertible. Now:
$A^2 = AB \implies A(A-B) = 0 \implies A(A-B)(A-B)^{-1} = 0 \implies A = 0$.
