# If the determinant and the trace of a matrix are the same, then can we show they have the same eigenvalues?

If $\det A = \det B$ and $\operatorname{tr}A=\operatorname{tr} B$, then can we show $A$ and $B$ have the same eigenvalues?

• Only in dimensions $\leqslant 2$. – Daniel Fischer Aug 10 '13 at 22:08

$\begin{pmatrix} 2 & 0 & 0 \\ 0 & 4 & 0 \\ 0 & 0 & 0 \end{pmatrix}$

$\begin{pmatrix} 3 & 0 & 0 \\ 0 & 3 & 0 \\ 0 & 0 & 0 \end{pmatrix}$

You can easily extend this example to higher dimensions by adding $1$'s along the diagonal, for instance.

If you'd like an example where both matrices are non-singular, then try:

$\begin{pmatrix} 1 & 0 & 0 \\ 0 & 3 & 0 \\ 0 & 0 & \frac{48}{15} \end{pmatrix}$

$\begin{pmatrix} 2 & 0 & 0 \\ 0 & 4 & 0 \\ 0 & 0 & \frac{6}{5} \end{pmatrix}$

The result holds in dimensions $\leq 2$ as Daniel notes above. If you'd like to prove this, then use the characterisations of the trace and the determinant in terms of the eigenvalues.

I hope this helps!

Two matrices have the same eigenvalues (with multiplicity) if they have the same characteristic polynomial. The trace and the determinant are only two of the $n$ coefficients of this polynomial, and so this doesn't hold whenever $n>2$, as noted above.