Solution (source code)

= Solution

The <matrix trace> is $\operatorname{Tr}A=\sum_iA_{ii}$. Expanding the <matrix products> gives $\operatorname{Tr}(AB)=\sum_{i,j}A_{ij}B_{ji}=\sum_{j,i}B_{ji}A_{ij}=\operatorname{Tr}(BA)$. Thus the <cyclic property of the trace> gives zero <trace> to every <commutator>. If $AB-BA=I$, taking the <trace> would give $0=n$, impossible for positive finite $n$ over the real or complex <field>.

For real $A,B$, let $p(\lambda)=\det(A+\lambda B)$, a real <polynomial> of degree at most $n$. Since $p(i)=\det C\ne0$, it is not the zero <polynomial>. It has at most finitely many real <roots of a polynomial>, so $A+\lambda B$ is an <invertible matrix> for some real $\lambda$, in fact for all but finitely many.

Finally write the invertible intertwiner as $R=A+iB$. The relation $PR=RQ$ and the reality of $P,Q$ give $PA=AQ$ and $PB=BQ$. Choose a real $\lambda$ for which $S=A+\lambda B$ is invertible. Then $PS=SQ$, so $P=SQS^{-1}$. This proves that <complex similarity of real matrices implies real similarity>.