$$X^2 = \begin{bmatrix}1&a\\0&1\\\end{bmatrix}$$ where $a \in \Bbb R \setminus \{0\}$. Solve for matrix $X$.
I was practicing for matrix equations and this is the first one where it has squared matrix and another number, in this case, $a$. I would be grateful if you could help. If you can please suggest a book that has matrix equations to practice. Thank you!
HINT: Let $X = (I + N)$ where $I$ is the identy matrix and $N$ is the nilpotent matrix with all the diagonal entries and the lower left coner being zero. Take the second power of $X$, $$X^2 = I + N + N + N^2 = I + 2N $$ the answer is trivially obtained from that.