# Similar matrices NOT over the complex numbers [duplicate]

This question already has an answer here:

We say that two matrices $A,B$ with complex entries are similar if and only if there exists an invertible complex matrix $P$ so that $A = P^{-1} B P$.

Does $P$ always have to be a complex matrix? I've done so many exercises where you are asked to determine if two matrices are similar and I've never come across a matrix with any complex entries. Is it safe to say that if $A$ and $B$ have real entries, then $P$ will also be real?

If we restrict this even more, say $A$ and $B$ both have only coordinates from the rational numbers, then $P$ will also be rational? What about the integers? (no, right? because when you do row operations you will likely start working with fractions) Is there a theorem about this? I've tried looking it up and came across 'rational canonical form' but I'm not sure it's what I'm looking for.

## marked as duplicate by user1551 linear-algebra StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); May 6 '15 at 9:07

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

• If $A$ and $B$ are real and we have a complex matrix $P$ s.t $A=P^{-1}BP$ then we can find a real $Q$ s.t $A=Q^{-1}BQ$. – Kitegi May 6 '15 at 4:22
• See the linked (duplicated) question. Put it simply, if both $A$ and $B$ comes from some field $K$ (e.g. $\mathbb Q$) and they are similar over a larger field $F$ (e.g. $\mathbb R$), then they are similar over $K$ too. In other words, if $K$ is a subfield of $F$, the matrices $A,B$ have entries in $K$ and $B=PAP^{-1}$ for some $P\in M_n(F)$, then there exists an invertible matrix $S\in M_n(K)$ such that $B=SAS^{-1}$. (Note that $P$ is not necessarily equal to $S$.) – user1551 May 6 '15 at 9:13

## 1 Answer

Frequently the conjugating matrix has all real entries, but there are cases of real matrices that are conjugate via a non-real matrix $P$. For instance, for any invertible non-real matrix $P$, we can see that for $A = B = I$, $P$ provides a conjugation from $A$ to $B$.

And for $A = B = I$, we can take $P$ to be a matrix that looks like $I$ except that its upper-left entry is some number $r$. If $r$ is not rational, then you have a non-rational conjugation between two rational matrices.

I think the question you want to ask might be this:

Suppose that $A$ and $B$ are conjugate matrices in some class; is there a matrix $P$ in that class with $A = P^{-1} B P$?

(This question, for the classes "real", "rational", "integer", is the one you asked. There are other classes of interest though, like "symmetric" or "integer-unimodular".)