# Find a matrix given a characteristic equation

How I can compute a matrix given the characteristic equation?

All I found are references and functions that do the exact opposite, but I know the characteristic equation and I need the corresponding matrix / linear system.

For example, the equation is

$$( \lambda - \alpha ) ( \lambda - \beta ) = 0$$

I have to find the matrix $A$ such that $A$ itself maps to this polynomial.

## migrated from mathematica.stackexchange.comJul 29 '16 at 16:03

This question came from our site for users of Wolfram Mathematica.

• You have a uniqueness problem here. The matrices $$\begin{pmatrix}1&0\\0&1\end{pmatrix}$$ and $$\begin{pmatrix}1&1\\0&1\end{pmatrix}$$ have the same characteristic polynomial, but drastically different eigensystems. – J. M. is a poor mathematician Jul 28 '16 at 18:45
• @J.M. I think that my specific problem maps to the second matrix since it cannot be diagonalized, infact I did some math before and that matrix is basically the system that I got from my pen and paper work – user356815 Jul 28 '16 at 18:49
• @MichaelE2 since I'm a beginner with both, I'll say both, I'm trying to see if this can help me advance in my studies . – user356815 Jul 28 '16 at 18:50
• So, tell me what you know about the Jordan form… – J. M. is a poor mathematician Jul 28 '16 at 18:51
• This might be related to the given problem Finding the characteristic polynomial of a matrix modulus n – Artes Jul 28 '16 at 18:56

This gives you the entries for such a matrix:

mat = {{a, b}, {c, d}};
SolveAlways[CharacteristicPolynomial[mat, λ] == (λ - α) (λ - β), λ]


However, it is probably preferable to choose mat such that it has only as many unknowns as the matrix dimension.

• I don't get the notation on the output, it's the first time I see this, I get $\begin{pmatrix} \alpha \rightarrow 1 & \beta \rightarrow 1 \\ \alpha \rightarrow 1 & \beta \rightarrow 1 \\ \end{pmatrix}$ for mat = {{1,1},{0,1}}, which means that the matrix elements are always 1 ? – user356815 Jul 28 '16 at 19:02

If you are working over an algebraically closed field: Any matrix $\bf A$ you can write on this form:

$${\bf A = T}^{-1}{\bf DT}$$

If there exists such a relation it is said that $\bf A$ and $\bf D$ are similar to each other.

Where $\bf D$ is diagonal or block diagonal with elements / blocks $\lambda_k$ or $\left[\begin{array}{cccc} \lambda_k&1&0&0\\ 0&\lambda_k&\ddots&0\\ 0&0&\lambda_k&1\\ 0&0&0&\lambda_k \end{array}\right]$

In this case it will be either a diagonalization ( if there are only $\lambda_k$ and $0$ in $\bf D$ matrix ) and a Jordan canonical form if there are blocks like the one to the right with $1$ values on the first superdiagonal.

$\bf T$ is free to design as you will - as long as it has determinant $\neq 0$.

The values on the diagonal of $\bf D$ are fixed to $\lambda_k$, but not how large blocks or contents of $\bf T$.

• what is the technical name for the math process that can lead you to rewrite$${\bf A}$$ as $${\bf A = T}^{-1}{\bf DT}$$ ? – user356815 Jul 29 '16 at 16:30
• It is a matrix similarity. en.wikipedia.org/wiki/Matrix_similarity – mathreadler Jul 29 '16 at 16:37
• perhaps you could have mentioned diagonalization – windircurse Jul 29 '16 at 16:38
• Yes added. Also Jordan form. – mathreadler Jul 29 '16 at 16:41

Given the characteristic polynomial

$$(s - \alpha) (s - \beta)$$

we know that the eigenvalues are $\alpha$ and $\beta$. Hence, one matrix that yields the characteristic polynomial above is the diagonal matrix

$$\begin{bmatrix} \alpha & 0\\ 0 & \beta\end{bmatrix}$$

Another matrix is the upper triangular matrix

$$\begin{bmatrix} \alpha & 1\\ 0 & \beta\end{bmatrix}$$

Yet another matrix is the lower triangular matrix

$$\begin{bmatrix} \alpha & 0\\ 1 & \beta\end{bmatrix}$$

There are infinitely many more, though.