# If two matrices have the same determinant, are they similar? [closed]

I am wondering if we have two square matrices $A$ and $B$ and if $\det A = \det B$, then does an invertible matrix $P$ exist with $$A = P^{-1} B P$$

• Did you try some examples: Like some diagonal matrices with the same element on all diagonal entries? Commented Dec 11, 2017 at 13:26
• Try to use the search, this site is full of information. Like here or here.
– A.Γ.
Commented Dec 11, 2017 at 14:08
• Counterexamples aside, assuming $n \times n$ matrices with real entries, given any two matrices with positive determinants $a$ and $b$, you can scale the entries of the second by $\sqrt[n]{\frac{a}{b}}$ so the determinants match. Of course you can find multiple non-similar matrices with positive determinant. So same determinant cannot imply similarity. Commented Dec 11, 2017 at 17:25

No. Take $A=\begin{pmatrix}1&0\\0&0\end{pmatrix}$ and $B=\begin{pmatrix}0&0\\0&0\end{pmatrix}$.

Just as two rectangles with the same area are not necessarily similar (and, in fact, won't be unless they are the same or flipped about the 45-degree axis), two matrices with equal determinants will not necessarily be similar. This is not just a coincidence; it actually gets to the concept of the determinant, which you might be interested to explore further.

• Upvoted for giving some explanation of why the answer is no, as opposed to merely providing a particular counterexample without context. Commented Dec 11, 2017 at 18:26
• To expand: G Tony Jacob's example is a pair of dissimilar rectangles of equal area, eranreches example is a pair of dissimilar parallelograms of equal area, and Fred's example is a pair of dissimilar degenerate rectangles (of zero area). Commented Dec 11, 2017 at 20:15

No. Take

$$A=\begin{pmatrix}1&1\\0&1\end{pmatrix}\:\:{\rm and}\:\:B=\begin{pmatrix}1&0\\0&1\end{pmatrix}$$

Can you argue why $A\nsim B$?

A good counterexample is:

$$A=\begin{pmatrix}1&0\\0&6\end{pmatrix}\:\:{\rm and}\:\:B=\begin{pmatrix}2&0\\0&3\end{pmatrix},$$

both of which have determinant $6$. Can you see why these matrices are not similar?

• Even easier, I guess: $$A=\begin{pmatrix}1&0\\0&4\end{pmatrix}\:\:{\rm and}\:\:B=\begin{pmatrix}2&0\\0&2\end{pmatrix}$$ Commented Dec 11, 2017 at 20:22
• Man, the one-up-manship on this site is starting to get to me... Commented Dec 11, 2017 at 20:25
• I think your answer is a good one, and because I did not want to post a new answer very similar to yours, I just published the example I had in mind as a comment to your answer. I did not mean to be impolite. Often, when I comment on a post, my purpose is not to point out an "issue", but to express my thoughts on a contribution that I find useful. Commented Dec 13, 2017 at 13:01
• @JeppeStigNielsen Ok, that’s fair. I’m sorry for being less-than-appreciative; I think I was in a bad mood yesterday. Commented Dec 13, 2017 at 13:26

No, they are not even guaranteed to be the same dimension. Try 2 identity matrices of different dimensions. But even if they are the same dimension, try 2 different triangular matrices with different off-diagonal members.