Let $X\subset \mathbb{R}^n$ defined by $ f(\underline{x})=0 $ and assume $f\in C^r$ and $\nabla(f)|_{x_0} \neq 0 $. How can I prove that the tangent plane $T_{x_0}X \subset \mathbb{R}^n $ at $x_0$ is defined by $ \left\langle \underline{x}-\underline{x_{0}},\nabla\left(f\right)|_{x_{0}}\right\rangle $ ?
My first intuition is to use the implicit function theorem, than claim that we can represent the set $X$ as the graph of a function $ \left\{ \left(x_{1},...,x_{n-1},g\left(x_{1},...,x_{n-1}\right)\right)\right\} $ (without loss of generality $ \frac{\partial f}{\partial x_{n}}|_{x_{0}}\neq0 $), but then I'd say that the formula to the tangent plane to $X$ is the tangent plane to the graph of the function $g$ which is given by $ \left\langle \underline{x}-\underline{x_{0}},\nabla g|_{x_{0}}\right\rangle $ (The linear approxination).
I'd appreciated an explanation. Thanks in advance.
Any help would be apprecaitetd. Thanks in advance
Hint. Note that by the implicit function theorem, $$g_{x_i}(x_1,\dots,x_{n-1})=-\frac{f_{x_i}(x_1,\dots,x_{n-1},x_n)}{f_{x_n}(x_1,\dots,x_{n-1},x_n)},$$ that is the vector $\nabla f$ is parallel to vector $(\nabla g,-1)$.