Suppose that $A,\;B,\;C,\;$and $X$ are all real commuting matrices. I am curious how to solve $$AX^2+BX+C=0$$ for $X$. In addition what properties do we need on $A,\;B,$ and $C$ for the solution to exist? Last is this possible for non-commuting matrices?

  • 3
    $\begingroup$ How can you say that $X$ is a commuting matrix, when $X$ is what you are trying to solve for? $\endgroup$
    – TonyK
    Jan 23, 2014 at 19:54
  • 2
    $\begingroup$ @TonyK Why can't I put any condition I want on $X$. Quite frankly I'm more interested in the case where they don't commute anyway. $\endgroup$
    – Wintermute
    Jan 23, 2014 at 19:55
  • $\begingroup$ "Why can't I put any condition I want on $X$." Because $A,B,C$ are inputs to your equation, and $X$ is an output. You should say something like, "Suppose $A,B,C$ are mutually commuting matrices. How do I find $X$, commuting with $A,B$, and $C$, such that...". $\endgroup$
    – TonyK
    Jan 23, 2014 at 20:51
  • 9
    $\begingroup$ @TonyK Of course I can require $X$ must commute with the other matrices. This is like saying find all real solutions to a quadratic equation. There may be complex solutions, but we don't want them. Here there may be solutions for which $X$ does not commute, but I don't want them. $\endgroup$
    – Wintermute
    Jan 23, 2014 at 20:54
  • $\begingroup$ Yes! But you phrased it wrong. This is not a question of your knowledge of English; it is a question of logic. $\endgroup$
    – TonyK
    Jan 25, 2014 at 11:48

2 Answers 2


consider the general quadratic equation $ax^2+bx+c=0$ with real coefficients. we have a formula for finding its both the roots. The same formula will work here, as long as $A$ is invertible, $B^2-4AC$ has a square root in $M_n(\mathbb{R})$ and the matrices $A, B,$ and $C$ are commuting with each other.

$x^2+1 = 0$ as an equation over $\mathbb{R}$ has no solution in $\mathbb{R}$. But $\mathbb{R}$ can be thought of as $1 \times 1$ matrices with real entries. Hence matrix quadratic equation need not have a solution even in commutative case.

Here $A=1$, $B=0$ and $C=1$.

About existence of square root of a matrix, see here :

Square root of a matrix

  • 1
    $\begingroup$ I believe that but you did not address the case where the matrices don't commute. I'm not sure your claim will work in that case, unless you can prove it:) $\endgroup$
    – Wintermute
    Jan 23, 2014 at 19:39
  • $\begingroup$ @mtiano ya. I am assuming the matrices $A$,$B$ and $C$ are commuting with each other. I have edited the answer. $\endgroup$
    – GA316
    Jan 23, 2014 at 19:42

1) That follows is an example when $A$ is not invertible: $A=\begin{pmatrix}1&0\\0&0\end{pmatrix},B=-2A,C=A$. The solutions are $X=\begin{pmatrix}1&0\\z&t\end{pmatrix}$ and $X=\begin{pmatrix}x&y\\-\dfrac{(x-1)^2}{y}&-x+2\end{pmatrix}$ where $y\not= 0$. The solutions that commute with $A,B,C$ are $X=\begin{pmatrix}1&0\\0&t\end{pmatrix}$.

2) If $A,B,C$ are generic matrices (that is, there are no algebraic relations with coefficients in $\mathbb{Q}$ linking the entries of $A,B,C$) that commute, then all solutions $X$ commute with $A,B,C$.

EDIT: when $A$ is invertible, $X=(-B+\delta)2^{-1}A^{-1}$ where $\delta^2=\Delta=B^2-4AC$. This formula is valid in any commutative ring with characteristic not $2$. In particular you can solve equations of second degree in $\mathbb {Z}/n\mathbb{Z}$ with $n\not= 2$. It remains to see if $\delta$ exists. For instance, in $\mathbb {Z}/p\mathbb{Z}$, where $p$ is a prime, only half of the elements are squares.

If $\Delta$ has no eigenvalues in $]-\infty,0]$, then there are $2^{r+c}$ real square roots of $\Delta$ that are polynomials in $\Delta$ ($r=$ number of distinct real eigenvalues, $c=$ number of distinct complex conjugate eigenvalues pairs). If $\Delta$ has $<0$ eigenvalues, then it is more complicated ! See, for instance, $\Delta=-I_2$ or $-I_3$.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .