<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] Using Jordan canonical form, $X$ must be similar to one of the three matrices
\begin{align}
\begin{pmatrix}
\lambda_1 & 0 \\
0 & \lambda_2
\end{pmatrix},
\begin{pmatrix}
\lambda & 0 \\
0 & \lambda
\end{pmatrix},
\begin{pmatrix}
\lambda & 1 \\
0 & \lambda
\end{pmatrix}
\end{align}
, where $\lambda_1 \neq \lambda_2$, which implies that $X^2 + X$ must be similar to 
\begin{align}
\begin{pmatrix}
\lambda_1^2 + \lambda_1 & 0 \\
0 & \lambda_2^2 + \lambda_2
\end{pmatrix},
\begin{pmatrix}
\lambda^2 + \lambda & 0 \\
0 & \lambda^2 + \lambda
\end{pmatrix},
\begin{pmatrix}
\lambda^2 + \lambda & 2\lambda + 1 \\
0 & \lambda^2 + \lambda
\end{pmatrix}
\end{align}
, respectively. Since the latter two matrices have only a single eigenvalue $\lambda^2 + \lambda$, it is impossible for them to be similar to $J \equiv \begin{pmatrix} 1 & 1 \\ 1 & 1 \end{pmatrix}$, which has two distinct eigenvalues. Therefore, $X$ must take the form 
$$X = P^{-1}\begin{pmatrix}
\lambda_1 & 0 \\
0 & \lambda_2
\end{pmatrix}P, \tag{1}$$
where $P := \begin{pmatrix} a & b \\ c & d \end{pmatrix}$ is invertible. In terms of $(1)$, the equation $X^2 + X = J$ is expressed as 
$$P^{-1}\begin{pmatrix}
\lambda_1^2 + \lambda_1 & 0 \\
0 & \lambda_2^2 + \lambda_2
\end{pmatrix}P = J. \tag{2}$$
Because $J$ has two distinct eigenvalues $0$ and $2$, without of loss of generality, we can set 
$$\begin{cases} 
\lambda_1^2 + \lambda_1 = 0 \\
\lambda_2^2 + \lambda_2 = 2,
\end{cases} \tag{3}$$
under which $(2)$ is equivalent to 
$$\begin{pmatrix}
0 & 0 \\
0 & 2
\end{pmatrix}
\begin{pmatrix} a & b \\ c & d \end{pmatrix} = 
\begin{pmatrix} a & b \\ c & d \end{pmatrix}\begin{pmatrix} 1 & 1 \\ 1 & 1 \end{pmatrix}, $$
or
$$\begin{pmatrix}
0 & 0 \\
2c & 2d
\end{pmatrix} = 
\begin{pmatrix}
a + b & a + b \\
c + d & c + d
\end{pmatrix}, $$
which requires $a = -b$ and $c = d$ (hence $a \neq 0, c \neq 0$). Therefore, 
$$P = \begin{pmatrix}
a & -a \\
c & c 
\end{pmatrix}, \quad
P^{-1} = \frac{1}{2ac}\begin{pmatrix}
c & a \\
-c & a
\end{pmatrix}. \tag{4}$$
Substituting $(4)$ into $(1)$ gives
$$X = \frac{1}{2}\begin{pmatrix}
\lambda_1 + \lambda_2 & \lambda_2 - \lambda_1 \\
\lambda_2 - \lambda_1 & \lambda_1 + \lambda_2
\end{pmatrix}. \tag{5}$$
While $(3)$ admits the following four combinations of $(\lambda_1, \lambda_2)$:
$$(0, -2), (0, 1), (-1, -2), (-1, 1),$$
$(5)$ entails the following four solutions of $X$:
\begin{align}
\begin{pmatrix}
-1 & -1 \\
-1 & -1
\end{pmatrix},
\begin{pmatrix}
1/2 & 1/2 \\
1/2 & 1/2
\end{pmatrix},
\begin{pmatrix}
-3/2 & -1/2 \\
-1/2 & -3/2
\end{pmatrix},
\begin{pmatrix}
0 & 1 \\
1 & 0
\end{pmatrix}.
\end{align}
</s>