Proving lagrange-multipliers rule on regular surfaces Let $U\subset \mathbb R^n$, and let $F,g:U\rightarrow \mathbb R$ smooth functions. $0$ is a regular value of $g$. I neew to show that if $p \in U$ is a maximum/minimum point in $g^{-1}(0)$, then exists $\lambda \in \mathbb R$ such that $(\nabla F)(p)=\lambda (\nabla g)(p)$ (that is, proving lagrange-multipliers rule). My approach: I know that $g^{-1}(0)$ is a regular surface. I defined $f=F|_{g^{-1}(0)}$. I wanted to show:
(a) that $(Df)(p)=0$ 
(b) find the connection between $(Df)$ and $(DF)$. 
in both parts, my problem is I didn't understand exactly how the definition of $(Df)$ connected to the global $(DF)$. how should I solve that?
 A: Let's call $M$ the set $g^{-1}(0)$, which is a (smooth enough) manifold by the inverse function theorem. 
Then $f = F|_M$, right? And $M \subset \Bbb R^n$. 
Now 
$$
DF: T\Bbb R^3 \to T\Bbb R
$$
but it's conventional to identify the tangent space to $\Bbb R^n$ at a point $p$ with just $\Bbb R^n$ itself. That is to say, $DF(p)$ is a linear map from $T_p \Bbb R^3 \to T_{F(p)} \Bbb R$, but we often regard it as a map from $\Bbb R^3$ to $\Bbb R$. 
What about $Df$? Well, that should be a map 
$$
Df: TM \to T\Bbb R,
$$
so that $Df(p)$ is a map from $T_p M \to T_{f(p)} \Bbb R$, but once again, we tend to simplify the target to just $\Bbb R$. What about the domain? Well, the tangent plane to the surface $M$ at the point $p$ is a plane in 3-space. And such a plane (in coordinates) consists of a bunch of vectors in 3-space (although not all vectors). Hence $Df(p)$ is a map from a subspace of $\Bbb R^3$ to $\Bbb R$. 
Furthermore, for a vector $v \in T_p(M)$ (which is also in $T_p (\Bbb R^3)$!), we have
$$
Df(p)[v] = DF(p)[v].
$$
If you like to think of $Df(p)$ and $DF(p)$ as matrices, then the matrices for the two maps are identical. The only difference is that the domain of the function defined by the matrix for $Df(p)$ is a plane in $\Bbb R^3$ rather than all of $\Bbb R^3$. 
Why are the functions/matrices equal? If you consider the inclusion map $i: M \to \Bbb R^3$, and note that $f(p) = F(i(p))$, and then apply the chain rule, you'll see why. 
