I am studying Riemannian Geometry from the book by M.P. do Carmo and I am trying to get a complete picture of Connections by working out some examples and in particular I to calculate for the class of sub-manifolds given as a regular level set of a regular value, I'm trying to calculate it for that case. As a corollary, I wish to see the case of sphere, or some other simple manifold.
If $f:\Bbb{R}^n \to \Bbb{R}^k$ where $ (k<n)$ and $p\in\Bbb{R}^k$ be a regular value, then $M = f^{-1}(p)$ will be a regular submanifold of $\Bbb{R}^n$ of dimension $n-k$. Now how to give a connection on $M$?
Any hint will be appreciated. It will be really helpful if one can give a reference to a book, online material or online lecture notes in which similar calculations are done or where sufficient hints are provided.
I assume that by "connection" you just mean "covariant derivative". If this is the case, then you can basically proceed as in the case of hypersurfaces and define the Levi-Civita connection on the submanifold via the orthogonal projection of the "ordinary derivative" to the tangent spaces of $M$. Unfortunately, this is not partiuclarly well adapted to the presentation of a submanifold as the pre-image of a regular value, but it can be formulated in these terms.
In the setup you have, you can view a vector field $\eta$ on $M$ as a smooth function $\eta:M\to\mathbb R^n$ such that for each $x\in M$, the value $\eta(x)$ lies in $T_xM$, i.e. that $df(x)(\eta(x))=0$. Now you can simply differentiate $\xi$ as a function to $\mathbb R^n$ in directions tangent to $M$. Most easily, you can represent a tangent vector to $M$ in $x$ as $c'(0)$ for a smooth curve $c:(-\epsilon,\epsilon)\to M$ such that $c(0)=x$. The derivative of $\eta$ in direction of this tangent vector then is given by $\frac{d}{dt}|_{t=0}\eta(c(t))\in\mathbb R^n$. If you have two vector fields $\xi$ and $\eta$ on $M$, you can use this construction to define a function $\xi\cdot\eta:M\to\mathbb R^n$ whose value in $x$ is the derivative of $\eta$ in $x$ in direction $\xi(x)$. (Alternatively, you can also extend $\eta$ to a smooth function defined on an open neighborhood of $M$ in $\mathbb R^n$ and then use the standard derivative for $\mathbb R^n$-valued functions.)
In general, the value $(\xi\cdot\eta)(x)$ does not lie in the tangent space $T_xM$ and to obtain the value of the covariant derivative $\nabla_\xi\eta$ in the point $x$, one has the project this orthogonally into $T_xM$. So far nothing was specific to the way the submanifold is presented, but one can compute this orthogonal projection using the given presentation. This is particularly easy in the case $k=1$. Here you can use the gradient of $f$ as a normal vector to the tangent space, let me denote it by $grd(f)$ to avoid confusion. In terms of this, you then get $$ \nabla_\xi\eta(x)=\xi\cdot\eta(x)-\frac{\langle \xi\cdot\eta(x),grd(f)(x)\rangle}{\langle grd(f)(x),grd(f)(x)\rangle}grd(f)(x). $$ Alternatively, you can take the normalized gradient $\mathfrak{n}(x):=\tfrac1{\sqrt{\langle grd(f)(x),grd(f)(x)\rangle}}grd(f)(x)$ to write things as $\nabla_\xi\eta(x)=\xi\cdot\eta(x)-\langle\xi\cdot\eta(x),\mathfrak{n}(x)\rangle\mathfrak{n}(x)$.
In this language, things generalize to higher codimensions. Take the components $f_1,\dots,f_k$ of $f$ and form their gradients $grd(f_i)$ for $i=1,\dots,k$. Then apply Gram-Schmidt in each point to change this into a family $\mathfrak{n}_i$ of functions $\mathbb R^n\to \mathbb R^k$ whose values in each point are orthonormal. (It is easy to see that the resulting functions are smooth.) Then you can write the covariant derivative as $$ \nabla_\xi\eta(x)=\xi\cdot\eta(x)-\sum_i\langle\xi\cdot\eta(x),\mathfrak{n}_i(x)\rangle\mathfrak{n}_i(x). $$