# If $\det A = \det B$ and $\operatorname{tr} A = \operatorname{tr} B$, then $\chi_A = \chi_B$?

Is the following statement always true?

Let $K$ be a finite field, and, for an $n\times n$ matrix $A$ over $K$, \begin{align} \operatorname{tr} A &:= \sum_{i\in[1,n]}^{}{A_{i,i}} \\ \chi_A &:= \text{characteristic polynomial of $A$} \end{align} If $\det A = \det B$ and $\operatorname{tr} A = \operatorname{tr} B$, then $\chi_A = \chi_B$.

Question: I think the statement is wrong but it is intuition. What way is there to find out the answer and to prove it correctly?

• Hint. If the sums of $n$ eigenvalues (traces) and the products of $n$ eigenvalues (determinants) are equal, then the eigenvalues are the same? – Yurii Savchuk Jul 14 '17 at 9:21
• @YuriiSavchuk only if the eigenvalues equal $1$ I think – jublikon Jul 14 '17 at 9:30

Since in two dimensions $\chi_A(t) = t^2-t\operatorname{tr}{A}+\det{A}$, there is no two-dimensional example. In three dimensions, $$\chi_A(t) = -t^3+t^2\operatorname{tr}{A}-t\frac{1}{2}((\operatorname{tr}{A})^2-\operatorname{tr}{(A^2)})+\det{A},$$ (and similarly in higher dimensions) so all we have to do is come up with two matrices so that their traces and determinants are the same, but the traces of their squares differ. We may take, for example, the zero matrix and $$\begin{pmatrix} 1 & 0 & 0 \\ 0 & -1 & 0 \\ 0 & 0 & 0 \end{pmatrix}.$$
• Where does $\chi_A(t) = t^2-t\operatorname{tr}{A}+\det{A}$ come from? – jublikon Jul 14 '17 at 9:32
• It's easiest to see in terms of the roots, which are the eigenvalues: $$\chi_A(t) = \prod_{i=1}^n (\lambda_i-t) = (-t)^n + (-t)^{n-1}\sum_i \lambda_i + (-t)^{n-2}\sum_{i<j} \lambda_i\lambda_j + \dotsb + (-1)^n \prod_i \lambda_i \\ = (-t)^n + (-t)^{n-1} \operatorname{tr}{A} + (-t)^{n-2} ((\operatorname{tr}{A})^2-\operatorname{tr}{(A^2)})/2 + \cdots + \det{A}$$ by Newton's identities. – Chappers Jul 14 '17 at 9:44