Show that the outward unit normal is smooth vector field

Exercise 2.1.8 of Guillemin and Pollack asks us to prove that if $X^m \subset \mathbb{R}^n$ is an embedded submanifold with boundary, then the outward unit normal to $\partial X$ is a smooth function $\partial X \to \mathbb{R}^n$.

By a partition of unity we can get a smooth vector field consisting of outward-pointing vectors. Then intuitively, we want to project from $T_x(X)$ onto $T_x(\partial X)^\perp \subset \mathbb{R}^n$ at each $x \in \partial X$, and then normalize. What's troubling me is demonstrating that the projection is a smooth operation. Normally I'd just like to take slice charts for $X$ and $\partial X$, but these don't necessarily preserve orthogonality.

(I think this would all be OK if I was comfortable thinking about the induced Riemannian metric on $X$ and $\partial X$ from $\mathbb{R}^n$, but I haven't gotten that far yet.)

The projection can be obtained as follows: choose a smooth set of vector fields $X_i$, $1\le i < m$ spanning $T \partial X$, and use Gram Schmitt to orthonormalize them -- I will use the same letter to denote the result, for simplicity. Then consider any smooth vector field $Y$ in $TX$, transversal to $\partial X$ along $\partial X$, and consider $$Z:= Y-\sum_i <X_i, Y>X_i$$ This will be normal to $\partial X$ in $TX$ and everywhere nonzero. Then normalize $Z$. All operations are obvously smooth (why?), so the result is smooth.
• Neither $X$ nor its boundary is assumed orientable, so I think we will have to settle for those vector fields existing locally. But of course doing so locally is OK, because smoothness is local, and there is no question of the various locally-defined functions disagreeing (I think). – Eric Auld Aug 28 '15 at 9:35
We know that if $X \subset \mathbb{R}^N$ is a $k$-dimensional manifold, then $T_x(X)$ is a $k$-dimensional linear subspace of $\mathbb{R}^N$. Moreover, $\partial X$ is a $(k-1)$-dimensional manifold submanifold, so $T_x(\partial X)$ is a $(k-1)$-dimensional subspace of $T_x(X)$. So the orthogonal complement $T_x(\partial X)^\perp$ in $T_x(X)$ has dimension 1, and thus contains exactly 2 vectors of unit length, which we will call $u$ and $-u$. If $\phi$ is a parametrization of $x \in \partial X$ with $\phi(0) = x$, then $T_x(X) = \text{Im}\,d\phi_0$, so there must exist some vector $w$ in $\mathbb{R}^k$ such that $d\phi_0(w) = u$. By linearity, we have that $d\phi_0(-w) = -u$, so that if $u \in H_x(X)$, then $w \in H^k$, and $-w \notin H^k$, so that $-u \notin H_x(X)$. Similarly, $-u \in H_x(X)$ implies $u \notin H_x(X)$.
Let $\vec{n}(x)$ be the outward pointing normal. We first note that in the proof that $\partial X$ is a submanifold of $X$, we parametrized $\partial X$ by $\partial \phi: \partial H^k \to \partial X$. Hence, $T_x(\partial X)$ is the span of $d\phi_{\phi^{-1}(x)}(e_1)$, $\dots$ , $d\phi_{\phi^{-1}(x)}(e_{k-1})$, where $e_1, \dots, e_k$ are the standard basis vectors for $\mathbb{R}^k$. In particular, as $d\phi_p$ depends smoothly on $p$, and $\phi^{-1}(x)$ depends smoothly on $x$, then $T_x(\partial X)$ is the span of $k-1$ vectors that depend smoothly on $x$.
Now, we have that $d\phi_{\phi^{-1}(x)}(-e_k)$ also depends smoothly on $x$ for the same reasons, and by the definition and well-definedness of $H_x(X)$, we know that $d\phi_{\phi^{-1}(x)}(-e_k)$ is a vector in $T_x(X)$ that does not lie in $H_x(X)$. If $d\phi_{\phi^{-1}(x)}(-e_k)$ is orthogonal to $T_x(\partial X)$, we are done, but generally that will not be the case. If not, then we apply Gram-Schmidt:$$\vec{n}'(x) = d\phi_{\phi^{-1}(x)}(-e_k) - {{d\phi_{\phi^{-1}(x)}(-e_k) \cdot d\phi_{\phi^{-1}(x)}(-e_1)}\over{d\phi_{\phi^{-1}(x)}(-e_1) \cdot d\phi_{\phi^{-1}(x)}(-e_1)}}d\phi_{\phi^{-1}(x)}(-e_1) - \dots$$$$- {{d\phi_{\phi^{-1}(x)}(-e_k) \cdot d\phi_{\phi^{-1}(x)}(-e_{k-1})}\over{d\phi_{\phi^{-1}(x)}(-e_{k-1}) \cdot d\phi_{\phi^{-1}(x)}(-e_{k-1})}}d\phi_{\phi^{-1}(x)} (-e_{k-1}).$$Then take $\vec{n}(x) = \vec{n}'(x)/|\vec{n}'(x)|$. This is a smooth function in $x$, as each of the $d\phi_{\phi^{-1}(x)}(-e_j)$ are smooth functions of $x$.