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.
 A: 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.
A: 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$.
A: 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.
