# Does the gradient always point outward of a level surface?

Let $f:\mathbb{R}^n\to \mathbb{R}$ be a differentiable function, with $a\in \mathbb{R}$ a regular value of $f$.

Let $M=f^{-1}((-\infty,a])$. Then $M$ is an $n$-manifold with boundary, whose boundary is $\partial M=f^{-1}(a)$.

Let $p\in \partial M$. Then $T_p\partial M=\{\nabla f(p)\}^{\perp}$.

Question: Does $\nabla f(p)$ point outwards of $\partial M$?

I know it's not true if we take the interval the other way around. E.g. $-1$ is a regular value of $f:\mathbb{R}^2\to \mathbb{R}$, $f(x,y)=-x^2-y^2$, but the gradient of $f$ points inwards of the boundary of $f^{-1}([-1,+\infty))$ which is $S^1$.

In fact, by symmetry, if the answer to the question is positive, I suspect that if we take $M=f^{-1}([a,+\infty))$ then $\nabla f(p)$ always points inwards of $\partial M$.

-
@Mercy: it's a 2-dimensional manifold with boundary, as I stated. This is a known result. For example, it's essentially lemma 1 in page 12 of Milnor's Topology from the differentiable viewpoint. –  lentic catachresis Jan 28 '13 at 17:25

## 3 Answers

I disagree with your interpretation that the gradient of your example function $f = -x^2 -y^2$ points inward. The manifold $M$ is everything outside of the unit sphere. To me, saying the gradient points inward means it points into the manifold. Instead, the gradient points out of the manifold. It just so happens that out of the manifold is radially towards the origin.

It may be you drew this conclusion because you originally defined the manifold as the set of points such that $f$ takes on no more than the value of $a$, but then you changed to consider the set of points corresponding to $f$ no less than the value of $a$ at the end of the question. Reversing these notions reverses what you consider to be part of the manifold.

Edit: I see why you explored that case then. Then yes, as long as you define the manifold to contain points where $f < a$, the gradient will point to where $f$ increases and hence takes on values greater than $a$. This is outward to the manifold when the manifold is defined in this way.

-
The example given at the end is just to illustrate that, if we change the premise, then the conclusion fails. The manifold $f^{-1}([-1,+\infty))$ is the standard ball, its boundary is $S^1$, but the gradient points inward. –  lentic catachresis Jan 28 '13 at 17:56
@BrunoStonek I see what it is you were asking now, and I have added a section to my answer as appropriate. –  Muphrid Jan 28 '13 at 18:04
When it is defined how? The definition I'm using of an outward pointing vector is the standard one, i.e. if $M$ is an $n$-manifold with boundary, $p\in \partial M$ and $\varphi:U\subset \mathbb{H}^n \to M$ is a chart such that $\varphi(0)=p$, then $v\in T_pM$ points outwards of $\partial M$ if it is of the form $d\varphi_0(v)$, where $v\in \mathbb{R}^n$ is such that $v \cdot e_n$ is greater than zero. –  lentic catachresis Jan 28 '13 at 18:09
Forgive me, I meant to say when the manifold is defined in this way. As you pointed out, the gradient may not point outward when the points lying in the manifold correspond to values of $f$ greater than $a$. Whether it is outward or inward depends on how the manifold is chosen to correspond to the scalar field's values. –  Muphrid Jan 28 '13 at 19:01
Ok, but could you give a proof of it? Thanks. –  lentic catachresis Jan 28 '13 at 19:17

By assumption $f(p)=a$ and $\nabla f(p)=: n\ne0$. For $X\in T_p$ we have $$f(p+X)-f(p)=n\cdot X+o\bigl(|X|\bigr)\qquad(X\to0)\ .$$ Now put $X:= \lambda n$ with $\lambda>0$. Then $|X|=\lambda|n|$ and therefore $$f(p+\lambda n)-f(p)=\lambda|n|^2+o(\lambda|n|)=\lambda |n|^2\bigl(1+o(1)\bigr)\qquad(\lambda\to0+)\ .$$ It follows that $f(p+\lambda n)>f(p)=a$ for all suitably small $\lambda>0$, which implies that $n$ points to the outside of $M$.

-
Thank you for your answer, I'll read it carefully. One minor thing though, I'm not used with the o-notation. I could read about it, but perhaps you wouldn't mind phrasing it differently, in which case I would be very grateful :) –  lentic catachresis Jan 28 '13 at 19:38
@Bruno Stonek: I've edited my post slightly; but you better get accustomed to the $o$-notation. –  Christian Blatter Jan 28 '13 at 20:07
What do you mean by "$X\in T_p$"? What is $T_p$? –  lentic catachresis Jan 28 '13 at 20:20
Okay, whatever that is, taking $X=\lambda n$ works fine. I get it now, that does it. Thanks! I hadn't thought of proving the assertion by proving that $p+n\not\in M$, I was thinking of the definition which is a bit unmanageable. –  lentic catachresis Jan 28 '13 at 20:36
In that last comment, I should have said: $p+\lambda n\not\in M$ for all $\lambda>0$ sufficiently small. –  lentic catachresis Jan 28 '13 at 20:52

I have managed to formulate my own proof of this theorem. I give full detail below.

Definition: Let $M$ be an $n$-manifold with boundary, $p\in \partial M$ and $\varphi:U\subset \mathbb{H}^n\to M$ a parametrization such that $\varphi(q)=p$. We say that $v\in T_pM$ is inward-pointing (resp. outward-pointing) if it is of the form $d\varphi_q(v_0)$ with $v_0\cdot e_n>0$ (resp. $v_0\cdot e_n<0$).

Let's check that this definition does not depend on the choice of parametrization, and at the same time give a useful criterion.

Theorem. Let $M$ be an $n$-manifold with boundary, $p\in \partial M$ and $v\in T_pM$. The following are equivalent:

1. There exists a parametrization $\varphi:U\to M$ such that, if $\varphi(q)=p$ and $v=d\varphi_q(v_0)$, then $v_0$ is such that $v_0\cdot e_n>0$.

2. $v\not\in T_p\partial M$ and there exists a curve $\alpha:[0,\epsilon)\to M$ such that $\alpha(0)=p$ and $\alpha'(0)=v$.

3. For every parametrization $\varphi:U\to M$ we have that, if $\varphi(q)=p$ and $v=d\varphi_q(v_0)$, then $v_0$ is such that $v_0\cdot e_n>0$.

Proof: ($1 \Rightarrow 2$) Define $\alpha:[0,\epsilon)\to M$ as $\alpha(t)=\varphi(q+tv_0)$, taking $\epsilon$ small enough for $q+tv_0$ to be in $U$ for all $t$. Then $\alpha(0)=p$, and by the chain rule, $\alpha'(0)=v$.

($2 \Rightarrow 3$) Let $\varphi:U\to M$ be a parametrization with $\varphi(q)=p$ and $v=d\varphi_q(v_0)$. Since $\alpha(0)=p\in \varphi(U)$, we may suppose that $\alpha([0,\epsilon))\subset \varphi(U)$, taking a smaller $\epsilon$ if necessary. We can define then a curve $\beta:=\varphi^{-1}\circ \alpha:[0,\epsilon)\to U$ with $\beta(0)=q$ and $\beta'(0)=v_0$.

Now, $\beta'(0)=\lim_{t\to 0^+} \frac{\beta(t)-q}{t}$. But $\beta(t)-q\in \mathbb{H}^n$ for all $t$, therefore $\beta'(0)=v_0\in \mathbb{H}^n$. Since we further assumed that $v\not\in T_p\partial M$, then $v_0\not\in \partial \mathbb{H}^n$, whence $v_0\cdot e_n>0$.

($3 \Rightarrow 1$) It is obvious. $\blacksquare$

Theorem. Let $f:M\to N$ be a differentiable function between manifolds with boundary. Let $p\in \partial M$ and $v\in T_pM$. If $v$ is inward-pointing, then $df_p(v)\in T_{f(p)}N$ is inward-pointing.

Proof: Let $\alpha:[0,\epsilon)\to M$ be a curve such that $\alpha(0)=p$, $\alpha'(0)=v$. Consider $f\circ \alpha:[0,\epsilon)\to M$. We have $f(\alpha(0))=f(p)$, and by the chain rule, $(f\circ \alpha)'(0)=df_p(v)$. Therefore $df_p(v)$ is inward-pointing. $\blacksquare$

Theorem: Let $f:\mathbb{R}^n\to \mathbb{R}$ be a differentiable function with $a\in \mathbb{R}$ a regular value. So $M=f^{-1}((-\infty,a])$ is a manifold with boundary such that $\partial M=f^{-1}(a)$. Let $p\in \partial M$. Then $\nabla f(p)$ is outward-pointing.

Proof: We first observe that $\nabla f(p)\not\in T_p\partial M$, because $T_p\partial M=\{\nabla f(p)\}^\perp$. Assume by contradiction that $\nabla f(p)$ is inward-pointing.

By considering $f|_M:M\to (-\infty,a]$, by the previous proposition we conclude that $df_p(\nabla f(p))\in \mathbb{R}$ is inward pointing to $(-\infty,a])$. Explicitly, this means that $df_p(\nabla f(p))<0$.

Indeed, a vector $v\in \mathbb{R}$ is inward-pointing to $(-\infty,a])$ if and only if $v\neq 0$ and there exists a curve $\alpha:[0,\epsilon)\to (-\infty,a]$ such that $\alpha(0)=a, \alpha'(0)=v$. Since $\alpha(t)\leq a$ for all $t$, then $v=\alpha'(0)=\lim_{t\to 0^+} \frac{\alpha(t)-a}{t}\leq 0$, therefore $v<0$.

We have thus that $df_p(\nabla f(p))<0$. We reach a contradiction, since $df_p(\nabla f(p))=\nabla f(p)\cdot \nabla f(p)=\|\nabla f(p)\|^2>0$. $\blacksquare$

-