If a function vanishes on the boundary of a domain, its gradient on the boundary is a multiple of normal vector I have seen in many papers that to obtain some results about PDEs is used the following argument:
If $\phi=0$ in $\partial\Omega$ then $\nabla \phi=\dfrac{\partial\phi}{\partial n}n$, where $n$ is the unit vector and  $\dfrac{\partial\phi}{\partial n}$ is the normal derivative.
Do you know how can I obtain some formal proof about this argument?
 A: For the statement to make sense, one needs the boundary $\partial \Omega$ to be smooth, and $\phi$ to be differentiable at a boundary point $p\in\partial \Omega$, at least in the following restricted sense: there is a vector $v$  such that 
$$
\phi(x) = \phi(p)+v\cdot (x-p)+o(\|x-p\|),\quad x\in\overline{\Omega}
$$ 
This vector $v$ is what can be called $\nabla \phi(p)$.
By assumption, $\phi(p)=0$. Let $\gamma$ be any smooth curve contained in $\partial \Omega$ and passing through $p$, say $\gamma(0)=p$. Then 
$$
0 = \phi(\gamma(t)) = v\cdot (\gamma(t)-p)+o(\|\gamma(t)-p\|) =t v\cdot \gamma'(0)+o(\|t\|)
$$ 
Dividing by $t$ and taking $t\to0$ yields $v\cdot \gamma'(0)=0$. Thus, $v$ is orthogonal to every tangent vector to $\partial \Omega$, which means it's parallel to the unit normal vector $n$. 
In conclusion, $\nabla \phi(p)$ is a scalar multiple of $n$, which together with
$$
\frac{\partial \phi}{\partial n} =  \nabla \phi(p)\cdot n
$$
imply 
$$
\nabla \phi(p) = \frac{\partial \phi}{\partial n} \   n
$$
