<s>[INST] Solve the equation $X^2+X=\text{a given matrix}$ I want to solve the quadratic matrix equation 
$$X^2+X=\begin{pmatrix}1&1\\1&1\end{pmatrix}$$
If I put $X$ in the form 
$$X=\begin{pmatrix}a&b\\c&d\end{pmatrix}$$
then I find complicated equations. Is there a simple way to tackle the problem without using diagonalization?
 [/INST] The spectral mapping theorem gives $$\{\lambda^2 +\lambda : \lambda \in \sigma(X)\} = \sigma(X^2 + X) = \sigma\begin{pmatrix}1&1\\1&1\end{pmatrix} = \{0,2\}$$
It follows that we have one of the four options:


*

*$\sigma(X) = \{0,1\}$ so $\operatorname{Tr} X = 1$.


A calculation with $X = \pmatrix{a & b \\ c & 1-a}$ yields
$$\pmatrix{a+a^2+bc & 2b \\ 2c & a^2-3a+bc+2} = X^2 + X = \begin{pmatrix}1&1\\1&1\end{pmatrix}$$
so the only solution is $a = b = c = \frac12$.


*

*$\sigma(X) = \{0,-2\}$ so $\operatorname{Tr} X = -2$.


A calculation with $X = \pmatrix{a & b \\ c & -2-a}$ yields
$$\pmatrix{a+a^2+bc & -b \\ -c & a^2+3a+bc + 2} = X^2 + X = \begin{pmatrix}1&1\\1&1\end{pmatrix}$$
so the only solution is $a = b = c = -1$.


*

*$\sigma(X) = \{-1,-2\}$ so $\operatorname{Tr} X = -3$.


A calculation with $X = \pmatrix{a & b \\ c & -3-a}$ yields
$$\pmatrix{a+a^2+bc & -2b \\ -2c & a^2+5a + bc + 6} = X^2 + X = \begin{pmatrix}1&1\\1&1\end{pmatrix}$$
so $a = -\frac32$, $b = c = -\frac12$ is the only solution.


*

*$\sigma(X) = \{-1,1\}$ so $\operatorname{Tr} X = 0$.


A calculation with $X = \pmatrix{a & b \\ c & -a}$ yields
$$\pmatrix{a+a^2+bc & b \\ c & a^2-a+bc} = X^2 + X = \begin{pmatrix}1&1\\1&1\end{pmatrix}$$
so $a = 0$, $b = c = 1$ is the only solution.
So the solutions for $X$ are
$$\pmatrix{\frac12 & \frac12 \\ \frac12 & \frac12},\quad \pmatrix{-1 & -1 \\ -1 & -1},\quad \pmatrix{-\frac32 & -\frac12 \\ -\frac12 & -\frac32},\quad \pmatrix{0 & 1 \\ 1 & 0}$$
</s>