Why is the outer unit normal unique for $C^k$ boundaries Let $U$ be a bounded open set with $C^k$-boundary, i.e. there is a $C^k$-function $f:\mathbb{R}^n\rightarrow\mathbb{R}$ s.t. $$U=\{x\in\mathbb{R}^n:f(x)>0\}, \quad \partial U=\{x\in\mathbb{R}^n:f(x)=0\} \ \ \text{and} \ \ \nabla f(x)\neq 0, \ x\in\partial U. $$ We can define outer unit normal $\nu$ at the boundary $\partial U$ as $$\nu(x)=-\frac{\nabla f(x)}{|\nabla f(x)|}, \ x\in\partial U.$$ My question is, why $\nu$ is well-defined, i.e. independent of the choice of $f$? If there is another function $g:\mathbb{R}^n\rightarrow\mathbb{R}$ satisfying the same conditions as $f$, does it follow that $\nu_f=\nu_g$? Can this be generalized for less smooth boundaries? All help is welcome.
 A: Since we are given $\nabla f \ne 0$ wherever $f=0$, we know $0$ is a regular value for $f$ and thus (by the regular value theorem) $\partial U$ is a $C^1$ submanifold, with tangent space $$T_x \partial U = \ker df(x) = \nabla f(x)^\perp.$$
The same argument applies  to $g,$ so we know that $\nabla f$ and $\nabla g$ are proportional. Since $\nu$ is manifestly unit-length, we just need to check that $\nabla f$ and $\nabla g$ point in the same direction, i.e. $\langle \nabla f, \nabla g \rangle > 0$. To do so, we consider the curve $$\gamma(t) = x + t \nabla f(x)$$ for small $t$. Since $\gamma'(0) = \nabla f(x)$, the chain rule tells us $(f \circ \gamma)'(0) = |\nabla f|^2 > 0$; so we know $f(\gamma(t)) > 0$ for small positive $t$. This means the curve is moving in to $U$ (by the fact $U = \{ f > 0 \}$); so we must also have $g(\gamma(t)) > 0$ for small positive $t$ and $g(\gamma(0))=0.$ Thus $$(g \circ \gamma)'(0) = \nabla g \cdot \gamma'=\langle \nabla f, \nabla g \rangle \ge 0.$$ Since we already know the vectors are nonzero and proportional, this inequality must be strict, so we are done.
Regarding the regularity, we just need the domain (i.e. $f,g$) to be $C^1$, both to define the normal in the first place and for the regular value theorem to work. I don't think anything less smooth will give you a globally defined normal vector; but if you're willing to accept an almost-everywhere normal then you should be able to replace $C^1$ with Lipschitz.
