Why can we construct the following method? I read in some papers the following method:
Let $h$  be a $(1,1)$-tensor field on 3-dimensional Riemannian manifold $(M,g)$ and $p\in M$. Then there exists a smooth local orthonormal basis of the form $\{e_1,e_2,e_3\}$  in a
neighborhood of $p$. Now, let $U_1$ be the open subset of $M$ where $h\neq 0$ and let $U_2$ be the
open subset of points $p\in M$ such that $h = 0$ in a neighbourhood of $p$. $U_1\cup U_2$ is an
open dense subset of $M$. On $U_1$ we put $he_1 = \lambda e_1$ where
$\lambda $ is a non-vanishing smooth function.
Remark: we know that $he_3=0$ and $tr h=0$.
I have three question:
Questions:


*

*Can anybody construct a simple example with the above properties such that $U_1\neq \emptyset ,\,\, U_2\neq \emptyset$?

*why can we put $he_1 = \lambda e_1$?

*Why do  we need to construct an open dense subset?


Thanks.
 A: For question 1, take a smooth function $f(x,y,z)$ positive for $x > 0$ and zero for $x < 0$. Let 
$$
h_0 
=
\begin{pmatrix}
1 & 0 & 0 \\
0 & -1 & 0 \\
0 & 0 & 0 
\end{pmatrix}
$$
and then let $h=fh_0$.
Take the standard Euclidean metric on $\mathbb{R}^3$. 
Let $e_1, e_2, e_3$ be the standard basis. Clearly $U_1=(x>0)$ while $U_2=(x<0)$.
Take $\lambda=f$.
For question 2, if we can prove local existence, uniqueness and smoothness of $e_1$ (up to sign) so that $he_1=\lambda e_1$ with $\lambda > 0$ on $U_1$ then we clearly have global existence, uniqueness and smoothness (at least one a 2-1 covering space). So we can work in local coordinates $x,y,z$. We take any orthonormal basis $e_1', e_2', e_3'$. We want to solve $e_1=a e_1' + b e_2' + ce_3'$ so that $1=a^2+b^2+c^2$ and so that $h e_1 = \lambda e_1$ and with $\lambda>0$. Since $h \ne 0$ and has trace zero, and a zero eigenvalue, $h$ has a pair of opposite sign eigenvalues. We calculate that the characteristic polynomial of $h$, in a variable $t$, is $\lambda^2 t - t^3$. We take the coefficient of $t$, and take its positive square root, to get $\lambda$ a smooth function on $U_1$. We have equations for $a,b,c$, and we turn them into an operator 
$$
F(x,y,z,a,b,c)=(h(ae_1'+be_2'+ce_3')-\lambda(ae_1'+be_2'+ce_3'),a^2+b^2+c^2-1).
$$
We compute the matrix
$$
\frac{\partial F}{\partial a,b,c}=\begin{pmatrix}he_1'-\lambda e_1' & he_2'-\lambda e_2' & he_3'-\lambda e_3' \\ 2a & 2b & 2c \end{pmatrix}.
$$
Clearly $F(a,b,c)=0$ just at $ae_1'+be_2'+ce'_3=\pm e_1$.
If the rank of this matrix were to drop at such a point, a vector in the kernel would be precisely an eigenvector of $h$ with eigenvalue $\lambda$ perpendicular to $e_1$, not possible.
By the implicit function theorem, the solutions $\pm e_1$ of $F(a,b,c)=0$ are smooth functions, locally, and locally unique up to $\pm$.
For question 3, try 
$$
h=
\begin{pmatrix}
f & 1 & 0 \\
0 & -f & 1 \\
0 & 0 & 0
\end{pmatrix}
$$
so that $h$ is not diagonalizable at points where $f=0$.
