Prove or find a counter example to the statement: for any $A,B$ the equation $X^2+AX+B=0$ has at most two solutions for $X$ In this question $A$ and $B$ are non-zero $2\times 2$ real matrices. Prove, or find a counter example to the statement: For any $A$ and $B$ there is at most two matrices $X$ such that $X^2+AX+B=0$.

I have the impression that it should be false and so I've been searching for counter examples by letting $A$ and $B$ be particularly simple matrices (like all entries zero except one) but every thing I've tried so far has made $X$ have only one solution. If it were true I'm not sure you'd go about proving it in a relatively simple way. Any hints would be great! 
 A: This is false. Consider $A=2I_n$ and $B=I_n$. We then have
$$X^2+2X+I_n =0 \implies (X+I_n)^2 = 0$$
which clearly has infinite solutions.
A: Let $A \colon= I_2$, the $2 \times 2$ identity matrix, and let $B \colon= -I_2$. 
Then you'll see that the equation $X^2 + AX + B = 0$ will have more than two solutions $X$. 
Check it out for yourself. 
A: If you stick to polynomials with scalar (i.e., multiples of the identity) coefficients, and $K$ is an infinite field then every polynomial equation over $K$ of degree $n>1$ has infinitely many solutions in $M_n(K)$. The reason is essentially the Cayley-Hamilton theorem, which forces matrices to satisfy an equation with a lot less degrees of freedom than the matrices have $(n$ rather than $n^2$). But a more formal argument is as follows: assuming without loss of generality our polynomial $P$ to be monic, the companion matrix $C_P$ of $P$ is a solution of the matrix equation $P[X]=0$, and so are all its conjugates, of which there are a lot because $C_P$ is clearly not central. More precisely, the matrices commuting with $C_P$ are only the polynomials in $C_P$, because its minimal and characteristic polynomials are both$~P$; then the conjugation orbit of $C_P$, being in bijection with $GL(n,K)/Z(C_P)$ where $Z(C_P)$ is the centraliser of $C_P$ in $GL(n,K)$, has dimension $n^2-n$. 
A: The non-symmetric algebraic Riccati equation is (1) $XAX+B_1X+XB_2+C=0_2$ where $A,B_1,B_2,C$ are given in $M_2(\mathbb{C})$ and the unknown is $X\in M_2(\mathbb{C})$. If $A,B_1,B_2,C$ are generic (to get an idea, consider random choices) matrices, then this equation can be rewritten (2) $X^2+AX+B=0$. Now, if $A,B$ are generic, then (2) admits exactly $6$ solutions in $M_2(\mathbb{C})$. That is to say that we find an infinity of solutions only in exceptional cases. 
In the particular case when moreover $A,B$ commute (note that $B$ is a polynomial in $A$), the solutions necessarily commute with $A,B$ and (2) admits exactly $4$ solutions (cf. the copper.hat's comment).
