Solve the equation $X^2+X=\text{a given matrix}$
Write $J=\pmatrix{1&1\\1&1}$. The equation $X^2+X=J$ implies $XJ=JX$. The matrices satisfying $XJ=JX$ are those of the form $X=aI+bJ$. Then $X^2=a^2I+(2ab+2b^2)J$, so we get $$(a^2+a)I+(b+2ab+2b^2)J=J.$$ Therefore $a^2+a=0$, entailing $a\in\{0,-1\}$ and $b+2ab+2b^2=1$, which gives a quadratic equation for each of the two possible $a$-values.