Is every matrix conjugate to its transpose in a continuous way?

It is well-known that every square matrix is conjugate to its transpose. This means (in the case of real matrices) that, for each $n\times n$ matrix $M$ with real entries, there is a matrix $S_M\in GL(n,\mathbb{R})$ such that ${S_M}^{-1}MS_M=M^T$. My question is: can you choose $S_M$ in such a way that it depends continuously on $M$? In other words:

Is there a continuous map $\psi\colon M_{n,n}(\mathbb{R})\longrightarrow GL(n,\mathbb{R})$ such that$$\bigl(\forall M\in M_{n\times n}(\mathbb{R})\bigr):\psi(M)^{-1}.M.\psi(M)=M^T?$$

My guess is that the answer is negative even for $n=2$.

Note that, for each individual matrix $M$, there are plenty of choices for $S_M$. For instance, if $n=2$ and$$M=\begin{bmatrix}x&y\\z&t\end{bmatrix},$$then you can take$$S_M=\begin{bmatrix}az&bz\\bz&bt-bx+ay\end{bmatrix},$$with $a$ and $b$ chosen such that $\det(S_M)\neq0$ but, of course, this will only work if $z\neq0$. What if $z=0$? Then you can take$$S_M=\begin{bmatrix}-at+ax&ay\\ay&by\end{bmatrix}$$and, again, $a$ and $b$ should be chosen such that $\det(S_M)\neq0$; the problem now is that, of course, this will only work if $y\neq0$. And so on. This looks like the problem of finding a logarithm for each $z\in\mathbb{C}\setminus\{0\}$: there are plenty of choices for each individual $z$, but there is no continuous way of picking one.


My first thought is to look at a simple example — $2\times 2$ rotation matrices. Oops — rotation by $\theta$ and rotation by $-\theta$ are conjugate by any (real) reflection. No help there.

Second thought — OK, powers of something all work with the same $S$. So then, what happens at the identity? Which one do we choose? Actually, I can make those powers continuous by bringing in the matrix exponential.

Now we're ready. Consider a matrix $A$ with some eigenvalue $\lambda$ of multiplicity $1$ and associated eigenvector $v$. $A^T$ has $\lambda$ as an eigenvalue with multiplicity $1$ and associated eigenvector $w$. While we can't pin down $S(A)$ completely, we do know that $S(A)w=av$ for some nonzero $a$. This will also be true for any nonzero power of $A$, and for $\exp(tA)$ for any nonzero $t$. As $t\to 0$, we then have $S(I)w = \lim_{t\to 0}S(\exp(tA))w=\lim_{t\to 0}a(\exp(tA))v=cv$ for some $c$, possibly zero.

Almost there; all we need now are some concrete examples of what $v$ and $w$ can be. As it turns out, any pair of non-orthogonal nonzero real vectors are possible. Let $A$ be the rank-1 matrix $vw^T$, so $A^T=wv^T$. Then $Av=\langle v,w\rangle v$ and $A^Tw = \langle v,w\rangle w$, so these are the lone eigenvectors for the nonzero eigenvalue of $A$.

Combining these, $S(I)$ takes an arbitrary nonzero vector $w$ to something that's simultaneously a multiple of almost every nonzero vector $v$, which must be zero. That gives $S(I)=0$, an impossibility. By this contradiction, there is no way to choose $S$ continuously.

OK, I actually proved specifically that $S$ can't be continuous at the identity. Continuity elsewhere isn't ruled out yet.


Consider the infinitely differentiable function $$ M_t=\begin{cases} e^{-1/t^2}\pmatrix{0&1\\ 0&1}&\text{ when } t>0,\\ 0&\text{ when } t=0,\\ e^{-1/t^2}\pmatrix{1&0\\ 1&0}&\text{ when } t<0. \end{cases} $$ It can be shown that all solutions to the equation $M_tS_t=S_tM_t^T$ are given by matrices of the form $$ S_t=\begin{cases} \pmatrix{a&b\\ b&b}&\text{ when } t>0,\\ \pmatrix{b&b\\ b&a}&\text{ when } t<0. \end{cases} $$ It follows that if $S_t$ is chosen continuously, $S_0$ must be in the form of $\pmatrix{b&b\\ b&b}$, which is singular.