About the second fundamental form 
Let $U\subset\mathbb R^3$ be an open set, and $f:U\to \mathbb R$ be a smooth function. Suppose that the level set $S=f^{-1}(\{0\})$ is non-empty, and that at each $p\in S,$ the gradient $\overrightarrow \nabla f(p)$ is not the zero vector. Then $S$ is a smooth two-dimensional surface in $U$, and $p\mapsto \overrightarrow \eta(p)=\frac{1}{||\overrightarrow \nabla f(p)||}\overrightarrow \nabla f(p)$ defines a smooth unit-length normal vector field along $S$. At each $x\in U,$ write $H(f)_{(x)}$ for the $3\times 3$ Hessian matrix specified by $$(H(f)_{(x)})_{ij}=\frac{\partial^2f}{\partial x_i\partial x_j}(x).$$
  Show that, at each $p\in S$, the second fundamental form $II_p: T_p(s)\times T_p(s)\to \mathbb R$ is the symmetric bilinear map 
  $$II_p(\overrightarrow v,\overrightarrow w)=\frac{-1}{||\overrightarrow \nabla f(p)||}\overrightarrow v\cdot H(f)_{(p)}\overrightarrow w,$$for all $\overrightarrow v ,\overrightarrow w \in T_p(s)$. 
(Here, we view the tagent space $T_p(S)$ as the two-dimensional subspace $(span\{ {\overrightarrow \eta(p)}\})^{\bot}$ of $\mathbb R^3$.
Edit: Actually my question is why the second fundamental form under the usual definition can be written in this way.
Definition: The quadratic form $II_p$, defined in $T_p(S)$ by $II_p(v)=-<d  N_p(v),v>$ is called the second fundamental form of $S$ at $p$, where $dN_p:T_p(S)\to T_p(S)$ is the differential of the Gauss map.

Hopefully, I express this problem explicitly. I was just wondering how to prove this statement. 
I took a diffrential geometry class last semester, and when I organized my notes this morning, I found this statement, but there was no proof...
Looking forward to an understandable explaination. Thanks in advance.

Edit 2:Furthermore, show that, at each point $p\in S$, the expression
  $$\phi_p(z)=det\pmatrix{-H(f)_{(p)}-zI_{3\times 3} & \overrightarrow \nabla f(p)\\\ \pm \overrightarrow \nabla f(p)& 0}$$
  (the underlying matrix here is $4\times 4$) defines a second-degree polynomial whose roots $\lambda_1$ and $\lambda_2$ are $||\overrightarrow \nabla f(p)||k_1$ and $||\overrightarrow \nabla f(p)||k_2$, where $k_1$ and $k_2$ are the principal curvatures of $S$ at $p$.
Also, if a non-zero vector $\pmatrix {\overrightarrow v \\c}$ lies in the kernel of the $4\times 4$ matrix $$\pmatrix{-H(f)_{(p)}-\lambda_jI_{3\times 3} & \overrightarrow \nabla f(p)\\\ \pm \overrightarrow \nabla f(p)& 0},$$
  then $\vec v$ is a non-zero element of $T_p(S)$ and lies in the "principal direction" corresponding to $K_j$.

 A: I will use the notation $df_p$ rather than $\vec{\nabla}f(p)$.
First, we differentiate the function $N : p \mapsto \frac{df_p}{\|df_p\|}$ and get
$$dN_p(v) = \frac{H(f)_pv}{\|df_p\|} - \frac{df_p \cdot H(f)_pv}{\|df_p\|^3} df_p .$$
Therefore
$$\langle dN_p(v),w \rangle = \frac{\left
((df_p \cdot df_p) w - (df_p\cdot w)df_p\right)H(f)_pv}{\|df_p\|^3} \\ = \frac{\left
(df_p \wedge(w \wedge df_p)\right)H(f)_pv}{\|df_p\|^3} = \frac{w H(f)_p v}{\|df_p\|}.$$
For your second question, first of all it is not difficult to see that $\phi_p$ is a second-degree polynomial.
Notice that by properties of second fundamental form, $\|df_p\|k_1$ and $\|df_p\|k_2$ are eigenvalues of $-H(f)_p$ with eigenvectors "principal direction" corresponding to $k_1$ and $k_2$ respectively, denoted $v_1$ and $v_2$. Thus it is clear that the vectors $(v_i,0)$ lie in the kernel of
$$\pmatrix{-H(f)_{(p)}-\|df_p\|k_i I_{3\times 3} & \overrightarrow \nabla f(p)\\\ \pm \overrightarrow \nabla f(p)& 0}.$$
Hence $\phi_p(\|df_p\|k_i) = 0$ for $i= 1,2$. 

EDIT (to clarify the two points mentioned in your comments):


*

*$\phi_p$ is at most a third-degree polynomial. If we develop the determinant, the summand of $z^3$ is necessary the product of diagonal coefficients, which is zero. 

*Firstly, $v_i$ is in the kernel of $-H(f)_{p}-\|df_p\|k_i I_{3\times 3}$. Since $v_i$ lies in the tangent space and $df_p$ is a normal vector, one also has $df_p\cdot v_i = 0$. So the product of this $4\times 4$ matrix by $(v_i,0)$ is zero.

