I asked this question some time ago in MSE but I didn't recieved any feedback.


<https://math.stackexchange.com/questions/4672664/diagonalization-of-symmetric-matrices-of-functions>


This problem arised to me when I was trying to find an analog to orthogonal reference frames for singular metric tensors.


Let $U\subseteq\mathbb{R}^m$ be an open subset such that $0\in U$ and $n\leq m$. Let
$G(p)=\begin{pmatrix}
g\_{11}(p) & g\_{12}(p) & \cdots & g\_{1n}(p)\\
g\_{12}(p) & g\_{22}(p) & \cdots & g\_{2n}(p)\\
\vdots & \vdots & \ddots & \vdots \\
g\_{1n}(p) & g\_{2n}(p) & \cdots & g\_{nn}(p)\\
\end{pmatrix}
$ be a symmetric matrix of infinitely differentiable functions $g\_{ij}:U\rightarrow\mathbb{R}$ such that
$G(0)=0\in\mathcal{M}\_{n\times n}(\mathbb{R})$, that is $g\_{ij}(0)=0$ for all $i,j$.


To diagonalize the matrix near $0\in\mathbb{R}^m$, the Gram-Schmidt process doesn't work because it will divide by $0\in\mathbb{R}$ in some steps. You can not even do an adaptation of this process beacause there is no initial orthonormal basis to start with or more acurately any basis will be orthogonal but not normal since the "norms" will be zero. I write norms between quotation marks because $G(p)$ isn't positive semidefinite so it doesn't define any norm and I don't want to put any condition about the "definitness" of the matrix.


Said that, the question is: **is it possible to find an open subset $V\subseteq U$ such that $0\in V$ where such a matrix is diagonalizable?** Maybe with a different process than Gram-Schmidt or even leaving the ring of infinitely differentiable functions. I just need to prove the existence theoretically, in other words, I don't need it to be computable.


Thank you in advance!



Diagonalization of symmetric matrices of functions
In general, this cannot be done. For example, in dimension $2$ in coordinates $(x,y)$, let
$$
G(x,y) = \left[\begin{matrix}x&y\\y&-x\end{matrix}\right].
$$
If $G$ could be diagonalized by a differentiable invertible matrix $A(x,y)$, i.e., if
$$
A^T G A = \left[\begin{matrix}\lambda\_1&0\\ 0&\lambda\_2\end{matrix}\right]
$$
where $\lambda\_1$ and $\lambda\_2$ were differentiable, then the $\lambda\_i$ would have to vanish at $x=y=0$. Taking determinants yields
$$
-(x^2+y^2)(\det A)^2 = \lambda\_1\lambda\_2\,.
$$
Then, looking at the lowest order terms on each side (the terms of order $2$), you'd have $x^2+y^2$ written as a product of two factors linear in $x$ and $y$, which is impossible.


For similar reasons, you cannot achieve
$$
G = A^T\left[\begin{matrix}\lambda\_1&0\\ 0&\lambda\_2\end{matrix}\right]A
$$
for a differentiable $A$ and $\lambda\_i$. The above argument shows that $A$ could not be invertible, so we would have to have $\det A$ vanishing at $x=y=0$.
Then $-(x^2+y^2) = (\det A)^2\lambda\_1\lambda\_2$ would imply that $\det A$ vanishes at most to order 1 at $x=y=0$ and that $\lambda\_1$ and $\lambda\_2$ do not vanish at $x=y=0$, which again gives a contradiction, since $x^2+y^2$ is not the square of a linear term.


In fact, one cannot have
$$
G = A^T\left[\begin{matrix}\lambda\_1&0\\ 0&\lambda\_2\end{matrix}\right]A
$$
with $A$ and $\lambda\_i$ being merely *continuous* on some disk $ x^2+y^2\le \epsilon^2$ for some $\epsilon>0$.


Here is why: The relation $-(x^2+y^2) = (\det A)^2\lambda\_1\lambda\_2$, shows that $\det A$, $\lambda\_1$ and $\lambda\_2$ must be nonzero away from $(x,y)=(0,0)$, so each $\lambda\_i$ cannot change sign and we must have $\lambda\_1\lambda\_2<0$ away from $(x,y)=(0,0)$. Without loss of generality, we can assume that $\lambda\_1 = \mu\_1^2$ and $\lambda\_2=-\mu\_2^2$, where the $\mu\_i$ are continuous, so by modifying $A$ in the obvious way, we can reduce to the case that $\lambda\_1 = -\lambda\_2 = 1$ and, moreover, that $\det A = \sqrt{x^2+y^2}>0$.


The mapping $f:S^1\to\mathrm{SL}(2,\mathbb{R})$ defined by
$$
f(\theta) = \frac1{\sqrt{\epsilon}} A(\epsilon\cos\theta,\epsilon\sin\theta)
$$
then satisfies
$$
f(\theta)^T\left[\begin{matrix}1&0\\ 0&-1\end{matrix}\right]f(\theta) 
= \left[\begin{matrix}\cos\theta&\sin\theta\\ \sin\theta&-\cos\theta\end{matrix}\right].
$$
Now, consider the map $s:\mathrm{SL}(2,\mathbb{R})\to H$ (where $H$, a hyperboloid of one sheet, is the quadric surface in the symmetric $2$-by-$2$ matrices defined by setting the determinant equal to $-1$) defined by
$$
s(A) = A^T\left[\begin{matrix}1&0\\ 0&-1\end{matrix}\right]A.
$$
Both $\mathrm{SL}(2,\mathbb{R})$ and $H$ are homotopic to the circle and hence have $\pi\_1\simeq \mathbb{Z}$. The map $s$ carries the generator of $\pi\_1(\mathrm{SL}(2,\mathbb{R}))$ to twice a generator of $\pi\_1(H)$. However, the above formula for $f$ shows that $s\circ f:S^1\to H$ carries a generator of $\pi\_1(S^1)$ to a generator of $\pi\_1(H)$, which is impossible.


