Eigenvectors of symmetric positive semidefinite matrices as measurable functions I'm currently interested in how discontinuous can get the eigenprojections of a continuous function taking values in a particular subspace of symmetric matrices.
I've been searching everywhere for an answer to this problem. I've even looked into T. Kato's book on Perturbation Theory for Linear Differential Operators, and everywhere here on MO. A relatively close question can be found here: http://goo.gl/PlrjpZ. However, most of the results I could find dealt with analytic/holomorphic/continuously differentiable functions or gave counterexamples where the discontinuities happened precisely when the dimension of the eigenspaces changed.
Suppose you have a continuous function $X(t)$ where $t\in\mathbb{R}_+$, taking values in $S_d^+$, the space of $d\times d$ symmetric, positive semidefinite matrices. Let $\lambda_1(X(t))\geq \ldots \geq \lambda_d(X(t))$ denote the ordered eigenvalues of $X(t)$. Suppose that if $\lambda_i(X(0))\neq \lambda_j(X(0))$ or $\lambda_i(X(0))= \lambda_j(X(0))$, then the same relation is true at all times $t\geq0$. With this, for all different eigenvalues, the eigenspaces have constant dimension. Under this context,
1) is there any way to define matrix-valued functions $P(t)$ such that $P(t)^\prime X(t) P(t)=diag(\lambda_1(X(t)), \ldots, \lambda_d(X(t)))$ for all $t\geq 0$ outside of a null set (w.r.t. the Lebesgue measure) in such a way that $P(t)$ is continuous outside of a (possibly different) null set? 
2) Can we define a measurable mapping $f:S_d^+\to M_{d,d}$ (where $M_{d,d}$ is the space of $d\times d$ real matrices) such that $f(A)^\prime A f(A)=diag(\lambda_1(A),\ldots,\lambda_d(A))$ for all $A\in S_d^+$? 
3) Is any of the two possible if we add more conditions while still allowing for eigenvalues to have multiplicity greater than 1?
I'm more interested in the second question. In fact, I believe I have (at least partially) found the answer to the first question. In Kato's book, p. 569, he describes a way to obtain the eigenprojections as continuous functions of time whenever the our matrix-valued function $X(t)$ has a constant amount, say $s(X(t))=s$, of different eigenvalues, denoted $\{\mu_h(t)\}$ (which is equivalent to what I described before, since the eigenvalues are also continuous functions of time). In fact, different eigenvalues have compact disjoint graphs up to a fixed time $t>0$ on $[0,t]\times\mathbb{R_+^s}$. Hence, we may take $\delta(t)>0$ such that if we draw circles $\Gamma_h(u)$ (on the complex plane) of radii $\delta(t)$ around $\mu_h(u)$ for all $h=1,\ldots, s$ and $0\leq u\leq t$, they never intersect each other. The resolvent $R(X(u),z)=(X(u)-zI_d)^{-1}$ is then a continuous function on the graph of such circles and we may compute the eigenprojections as continuous functions of $u$ through the integrals
$$ -\frac{1}{2\pi i}\int_{\Gamma_h(u)}R(X(u),z)dz .$$
I'm not entirely sure if the previous procedure is correct. However, if what I did is completely fine, then we would have found a positive answer to my first question (where we may even set those null sets as the empty sets).
Regarding the second question, I believe that setting $R(A,z)=\Delta$ (the point at infinity in $S_d^+$) whenever $z$ is an eigenvalue of $A$, then the resolvent is jointly continuous in its arguments (w.r.t. the topology of the one-point compactification). The previous paragraph would then imply that we may take $f(A)$ to be (at least locally) continuous whenever $s(A)$ is constant (that is, if $A_n\to A$ and $s(A_n)=s(A)$ for all but finitely many $n$, then $f(A_n)\to f(A)$), then $f$ seems to be fairly well behaved. However, I do not know if this is enough to conclude that $f$ is measurable.
I'm fully aware that I might have made a lot of terrible mistakes in the previous paragraphs. However, I had never dealt with this kind of problems, so I'd be more than grateful if you could let me know if what I did is somewhat reasonable, and if you can give me more insight into this problem. Thanks in advance.
 A: Here is an argument using a bit of real algebraic geometry.   Denote by $\newcommand{\eS}{\mathscr{S}}$ $\eS^n_+$ the cone of positive semi-definite symmetric $n\times n$ real matrices. $\newcommand{\bR}{\mathbb{R}}$ $\newcommand{\eI}{\mathscr{I}}$ $\eS_+^n$ is a semi-algebraic subset of the vector space of symmetric matrices. Consider now the incidence set
$$ \eI:=\bigl\{\; (S,\lambda, v)\in \eS_+^n\times \bR\times\bR^n;\;\;Sv=\lambda v,\;\;|v|=1\;\bigr\}. $$
This set is also  semialgebraic and it comes with  a natural projection $\pi: \eI\to\eS_+^n$.   A nontrivial result in real-algebraic geometry  shows that  $\eS_+^n$ admits a finite  stratification $\newcommand{\eX}{\mathscr{X}}$  $\eX$ with strata contractible   semi-algebraic topological manifolds $X_1, X_2,\dotsc , X_N\subset \eS_+^n$    such that for each stratum $X_k$ the induced map
$$\pi^{-1}(X_k)\to X_k $$
is  topologically a locally trivial fiber bundle. The fiber  of $\pi$ over a given matrix $S$ consists of a disjoint union of spheres, namely the unit spheres in the eigenspaces of $S$. Clearly these  fiber bundles are trivial since they have contractible bases.
Remark.  There is nothing special about $\eS_+^n$. The argument  works with $\eS_+^n$ replaced by any semi-algebraic  set of symmetric matrices. In this case the meta-theorem  Cristian Rempling was referring to is a very powerful result in tame geometry called the Definable Selection Theorem. It implies that the diagonalizations you are looking  can be  chosen to be semi-algebraic. In particular, they  are  measurable.
