# If $PAP^{-1} = B$, does there exist $Q$ with positive determinant such that $QAQ^{-1} = B$?

Suppose $$A,B$$ are conjugate real $$n \times n$$-matrices with $$B = PAP^{-1}$$ for some real matrix $$P$$. Does there exist a real matrix $$Q$$ with positive determinant such that $$B = QAQ^{-1}$$? The answer to the question is obviously yes if $$n$$ is odd since we can just take $$Q = -P$$. What about even $$n$$?

I asked this question because I wanted to show that the conjugacy classes of real matrices are path-connected (which is not true, as it turns out) and I had reduced the problem down to the above question.

A counterexample for $$n = 2$$ is $$A = \begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}$$ and $$B = -A$$. Then, the only $$2\times 2$$-matrices $$P$$ that satisfy $$PA = BP$$ are those of the form $$\begin{pmatrix} a & b \\ b & -a \end{pmatrix}$$. Obviously, if such a matrix $$P$$ has real entries, then its determinant is $$\leq 0$$.