TITLE: boundary defining functions
QUESTION [5 upvotes]: Suppose that $M$ is the interior of a compact manifold with boundary $\partial M$. I'm often faced with so called boundary defining functions - or just 'defining functions'. That are by definition  functions $f \in C^{\infty}(\overline{M})$ with the following properties:
(i) $f(x) > 0 \ \forall x \in M$
(ii)$f(x) = 0 \Leftrightarrow x \in \partial M$ 
(iii) $df \neq 0 \ on \  \partial M$
I need to know what the third property does exactly mean. Often it also is just referred as "has no zeroes on the boundary", "... has a non-vanishing differential there" or "has a non-degenerate differential there".
For me, the differential of a map $f: M \rightarrow N$ at a point p is a linear map 
$df_p : T_pM \rightarrow T_{f(p)}N$. 
Does property (iii) mean:
For $v \in T_pM$ with $df_p(v)=0 \Rightarrow v = 0$ (That would be the interpreation: For every point on the boundary, the differential has no other zero than the zero vector.)
Or does it mean: The differential at the point p isn't the zero map, in other words: For every point p on the boundary $\exists v \in T_pM$ with $df_p(v) \neq 0$
Thank you for your help!
Robin

REPLY [7 votes]: Since $f:\bar{M} \to\mathbb{R}$, and the target space $\mathbb{R}$ is one-dimensional, the statement $df\neq 0$ is equivalent to saying that $df$, as a map between smooth manifolds (with boundary), is surjective. So the conditions imply that 0 is a regular value of $f$ and all that entails (in particular $\partial M$ is a submanifold). 
Perhaps it is clearer to give an example of what may go wrong when $df$ is not required to be everywhere non-zero along $\partial M$. Consider $M$ to be the two dimensional submanifold of $\mathbb{R}^2$ given by $\{y^3 > x^2\}$. The boundary set is given by $\{ y^3 = x^2\}$. We can putatively consider $f(x,y) = y^3 - x^2$ as a candidate for a defining function: it is positive in the interior of $M$, and it vanishes on the boundary. But you note that 
$$ df = 3y dy - 2x dx $$
vanishes at the origin. And precisely at the origin you see that there is a problem: the one dimensional boundary has a cusp point there, and $\partial M$ is not a smooth submanifold of $\mathbb{R}^2$.