<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] Let us begin by finding the remainder when the polynomial $x + \cdots + x^{50}$ is divided by $(x+1)^2$.  So, suppose
$$x + \cdots + x^{50} = (x+1)^2 q(x) + (ax + b).$$
Then by substituting $x := -1$, we see that $-a + b = 0$.  Now, if we take the derivative on both sides of the above equation, we see
$$1 + 2x + \cdots + 50 x^{49} = 2 (x+1) q(x) + (x+1)^2 q'(x) + a.$$
Substituting $x := -1$ in this equation gives $a = 1 - 2 + \cdots - 50 = -25$.  Thus, $a = b = -25$.
Now, if we substitute $A$ for $x$ in the original equation, we conclude
$$B = A + \cdots + A^{50} = (A+I)^2 q(A) - 25 (A + I) = \begin{bmatrix} 0 & -50 \\ 0 & 0 \end{bmatrix}.$$
Here, we use that $(A + I)^2 = 0$ to eliminate the $(A + I)^2 q(A)$ term.  From here, it should be easy to answer the original question.

(Or, if you want a briefer way to eliminate the possibility that $B = 0$: essentially, what we are doing here is showing that $x + \cdots + x^{50}$ is not divisible by $(x+1)^2$ by showing that the polynomial's derivative at $x := -1$ is not zero.  Therefore, since $(\lambda+1)^2$ is the minimal polynomial of $A$, it follows that applying this polynomial to $A$ gives a nonzero matrix.  On the other hand, since the polynomial is divisible by $x+1$, its square is divisible by $(x+1)^2$, which implies that $B^2 = 0$.)
</s>