I am trying to create an example where I find the eigenvalues of a 3x3 positive matrix. I want the eigenvalues to be integers or simple fractions, is there a way of working backwards to create an example with such nice eigenvalues? As every time I try to create an example the eigenvalues end up being long decimal numbers.
$\endgroup$ 12 Answers
$\begingroup$Yes, there is a way. Start with a diagonal matrix $D$ with the eigenvalues you're after along the diagonal. If that's enough for you, cool.
If you want something that looks a bit more "random", then you can change basis: Take any invertible matrix $B$, and calculate$$ BDB^{-1} $$This will have the same eigenvalues as $D$, but it will be less obvious (unless $B$ is diagonal or something). If you pick $B$ to have integer entries and determinant $\pm 1$, then $B^{-1}$ will also have integer entries. And if, in addition, your chosen eigenvalues are integers, $BDB^{-1}$ will have integer entries.
$\endgroup$ 1 $\begingroup$Diagonal matrices have its eigenvalues on the main diagonal, namely $D$. You can just multiply an invertible matrix $A$ and its inverse $A^{-1}$, so you get $M=A^{-1}DA$. Since $M$ and $D$ are similar, they share the same eigenvalues.
$\endgroup$