# Determining a matrix from its characteristic polynomial

Let $A\in\mathcal{M}_{n}(K)$, where $K$ is a field. Then, we can obtain the characteristic polynomial of $A$ by simply taking $p(\lambda)=\det(A-\lambda I_n)$, which give us something like

$p(\lambda)=(-1)^n\lambda^n+(-1)^{n-1}(\text{tr } A)\lambda^{n-1}+\ldots+\det A.$

Now, how can we obtain the matrix $A$ knowing the characteristic polynomial?

Cheers

-
There is not a bijection between Matrices and characteristic polynomials! – Piquito Feb 16 at 12:01
No. Two matrices sharing identical characteristics need not even be similar. – Vim Feb 16 at 12:11
Notice that even for your $\mathcal{M}_2$ example you have two equations and four unknowns. You won't find a unique set of $a_{ij}$ for that system, only a doubly infinite family of solutions... – Eric Towers Feb 16 at 13:40
@EricTowers, yes! Edited. – Victor Feb 16 at 13:50

## 4 Answers

Any two similar matrices $B = P A P^{-1}$ will have the same characteristic polynomial. Also $A$ and $A^T$ have the same characteristic polynomial.

While the matrix $A$ which has a given characteristic polynomial is not unique, it is often convenient to choose an upper Hessenberg matrix called the (Frobenius) companion matrix or its (lower Hessenberg) transpose.

That is, the $n\times n$ matrix:

$$\begin{bmatrix} 0 & 0 & \ldots & 0 & -c_0 \\ 1 & 0 & \ldots & 0 & -c_1 \\ 0 & 1 & \ldots & 0 & -c_2 \\ \vdots & \vdots & \ddots & \vdots & \vdots \\ 0 & 0 & \ldots & 1 & -c_{n-1} \end{bmatrix}$$

has characteristic polynomial $p(x) = x^n + c_{n-1}x^{n-1} + \ldots + c_1 x + c_0$.

One approach to finding the roots of a polynomial is to apply eigenvalue solvers to the companion matrix for the polynomial.

-
For your second sentence: actually $A$ and $A^T$ are always similar, so you are not saying anything new really. But it is true that it is easier to see that they have the same characteristic polynomial than that they are similar. – Marc van Leeuwen Feb 16 at 15:53
In fact, so many companion matrices with special properties can be constructed, depending on how the polynomial is represented. There are companion matrices corresponding to polynomials represented in the Lagrange, Newton, Bernstein, orthogonal, etc. bases. There is a lot of literature on this subject. – J. M. Feb 16 at 18:35
@J.M. Could you advise me a book or an article about it? – Victor Feb 17 at 16:46
@Victor, see e.g. this article. Searching for "generalized companion matrix" or "comrade matrix" will turn up more references. – J. M. Feb 17 at 16:51
@J.M., thank you so much. – Victor Feb 17 at 16:53

If $A$ and $S$ are $n\times n$ matrices, with $S$ invertible, then $A$ and $SAS^{-1}$ have the same characteristic polynomial. But even non similar matrices can have the same characteristic polynomial: consider $$\begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix},\qquad \begin{bmatrix} 1 & 1 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix},\qquad \begin{bmatrix} 1 & 1 & 0 \\ 0 & 1 & 1 \\ 0 & 0 & 1 \end{bmatrix}$$ So you cannot find the matrix having a given characteristic polynomial.

-
Ok. Now, just like a basis of a vector space which "generates" all the vectors. Is it possible to establish the same thing here? I mean, can the characteristic polynomial generate all those matrices? I'm thinking that could play a similar role as the basis... but I don't know how to write the idea and if it has sense – Victor Feb 17 at 16:42
@Victor, are you familiar with the concept of a Jordan normal form? – J. M. Feb 17 at 16:53
@J.M. Not really... I've taken a linear algebra course but we haven't studied what you mentioned. Does it solve my question? – Victor Feb 17 at 16:59
@Victor Yes; a polynomial $f(X)$ determines a finite number of matrices in Jordan form having $f(X)$ as characteristic polynomial. Any matrix having $f(X)$ as characteristic polynomial is similar to one of those Jordan forms, in the sense that it is $SJS^{-1}$ for $J$ one of those matrices determined before. – egreg Feb 17 at 17:04
@Victor, the point here would be that these three matrices have different JNFs (they are in fact already in JNF), and these clearly reveal that they are not similar. In particular, only the first matrix is diagonalizable. Anyway, you'll want to wait until you get taught the JNF in your courses. – J. M. Feb 17 at 17:04

There is no way you can determine the matrix from its characteristic polynomial because the characteristic polynomial is determined by $n$ numbers and the matrix by $n^2$ numbers.

-

If you apply any change-of-basis matrix to a given matrix, the newly-formed matrix will have the same characteristic polynomial. So there is infinitely many matrices with any given characteristic polynomial.

-