0 as the unique eigenvalue of a matrix I want to prove the following statement :
Let $B$ be a matrix, such that $B$ has the eigenvalue $0$ and no other eigenvalue. Then $B^2=0$.
In the context of the statement, $B$ is of size $2$. Is this hypothesis necessary for the statement to hold ?
How to prove the statement ?
 A: Let $B=\left[\matrix{ a&b\cr c&d\cr}\right]$
If $B$ has eigenvalue $0$ then it is not invertible, which means that det$B=ad-bc=0$.  
The eigenvalues of a matrix are the roots of its characteristic polynomial
det$(B-\lambda I)=\lambda^2-(a+d)\lambda +(ad-bc)=\lambda(\lambda - (a+d))$
We know that the only eigenvalues are $0$, hence $a=-d$.  Substituting this into the expression for the determinant, we get $bc = -a^2$.  Now you can compute $\left[\matrix{ a&b\cr c&{-a}\cr}\right]^2=0$
A: The characteristic polynomial $f$ of $B$ has degree 2 and since 0 is an eigenvalue of B it has 0 as a root, so $f$ splits into linear factors: $f(X) = X(X-a)$ for some $a$. Since 0 is the only eigenvalue we must have $a=0$, hence $f(X) = X^2$. By the Cayley-Hamilton theorem, $0 = f(B) = B^2$.
A: Yes the size condition on $B$ is necessary: take $B=\left[\matrix{ 0&1&1\cr 0&0&1\cr0&0&0}\right]$.


For $B$ a $(2\times 2)$ matrix, write down what the equation $\text{det}(B-\lambda I)=\lambda^2$ gives you. You'll deduce that both the trace and the determinant of $B$ are  0.
So $B$ has the form $\left[ \matrix{a&b\cr c& -a}\right]$ where $a^2+bc=0$. Then 
$B^2= \left[ \matrix{a^2+bc&ab+b(-a )\cr ca+ (-a)c& cb+(-a)^2}\right]
= \left[ \matrix{0&0\cr0& 0}\right]. 
$
