<s>[INST] Which one of the following are correct? 
Let, $A=   \left[ {\begin{array}{cc}    -1 & 2 \\    0 & -1 \\  
 \end{array} } \right]$ , and $B = A + A^2 + A^3 +···+ A^{50}$. Then
$(A) B^2 = I $
$(B) B^2 = 0$ 
$(C) B^2 = A$ 
$(D) B^2 = B$

Eigenvalues of $A$ are $-1,-1$. So, Eigenvalues of $B$ are $0,0$. So, $\det(B)=0$. So, options (A) and (C) can be eliminated. How do I eliminate further?. By Cayley-Hamilton Theorem $A^2+2A+I=0$. I found $A^3,A^4,...$ using Cayley-Hamilton Theorem. It was time-consuming. Given matrix is not diagonalizable. Can you please help me?
 [/INST] The Jordan normal form of $A$ is:
$$A = PJP^{-1}$$
where $J = \begin{bmatrix}-1 & 1 \\ 0 & -1\end{bmatrix}$ and $P = \begin{bmatrix}1 & 0 \\ 0 & \frac12\end{bmatrix}$.
For any entire function $f$ we have
$$f(A) = f(PJP^{-1}) = Pf(J)P^{-1} = P\begin{bmatrix}f(-1) & f'(-1) \\ 0 & f(-1)\end{bmatrix}P^{-1} $$
In particular, since $B = A + A^2 + \cdots + A^{50}$ we have
$$f(z)  = z + z^2 + \cdots + z^{50} = z \cdot \frac{x^{50}-1}{z-1}$$
$$f'(z) = \frac{51z^{50} - 1}{z-1} - \frac{z(x^{50}-1)}{(z-1)^2}$$
hence $f(-1) = 0$ and $f'(-1) = -25$.
$$B = f(A) = P\begin{bmatrix}0 & -25 \\ 0 & 0\end{bmatrix}P^{-1} = \begin{bmatrix}0 & -50 \\ 0 & 0\end{bmatrix}$$
Therefore $B^2 = 0$.
</s>