Question about the definition of covariant derivative Let $S \subset \mathbb {R}^3$ be a surface, and $X(S) = (\text{tangent vector field on S})$
Then for $X,Y \in X(S)$, the covariant derivative is defined as $$\nabla_X Y = \text {tangent component of }(D_X Y)$$ where $D$ is the directional derivative.
My question is, since $X,Y \in X(S)$, why do we still need to take the tangent component? Why don't the covariant automatically lies on $X(S)$
Thank you!
 A: Since the definition of $D_X Y$ is local, we may as well replace $S$ with  some open, connected subset that has a (unit) normal vector field $N$. Then, $D_X Y$ is in $\mathcal{X}(S)$ iff $$(D_X Y) \cdot N = 0. $$
The Leibniz rule and the fact that $Y \in \mathcal{X}(S)$ give
$$(D_X Y) \cdot N = D_X (Y \cdot N) - Y \cdot D_X N = - Y \cdot D_X N ,$$
and so to show that $D_X Y$ need not always be in $\mathcal{X}(S)$ we can just as well show that $Y \cdot D_X N$ need not always be zero.
Again by the Leibniz rule, $D_X N \cdot N = \frac{1}{2}D_X (N \cdot N) = \frac{1}{2}D_X 1 = 0$, so $D_X N$ is tangent to $S$. If we had $D_X N = 0$ for all vector fields $X$ on $S$, then all of the normal vectors $N_u$ would be parallel, but for most surfaces $S$ this is not true. So, we can just fix some surface $S$ and vector field $X$ for which $D_X N$ is nonzero at some point $u$. Then, just choose $Y$ to be any vector field not orthogonal to $D_X N$ at $u$---certainly $D_X N$ itself suffices---and then $Y \cdot D_X N \neq 0$ as desired.
(In fact, one can show that if all of the normal vectors $N_u$ are parallel, then $S$ is planar, i.e., an open subset of a plane. In that sense the additional step of projection is necessary for all nonplanar surfaces.)

Alternatively, one can just compute $D_X Y$ for some suitable example. For example, consider for any $A \in \Bbb R^3$ the infinitesimal rotation $\bf A$, namely the vector field on $\Bbb R^3$ whose value at a point $u \in \Bbb R^3$ is
$${\bf A}(u) := A \times u .$$ Since the unit sphere $S^2 \subset \Bbb R^3$ is invariant under rotations, any infinitesimal rotation $\bf A$ restricts to a vector field on $S^2$, that is, ${\bf A} \vert_{S^2} \in \mathcal{X}(S^2)$. Now, for any $A, B \in \Bbb R^3$, compute $D_{\bf A} {\bf B}$.

(In fact, $D_{\bf A} {\bf B} = B \times (A \times {\bf X})$, where ${\bf X}(u) := u$ is the Euler vector field.)

