Is there a theory that describes eigenspaces of matrix functions near degeneracies? Let $X$ be a smooth manifold and let $h$ be a smooth map from $X$ to hermitian $N \times N$ matrices. Under favorable circumstances (one sufficient condition: all eigenvalues of $h(x)$ are simple for every $x \in X$) this datum determines a number of vector bundles over $X$ whose fibers are eigenspaces of $h(x)$. These bundles are all subbundles of a fixed trivial bundle with fiber $\mathbb C^N$, whose direct sum is the whole trivial bundle.
More generally one could consider the situation in which the above is true generically but fails on some locus $Y \subset X$ (e.g. the subset of $X$ on which $h(x)$ does not have simple spectrum). One nice example is $X= \mathbb R^3$, $h(x) = \begin{bmatrix} x_3 & x_1 - \mathrm{i} x_2 \\ x_1 + \mathrm{i} x_2 & -x_3 \end{bmatrix}$ for which the "bad locus" is $\{ 0 \}$.
I would like to know if there is some general theory which describes the behaviour of eigenspaces at "bad points". I suspect that this problem should have interesting local and global aspects; I am interested in both.
 A: Question: "I would like to know if there is some general theory which describes the behaviour of eigenspaces at "bad points". I suspect that this problem should have interesting local and global aspects; I am interested in both."
Remark: I post this remark since one of the tags is an "algebraic geometry" tag: Let $k$ be the real numbers and let $K$ be the complex numbers.
Let $A:=k[x_1,x_2,x_3]/(f)$ where $f:=x_1^2+x_2^2+x_3^2-1$. We may view the "zero set" $Z:=V(f)$ as a "sub set" of real affine 3-space $\mathbb{A}^3_{k}:=Spec(k[x_1,x_2,x_3])$. If $h(x)$ is your matrix, you get the following:
$$ h(x) \circ h(x) = (x_1^2+x_2^2+x_3^2)I(2)$$
where $I(2)$ is the $2 \times 2$ identity matrix and $\circ$ denotes matrix multiplication. Here we view $h(x)$ as an element of $Mat(K[x_1,x_2,x_3],2)$ -
the ring of $2\times 2$-matrices with coefficients in $K[x_1,x_2,x_3]$.
Hence if $Z:=V(x_1^2+x_2^2+x_3^1-1) \subseteq X:=\mathbb{A}^3_{k}$ is the real 2-sphere and if you consider the complexification $Z_K:=K\times_k Z$ and restrict the matrix $h(x)$ to $Z_K$, you get a $2\times 2$-matrix
$$ h(x) \in Mat(K\otimes_k A,2)$$
with the property that $h(x) \circ h(x)= I(2) \in Mat(K\otimes_k A,2)$. If $\phi:=\frac{1}{2}(h(x) +I(2)) \in Mat(K\otimes_k A,2)$ you get an idempotent element:
$$ \phi \circ \phi = \phi$$
and to $\phi$ you get a finite rank projective $K\otimes_k A$-module $E(\phi)$. To this you get a finite rank algebraic vector bundle on the complex 2-sphere $Z_K$. If $B:=K[x_1,x_2,x_3]$ it follows $\phi \in Mat(B,2)$ is a $2\times 2$-matrix  with the property that when you restrict it to the complex 2-sphere, it is an idempotent and defines a vector bundle. Let $E:=\tilde{B^2}$ be the trivial vector bundle of rank 2 on $B$ and let $F:=\tilde{(K\otimes_k A)^2}$ be the trivial rank $2$ vector bundle on $K\otimes_k A$. The map $\phi$ gives a morphism of vector bundles (or $B$-modules)
$$\phi: E \rightarrow E$$
with the property that when you restrict it to the complex 2-sphere $Z_K$ and $F$
$$\phi: F \rightarrow F$$
it is an idempotent and defines a vector bundle on $K\otimes_k A$. Let $L_1:=ker(\phi)$ and $L_2:=Im(\phi)$. It follows there is an exact sequence of $K\otimes_k A$-modules
$$0 \rightarrow L_2 \rightarrow F \rightarrow L_1 \rightarrow 0,$$
and it seems $L_i$ are rank one vector bundles on $K\otimes_k A$. This is phrased in the language of commutative algebra/algebraic geometry.
Example: It seems you may construct a family of examples as follows: If $f_{\beta}:=x_1^2+x_2^2+x_3^2-\beta^2$ with $\beta \in k^*$ and let $A_{\beta}:=k[x_i]/(f_{\beta})$. Let $K\otimes_k A_{\beta}$ be the complexification. If you define the matrix
$$\phi_{\beta}:=\frac{1}{2}(\frac{1}{\beta}h(x)+I(2))\in Mat(K\otimes_k A_{\beta},2)$$
you get an idempotent matrix
$$\phi_{\beta} \circ \phi_{\beta}=\phi_{\beta}$$
and corresponding linebundles $L(\beta)_i$ on $A_{\beta}$.
How do you phrase this in terms of "smooth manifolds"?
Note: If $X$ is any scheme and $E$ is a finite rank locally trivial sheaf (or coherent module) with an endomorphism $\phi$ you may consider the loci of points $x \in X$ where the induced map at the fiber
$$ \phi(x): E(x) \rightarrow E(x)$$
satisfies various conditions. Hence for a scheme $X$ it may be your question may be phrased in terms of degeneracy locies of such morphisms of coherent sheaves.
Example: For simplicity if $X:=Spec(A)$ and $\mathcal{E}$ is a finite rank locally trivial $\mathcal{O}_X$-module, you may view $\phi$ as an element
$$ \phi \in H^0(X, \mathcal{End}(\mathcal{E}))$$
and to $\phi$ you sometimes get a surjection
$$ \phi^* : \mathcal{End}(\mathcal{E})^* \rightarrow \mathcal{O}_X \rightarrow 0$$
and a section $\phi^*: X \rightarrow \mathbb{P}(\mathcal{End}(\mathcal{E})^*)$
of the projection morphism. Here $\mathbb{P}(\mathcal{End}(\mathcal{E})^*)$ is the projective space bundle of $\mathcal{End}(\mathcal{E})$. Similar constructions exist for differentiable manifolds and complex manifolds.
References: For complex manifolds and holomorphic vector bundles you find a treatment of degeneracy locies and Chern classes in the section on the Gauss Bonnet formulas (page 413) in Griffiths/Harris book "Principles of algebraic geometry". Similar constructions can be done for real smooth manifolds and real smooth vector bundles.
