Confusion about projection of connection in manifold If $M$ is a submanifold of $S$ and if there is for each point $p$ a mapping $\pi_p$ from $T_{p}(S)$ to $T_{p}(M)$, then we may use the definition of connection on $M$. Assume that $\pi_{p}:T_{p}(S)\to T_{p}(M)$ is a linear mapping and that $\pi_{p}(D)=D$ for every $S\in T_{p}(M)$,and that the relation $p\mapsto \pi_{p}$ is $C^{\infty}$. Now suppose, for each $X,Y$ vector fields in $M$, we define a vector field $\nabla_{X}^{(\pi)}$ on $M$ in the following way:
$$(\nabla_{X}^{(\pi)}Y)_{p}=\pi_{p}((\nabla_{X}Y)_{p}),\quad \forall p\in M \tag{1}$$
Then $\nabla^{(\pi)}$ is a connection on $M$. In particular, if a Riemannian metric $g=\langle \bullet ,\bullet\rangle$ is given on $S$, we may take as $\pi_{p}$ the orthogonal projection with respect to $g$. This is defined such that, for all $D\in T_{p}(S)$ and all $D'\in T_{p}(M)$
$$\langle \pi_{p}(D),D'\rangle_p =\langle D,D'\rangle_{p} \tag{2}.$$
We call such $\nabla^{(\pi)}$ the projection of $\nabla $ onto $M$ with respect to $g.$
I am trying to understand the above definition but find it difficult to visualize it or maybe I am missing something. Let me explain what I have understood (Please correct me if I am wrong.)
We have a submanifold $M$ of a manifold $S$, if we take $X,Y$ two vector fields on $M$ then we know that $\nabla_{X}Y$ need not be a vector field in $M$. So to define the connection on the submanifold $M$, we have defined a linear map $\pi_{p}$ and then we have defined the connection on $M$ by $\nabla^{(\pi)}$ by $(1)$. This is my understanding for $(1)$ and $(2)$, I am not getting how we got that. If someone explain this that will be great help for me, Thanks.
 A: First of all, forget that we are on a manifold.
Let $(E,\langle\cdot,\cdot\rangle)$ be a Euclidean vector space.
Let $F\subset E$ a linear subspace.
Then the orthogonal projection on $F$ $\pi\colon E\to E$ is the unique linear endomorphism of $E$ such that
$$
\forall v \in E,\quad \pi(v)\in F \quad \text{and} \quad v -\pi(v) \perp F.
$$
It is also uniquely determined by the following:
$$
\forall v\in E,\forall w \in F,\quad \langle v,w\rangle = \langle \pi(v),w\rangle.
$$
(this is your equation (2)).
This is a particular case of general projections: the extra assumption is that they satisfy $\mathrm{Im}(\pi)\perp \ker (\pi)$ for the inner product $\langle \cdot,\cdot\rangle$.
As a projection, it takes values onto the subspace on which it projects.
Hence, the orthogonal projection on $F$ takes values in $F$.
Now, go back to a Riemannian manifold $(S,g)$ and consider a submanifold $M\subset S$.
If $x\in M$, then $(T_xS,g_x)$ is an Euclidean vector space, with a distinguished linear subspace given by $T_xM\subset T_xS$.
You can then consider the orthogonal projection on $T_xM$, call it $\pi_x\colon T_xS\to T_xS$.
It takes values in $T_xM$.
If $\nabla$ is the Levi-Civita connection of $(S,g)$, then for two vector fields $X$ and $Y$ on $S$ and for a point $x\in M$, you can consider
$$
\pi_x\left(\nabla_XY(x)\right)\in T_xM.
$$
This gives you a map
$$
x\in M \mapsto \pi_x\left(\nabla_XY(x)\right).
$$
It turns out that $\pi \colon x\mapsto \pi_x$ is a smooth section of $\mathrm{End}(TS|_M)$, from which deduce that in fact
$$x \mapsto \pi_x\left(\nabla_XY(x)\right)$$
defines a vector field on $M$.
This then gives you a map $\nabla^{(\pi)}= \pi\circ \nabla \colon \Gamma(TM)\times \Gamma(TM)\times \Gamma(M)$.
We can show that is in fact an affine connection, and using the fact that $\nabla$ is torsion-free and $g$ is $\nabla$-parallel, we can deduce that it is actually the Levi-Civita connection of $g|_M$ (see here for instance).
