Smooth spectral decomposition of a matrix Let $A : x \mapsto A(x)$ be a $C^\infty$ map from the half-plane $\left\{ (x_1,x_2,\cdots,x_n) \in \mathbb{R}^n,\ x_n>0\right\}$ to the space of symmetric matrices with real coefficients. Suppose that $\dim \ker A(x)$ is constant on the half-plane. Then for all $x$ we can find an orthogonal matrix $P(x)$ such that $^tP(x) A(x)P(x)$ is a diagonal matrix. 


*

*Can we find a map $P$ such that $x\mapsto P(x)$ is regular ($C^\infty$ would be perfect but $C^1$ also good) ?

*Are projections on the eigenspaces regular?

*If $A(x)$ is definite positive for all $x$ in the half-plane, is the square-root of $A(x)$ regular?

*If now, we suppose that $P$ is only invertible (but we still have $^tP(x) A(x)P(x)$ is a diagonal matrix), can $P$ be regular ?


If the answer is no for one of this question, do you have a counterexample? If this answer is yes but if we assume more regularity of $A$ (for example real analytic), please tell me. Any references would be appreciated.

Apart from point 3 the answer is clearly negative. Take two matrices $A_1,A_2$ requiring different $P$, and then take $A(x)=f(x)A_1+g(x)A_2+I$ where $f$ is a smooth function supported on $(0,1]$ and $g$ is a smooth function supported on $[1,+\infty)$ (in particular $A(1)=I$). Then clearly $P$ cannot be regular at $x=1$. (By the way I don't see what you hope to gain by restricting $x$ to a half-space.) Just requiring $P$ to be invertible rather than orthogonal (and supposedly changing ${}^tP$ into $P^{-1}$ so that we are still talking about conjugation) makes no big difference. We can take the characteristic polynomials of $A_1,A_2$ to have simple roots; then the columns of $P(x)$, which must be eigenvectors of$~A_i(x)$, are limited to be scalar multiples of the columns of an orthogonal choice for $P$, and the scalar cannot be zero or tend to zero as $x\to1$ (that would give a non-invertible matrix $P(1)$). But this means there is no way to reconcile the left and right limits of $P(x)$ at $x=1$ in a continuous manner.
As for 3., it is true. The map $S\mapsto S^2$ from the set of positive definite symmetric matrices to itself is bijective (for this use that the eigenspaces of $S^2$ are identical to those of $S$), smooth, and has injective derivative (a small computation, for which we can assume that $S$ is diagonal), so the local inversion theorem says its inverse is smooth. (This does not remain true if we extend to semi-definite matrices.)
