Gradient of a function restricted to a submanifold

Let $f$ be a sufficiently smooth function on a manifold $S$. Let $M$ be a sub manifold of $S$. Can someone show how is it then true that $(\text{grad}f|_M)_p$ at a point $p$ (gradient of the mapping $f|_M$ restricted to $M$ at a point $p\in M$) is the orthogonal projection of $(\text{grad}f)_p$ onto $T_p(M)$?

you need a metric: $$g(\operatorname{grad}f,v)=v(f) \qquad g|_M(\operatorname{grad}f|_M,v_m)=v_m(f|_M) \\$$ for all tangent vectors (this is the definition), and if $\operatorname{grad}f = V_o+V_t$ is the orthogonal decomposition in the ambient tangent space $$g|_M(\operatorname{grad}f|_M,v_m)=v_m(f|_M)=v_m(f)=g(\operatorname{grad}f,v_m) =g(V_o+V_t,v_m)=g(V_o,v_m)+g(V_t,V_m)=g(V_t,v_m)$$ so $$g(\operatorname{grad}f|_M,-)=g(V_t,-)$$ which means by definition that they are equal.
• Thank you for the nice answer. I hope you meant $V_t\in T_p(M)$ and $V_0\in T_p(M)^{\perp}$. What does $t$ stand for in $V_t$? Feb 19, 2014 at 13:42