# The relation between the roots of a polynomial equation and a matrix equation

(I call matrix equation for example this $X^2-X+1=0$. Does it mean so?) When a polynomial equation is solved for $x$, we get a complex number. If we solve the "same" equation (same coeficients), such that the unknown is inside a matrix, is there any relation between the matrix and the roots? Maybe I have not expressed it well, so I'll put an example: $${ x }^{ 2 }-x-1=0$$ So $$x=\frac { 1\pm \sqrt { 5 } }{ 2 }$$ Now the unknown $x$ is inside a matrix and $\alpha,\gamma,\zeta$ are known numbers: $$X=\left[\begin{array}{cc}x & \gamma\\\alpha&\zeta\end{array} \right]$$ $$X^2-X-I =0$$ If it can be solved, is there any relation between $x$ and $X$ ?

-
This isn't really valid to have a single unknown in the matrix, because you get inconsistent results. For instance, if you compute the left hand side, in the (1,2) position you get $x\gamma+\gamma\zeta-\gamma = 0$, and in the (2,1) position you get $\alpha x + \alpha\zeta - \alpha = 0$. These are both linear equations for $x$, which may lead to two different answers. –  Arkamis Jul 18 '12 at 19:40
@EdGorcenski: In that case, the equation simply has no solution. –  celtschk Jul 18 '12 at 21:07
Which is it, $-1$ or $+1$? –  Robert Israel Jul 18 '12 at 23:21

First, note that a "polynomial matrix equation" may have more solutions than its degree! For example, the equation $X^2-1=0$ has only two complex solutions, $x=-1$ and $x=1$, but it has many matrix solutions, among them: $$\left(\begin{array}{cc} 1 & 0 \\ 0 & 1 \end{array}\right),\quad \left(\begin{array}{rr}-1&0\\0&-1\end{array}\right),\quad \left(\begin{array}{rr}1&0\\0&-1\end{array}\right),\quad \left(\begin{array}{cc}0 & 0\\0&1 \end{array}\right),$$ and more. In fact, there are infinitely many solutions: for any $a,b,c,d$ such that $ad-bc\neq 0$, we have that $$\left(\begin{array}{rr} \frac{ad}{ad-bc} & \frac{bd}{ad-bc}\\ -\frac{ac}{ad-bc} & -\frac{bc}{ad-bc} \end{array}\right)$$ is a solution. And there are plenty more!

That said, if $\alpha$ is a complex solution to $p(x)=0$, then $\alpha I$ is a matrix solution to $p(X)=0$. Moreover, if $M$ is a matrix solution to $p(X)=0$, then the minimal polynomial of $M$ is a divisor of $p(x)$, and this means that every eigenvalue of $M$ must be a root of $p(x)$. Thus, the roots of $p(x)=0$ in $\mathbb{C}$ give you the possible eigenvalues of any solution to the matrix polynomial equation $p(X)=0$. In particular, any diagonal matrix whose diagonal entries are chosen from among the roots of $p(x)$ will satisfy the equation.

Also, if $M$ is any solution and $Q$ is any invertible matrix, then $QMQ^{-1}$ is also a solution (this is the source of my "infinite family of examples" above; but note that none of the examples in the first displayed equation line are related in this way). Conversely, a diagonalizable matrix is a solution to $p(X)=0$ if and only if the eigenvalues of $X$ are roots of $p(x)=0$.

Added. None of which directly addresses your question, on second reading, since you are asking about the unknown being in the matrix, rather than being the matrix. But you can do a bit with the information above.

For example, consider the situation you describe. We know that if $X$ is a solution to $p(X)=0$, then the eigenvalues of $X$ must be either $\frac{1+\sqrt{5}}{2}$ or $\frac{1-\sqrt{5}}{2}$. That means that the characteristic polynomial of $X$, which is $$(t-x)(t-\zeta)-\alpha\gamma$$ must either be equal to $t^2+t+1$, to $(t-\phi)^2$, or to $(t-\psi)^2$, where $\phi=\frac{1+\sqrt{5}}{2}$ and $\psi=\frac{1-\sqrt{5}}{2}$. This allows us to solve for $x$: we must have either: \begin{align*} x\zeta - \alpha\gamma &= 1\\ x+\zeta &= -1 \end{align*} (if the characteristic polynomial is $t^2+t+1$); or \begin{align*} x\zeta - \alpha\gamma &= \frac{3+\sqrt{5}}{2}\\ x+\zeta &= -1-\sqrt{5} \end{align*} (if the characteristic polynomial is $(t-\phi)^2$); or \begin{align*} x\zeta - \alpha\gamma &= \frac{3-\sqrt{5}}{2}\\ x+\zeta &= -1+\sqrt{5} \end{align*} (if the characteristic polynomial is $(t-\psi)^2$). This gives you three possible values of $x$ (if the system is consistent).

If the first system is consistent, then the Cayley-Hamilton theorem guarantees that the resulting matrix is a solution to the original polynomial. The other systems are more difficult: it turns out that the only way they can be solutions to the original $p(X)=0$ is if $\alpha=\gamma=0$ and $\zeta=\phi$ or $\psi$, respectively; this follows from the theory of minimal polynomials: we would necessarily have that the minimal polynomial of the matrix is either $t-\phi$ or $t-\psi$, but this would force $X$ to be a scalar multiple of the identity.

I think this kind of question is better approached from the point of view of the minimal polynomial; a bit of theory can simplify the search (as in the previous paragraph) or even determine that no search is necessary (because no solution is possible). I didn't make use the trace, for example, which also gives you information about the eigenvalues.

(I guess the very short answer is "yes, there is a relation, through the eigenvalues and minimal polynomial")

-
Might also be worth noting explicitely (it is actually hidden in your answer) that a diagonalizable matrix is a solution to $P(x)=0$ if and only if its eigenvalues are roots of $p(x)$. –  N. S. Jul 18 '12 at 19:48
@N.S. I just noticed that I wasn't actually addressing the question asked directly, so I've added a bunch of stuff. I'll add that as well. –  Arturo Magidin Jul 18 '12 at 19:58

Just as with scalar quadratic equations, you can complete the square: $$X^2 - X - I = \left(X - \frac{I}{2}\right)^2 - \frac{5}{4} I$$ Thus any solution $\pmatrix{x & \gamma \cr \alpha & \zeta\cr}$ to $X^2 - X - I = 0$ must have $x = 1/2 + \sqrt{5/4}\, x'$, $\zeta = 1/2 + \sqrt{5/4}\, \zeta'$ ,$\alpha = \sqrt{5/4}\, \alpha'$, $\gamma = \sqrt{5/4}\, \gamma'$ where $\pmatrix{x' & \gamma'\cr \alpha' & \zeta'\cr}$ is a square root of $I$. The square roots of $I$ consist of the following classes: $$\pmatrix{s & \dfrac{1-s^2}{t}\cr t & -s\cr} (\text{where}\ t \ne 0), \ \pmatrix{\pm 1 & 0 \cr t & \mp 1\cr}, \ \pmatrix{\pm 1 & t\cr 0 & \mp 1\cr}, \ \pmatrix{1 & 0\cr 0 & 1\cr}, \ \pmatrix{-1 & 0\cr 0 & -1\cr}$$

-