I'm studying constrained extrema for functions of two variables and with a single constraint(of equality). So I have a function $f$ and I have to find its constrained extrema in the restriction $E_0=\{(x,y)|g(x,y)=0\}$ where $f,g:A\subseteq \mathbb{R}\to \mathbb{R} $ and $f,g \in C^1(A)$ (where $A$ is open). If $g(x_0,y_0)=0$ and $\nabla g(x_0,y_0)\neq 0$(in this case the point $(x_0,y_0)$ is called regular), by implicit function theorem I can parametrize $E_0$ in a neighborhood of $(x_0,y_0)$, so let's call this curve $\gamma:\mathbf{r}(t)$ (Without loss of generality $\mathbf{r}(0)=(x_0,y_0)$) . A constrained stationary point is regular point such that $(f \circ \mathbf{r})'(t)=0$. Clearly this is equivalent to $\langle \nabla f(x_0,y_0),\mathbf{r}'(0) \rangle=0$. Then my book says that this is equivalent to the fact that "the derivative of $f$ along the direction that is tangent to $E_0$ in $(x_0,y_0)$ is $0$". I think that the book used the fact that: $$ \langle \nabla f(x_0,y_0),\mathbf{r}'(0) \rangle=D_{\mathbf{r}'(0)} f(x_0,y_0)=0 $$ But this is valid iff $\mathbf{r}'(0)\neq \mathbf{0}$. How do we know that? If $\mathbf{r}'(0)= \mathbf{0}$, then it doesn't correspond to a direction. This is giving me many difficulties. Thank you in advance.
Edit: Now that I think about it the geometric intepretation of $\mathbf {r}'(t)$ is the tangent vector in $\mathbf{r}(t)$ to the curve $\gamma$, what would it mean if $\mathbf{r}'(t)=0$, geometrically.
You can of course assume ${\bf r}'(0)\ne{\bf 0}$. This comes from the implicit function theorem:
When $\nabla g(x_0,y_0)\ne{\bf 0}$ you have, e.g., $g_y(x_0,y_0)\ne0$. This implies that there is a window $$W:=[x_0-h,x_0+h]\times[y_0-h,y_0+h]\subset{\mathbb R}^2$$ and a $C^1$ function $$\psi:\quad[x_0-h,x_0+h]\to[y_0-h,y_0+h],\qquad x\mapsto y=\psi(x);\qquad\psi(x_0)=y_0,$$ such that the set $\bigl\{(x,y)\in W\bigm| g(x,y)=0\bigr\}$ coincides with the graph of $\psi$. This implies that you can take $$\gamma:\quad[x_0-h,x_0+h]\to W, \qquad x\mapsto {\bf r}(x):=\bigl(x,\psi(x)\bigr)\qquad(x_0-h<x<x_0+h)$$ in your proof. Here ${\bf r}'(x)=(1,\psi'(x))\ne{\bf 0}$.