15

There is a similar question here, but it's asking that if two matrices have the same characteristic polynomial then are they similar. If the answer were positive then the answer to my question will also be positive, but it's not.

Now, if two matrices have the same characteristic polynomial then they are of the same order. Suppose $A$ and $B$ are matrices of order 2 and they both have a characteristic polynomial of $t^2+at+b$. We know that $t^2+at+b=t^2-\text{trace}(A)t+\text{det}(A)=t^2-\text{trace}(B)t+\text{det}(B)$, so in this case the answer to my question is affirmative.

However, I don't think the answer is "yes" in general because then I probably will have a theorem which says this in my book. I looked for counterexamples but couldn't find any. Basically, I made up random matrices and never got a counterexample. So if the answer to the question is "no", can you please explain how you arrived at the counterexample.

Hilbert
  • 784

3 Answers3

38

If $\chi_A$ denotes the characteristic polynomial of $A$, then $\chi_A(0)=\det(A)$, so the answer is yes.

TheSilverDoe
  • 29,720
  • 1
    Need a factor of $(-1)^n$ in there. – Eric M. Schmidt Jun 26 '23 at 07:42
  • 8
    @EricM.Schmidt I use the convention $\chi_A(X)=\det(A-XI_n)$. – TheSilverDoe Jun 26 '23 at 08:32
  • 2
    So the answer could be: If you have the characteristic polynomial $\chi_A(t)$ of a matrix $A$, you can trivially recover the determinant of $A$ by plugging in $t=0$. For we have: $$\det A = (-1)^{\deg \chi_A} \chi_A(0)$$ for one usual definition of characteristic polynomials, or: $$\det A = \chi_A(0)$$ for the other usual definition. – Jeppe Stig Nielsen Jun 26 '23 at 11:57
  • From the asker's example $t^2+at+b=t^2-\text{trace}(A)t+\text{det}(A)=t^2-\text{trace}(B)t+\text{det}(B)$ we can infer, from their middle term, that they use the convention $\chi_A(t)=\det (tI-A)$. – Jeppe Stig Nielsen Jun 26 '23 at 12:05
  • 1
    @JeppeStigNielsen I agree with your first comment, but not really with the second : the asker's example concerns matrices of order $2$, in which case both definitions lead to $\chi_A(t)=t^2-\mathrm{Tr}(A)t+\det(A)$, so we cannot infer which convention is used here. – TheSilverDoe Jun 26 '23 at 12:39
  • 1
    @JeppeStigNielsen I indeed use the convention $\text{det}(tI-A)$. When I read the answer I wasn't aware that they had another version, I just assumed that the answerer thought that I will fill in the blanks. – Hilbert Jun 26 '23 at 14:20
  • Oh yes, my second comment above is wrong! – Jeppe Stig Nielsen Jun 26 '23 at 14:31
20

If they have the same characteristic polynomial then they have the same eigenvalues and by this fact alone they have the same determinant because the determinant is equal to the product of the matrix's eigenvalues (repeated under multiplicity)

Localth
  • 1,286
  • 2
    As compared to the accepted answer, this one is more clear. – CroCo Jun 26 '23 at 20:18
  • 3
    I don't agree. It is less direct and appeals to theorems which are useless here (and implicitely assumes the ring is an algebraically closed field). – Anne Bauval Jul 18 '23 at 05:37
12

For a square matrix $n \times n$ matrix $A$ the characteristic polynomial will have constant term $(-1)^n \det A$ and the coefficient of the $t^{n-1}$ term will be $- \text{tr} A$. So if two matrices have the same characteristic polynomial they necessarily have the same trace and determinant.

CyclotomicField
  • 11,018
  • 1
  • 12
  • 29