Theorem: Let $A$ be open and $f:A\subset\mathbb{R}^n\to \mathbb{R}$ such that $f$ is differentiable at $a$. Then, the tangent space of $S_{f(a)}$ at $a$ is contained in the hyperplane $\{D_af(x)=0\}$
My attempt: Let $C$ be a curve completely contained in $S_k$, where $k=f(a)$ and $C(0)=a$. I need to prove the following: $D_af(C'(0))=0$.
Now, by definition of derivative $$\lim_{x\to a}\frac{||f(x)-f(a)-D_af(x-a)||}{||x-a||}$$
Since the limit is the same as the limit approached by paths, then $$\lim_{t\to0}\frac{||f(C(t))-f(C(0))-D_af(C(t)-C(0))||}{||C(t)-C(0)||}$$
Now, we have that $C(t)\in S_k$ for all $t$. This implies that $C(t)=0=C(0)$
Then,
$$0=\lim_{t\to 0}\frac{||D_af(C(t)-C(0)||}{||C(t)-C(0)||}$$ $$=\lim_{t\to 0}\left(\frac{||D_af(C(t)-C(0))||}{t}\right)\cdot\left(\frac{t}{||C(t)-C(0)||}\right)$$
I don't know how to proceed after this. Any help is appreciated. Thanks in advance!
Suppose $v$ is a vector in the tangent space to your level set $S_{f(a)}$. What that means is that there is a curve $\gamma:(-\varepsilon,\varepsilon)\to\mathbb{R}^n$ whose image is contained in $S_{f(a)}$ with $\gamma(0)=a$ and whose velocity vector is $\gamma'(0)=v$. Since the curve is contained in $S_{f(a)}$, you know that $f(\gamma(t))=f(a)$ for all $t\in(-\varepsilon,\varepsilon)$ and therefore its $t$-derivative is zero. By the chain rule $$ \frac{d}{dt}f\circ\gamma(0)=D_xf(a)\cdot \gamma'(0)=D_xf(a)\cdot v $$ thus implying $$ D_xf(a)\cdot v=0 $$ which means precisely that $v$ is in the hyperplane $\{w:D_xf(a)(w)=0\}$.
This is a fact that is used all the time. The differential of a function vanishes along the directions, tangent to the level sets.