Give a counterexample that $A$, $B$ are similar matrices in $M_{n\times n}(\mathbb{C})$ but $PAP^{-1}\neq B$ for any $P\in GL_{n}(\mathbb{R})$. How to construct this example?
I have obtained that of all the entries of $A$ and $B$ are in $\mathbb{R}$ then $A$, $B$ are similar matrices in $M_{n\times n}(\mathbb{C})$ implies that $A$, $B$ are similar matrices in $M_{n\times n}(\mathbb{R})$. Now I want to construct a counterexample with that some of the entries of $A$ and $B$ are not in $\mathbb{R}$.
Note that the matrices $$A = \begin{pmatrix}x + iy & 0 \\ 0 & x-iy\end{pmatrix}\ \ \ \ \text{and} \ \ \ \ \ B = \begin{pmatrix}x & -y \\ y & x\end{pmatrix}$$ are similar through the following $$\begin{pmatrix}i & -i \\ 1 & 1\end{pmatrix}\begin{pmatrix}x + iy & 0 \\ 0 & x-iy\end{pmatrix}\begin{pmatrix}-\frac{i}{2} & \frac{1}{2} \\ \frac{i}{2} & \frac{1}{2}\end{pmatrix} = \begin{pmatrix}x & -y \\ y & x\end{pmatrix}$$ On the other hand, it's easy to see that no real matrix will diagonalize $B$ to $A$ since the eigenspaces are spanned by $(i,\ 1)^\mathrm{T}$ and $(-i,\ 1)^\mathrm{T}$ respectively and these vectors cannot be made purely real.