\documentclass[a4paper, 12pt]{article}
\usepackage[left=2cm,right=2cm,
    top=2.5cm,bottom=2.5cm,bindingoffset=0cm]{geometry}
    \usepackage{amssymb, amsthm, amsmath, setspace}
    
    \newtheorem{proposition}{Proposition}[section]
    \newtheorem{corollary}[proposition]{Corollary}
    \theoremstyle{definition}
\newtheorem{definition}[proposition]{Definition}
\newtheorem{remark}[proposition]{Remark}
\newtheorem{exercise}[proposition]{Exercise}
\newtheorem{example}[proposition]{Example}
    
    \newcommand{\R}{\mathbb R}
        \newcommand{\C}{\mathbb C}
                \newcommand{\Z}{\mathbb Z}
                  \renewcommand{\Re}{\mathrm{Re}}
                      \renewcommand{\Im}{\mathrm{Im}}
      \newcommand{\dbyd}[1]{ \frac{\partial}{\partial #1}}
            \newcommand{\dybydx}[2]{ \frac{\partial #1}{\partial #2}}
               \newcommand{\dbydp}[1]{ \frac{d}{d #1}}
          \newcommand{\SO}{\mathrm{SO}}
              \newcommand{\SU}{\mathrm{SU}}
                    \newcommand{\Mat}{\mathrm{Mat}}
                         \newcommand{\SL}{\mathrm{SL}}
                           \newcommand{\Ker}{\mathrm{Ker}\,}
                    \renewcommand{\O}{\mathrm{O}}
                                   \newcommand{\Sym}{\mathrm{Sym}}
                               \newcommand{\U}{\mathrm{U}}
                                       \newcommand{\Id}{\mathrm{Id}}
                               \author{Anton Izosimov}
                               \title{Lecture notes on submanifolds}
                               \date{Last updated on \today}
                               \onehalfspacing
    
    \begin{document}
    \maketitle
    \section{Smooth submanifolds of smooth manifolds}
    Loosely speaking, a manifold is a topological space which locally looks like a vector space. Similarly, a \textit{submanifold} is a subset of a manifold which locally looks like a subspace of an Euclidian space.
    %Manifolds are locally modeled by Euclidian spaces. Similarly, submanifolds are locally modelled by subspaces of 
 \begin{definition}    Let $M$ be a smooth manifold of dimension $m$, and $N$ be its subset. Then $N$ is called a \textit{smooth $n$-dimensional submanifold of $M$} if
 for every $p \in N$ there exists a smooth chart $(U, \phi)$ in $M$ 
such that 
 $p \in U$ and $\phi(N \cap U) = \R^n \cap \phi(U)$, where $\R^n$ is embedded into $\R^m$ as the subspace $\{ x_{n+1} = 0, \dots, x_{m} = 0\}$.%Show that the collection $(U_p \cap N, \phi_p\mid_{U_p \cap N})$, where $p \in N$, is a smooth atlas on $N$ which turns $N$ into a smooth manifold of dimension $m$.
%\par
%In other words,  for every $p \in N$ there exist local coordinates $x_1, \dots, x_n$, defined on some open in $M$ neighborhood $U$ of $p$, such that $U \cap N$ is given by equations $ x_{m+1} = 0, \dots, x_{n} = 0$.
\end{definition}
Equivalently, $N$ is a {smooth $n$-dimensional submanifold of $M$} if $M$ can be covered by charts $(U_\alpha, \phi_\alpha)$ such that $\phi_\alpha(N \cap U_\alpha) = \R^n \cap \phi_\alpha(U_\alpha) $. Yet another equivalent definition: $N$ is called a {smooth $n$-dimensional submanifold of $M$} if for every $p \in N$ there exist local coordinates $x_1, \dots, x_m$, defined on some open in $M$ neighborhood $U$ of $p$, such that $N \cap U$ is given by equations $ x_{n+1} = 0, \dots, x_{m} = 0$. \begin{remark}Instead of saying that  $N \cap U$ is given by equations $ x_{n+1} = 0, \dots, x_{m} = 0$, we will often say that $N$ is locally given by equations  $ x_{n+1} = 0, \dots, x_{m} = 0$, keeping in mind that these equations do not make sense outside $U$, so they actually describe the part of $N$ that is inside $U$.\end{remark}
\begin{remark}
If $n = m$, then  $N \cap U$ is given by an empty set of equations, i.e.  $N \cap U = U$. This means that an $m$-dimensional submanifold of an $m$-dimensional manifold is the same as an open subset of the latter.
\end{remark}
\begin{exercise}[See Problem Set 4]\label{exercise:smoothstructure}
Let $M$ be a smooth manifold of dimension $m$, and $N$ be its smooth submanifold of dimension\,$n$. By definition, this means $M$ can be covered by charts $(U_\alpha, \phi_\alpha)$ such that $\phi_\alpha(N \cap U_\alpha) = \R^n \cap \phi_\alpha(U_\alpha) $. Show that the collection $(N \cap U_\alpha , \phi_\alpha\mid_{N \cap U_\alpha})$ is a smooth atlas on $N$ which turns $N$ into a smooth manifold of dimension $n$.

\end{exercise}
In what follows, when we regard smooth submanifolds as smooth manifolds, we mean the smooth structure constructed in this exercise.
\begin{example}[Graphs of smooth functions of one variable]\label{ex:graph}
Let $f \colon \R \to \R$ be a smooth function. Then its graph $\{ (x,y) \in \R^2 \mid y = f(x)\}$ is a smooth $1$-dimensional submanifold of $\R^2$.
\begin{proof}
Let \begin{align*}x_1 &= x, \\x_2 &= y - f(x).\end{align*} Then the Jacobian of the transformation $(x,y) \mapsto (x_1, x_2)$ is equal to $1$, so $(x_1, x_2)$ can be taken as local coordinates near any point in $\R^2$. In these coordinates, the graph $y = f(x)$ is given by the equation $ x_2 = 0$, which proves that this graph is a smooth $1$-dimensional submanifold. 
\end{proof}
\begin{remark}
In fact, $(x_1, x_2)$ is a global chart. Indeed, the map $(x,y) \mapsto (x_1, x_2)$ has a smooth inverse given by \begin{align*}x &= x_1, \\ y &= x_2 + f(x_1),\end{align*} so this map is a global diffeomorphism $\R^2 \to \R^2$.
\end{remark}
\end{example}
\begin{remark}
Similarly, the graph of a smooth function $x = f(y)$ is also a smooth $1$-dimensional submanifold of the $(x,y)$ plane. Furthemore, if a subset $\Gamma \subset \R^2$ can be represented, near each of its points, either as a graph of a smooth function $y = y(x)$, or as a graph of a smooth function $x = x(y)$, then $\Gamma$ is also a smooth $1$-dimensional submanifold. Indeed, the notion of a submanifold is local, so it suffices to show that $\Gamma$ is a submanifold near each of its points. At the same time, for each point of $\Gamma$ we can either apply the argument of Example \ref{ex:graph} (if near that point we have $y = y(x)$), or the same argument, but with roles of $x$ and $y$ interchanged  (if near that point we have $x = x(y)$).
\begin{example}\label{example:circle}
The circle $x^2 + y^2 = 1$ is a $1$-dimensional submanifold of $\R^2$.
\end{example}
\begin{proof}
Take a point $(x,y)$ in the circle. If $y > 0$, then near that point the circle is the graph of $y = \sqrt{1 - x^2}$, which is smooth since $x \in (-1,1)$. Similarly, if $y < 0$, then the cirlce is given by  $y = -\sqrt{1 - x^2}$. Finally, if $y = 0$, then locally the circle is either the graph of $x = \sqrt{1 - y^2}$, or the graph of $x = -\sqrt{1 - y^2}$, with both functions being smooth.
\end{proof}
\end{remark}
\begin{remark}
Note that the graph of any \textit{continuous} function $y = f(x)$ is a topological manifold, since it is homeomorphic to $\R$. Moreover, any such graph has a smooth structure since $\R$ is a smooth manifold. However, graphs of continuous non-smooth functions are, in general, not smooth \textit{submanifolds} of $\R^2$.
\begin{example}
The graph of $y = |x|$ is not a smooth {submanifold} of $\R^2$.
\end{example}
\begin{proof}
Let $\Gamma$ be this graph. Assume it is a smooth {submanifold} of $\R^2$. This in particular means that there is a chart $(x_1, x_2)$ defined near the point $(0,0) \in \Gamma$ such that $\Gamma$ is locally given by the equation $x_2 = 0$. The latter means that for sufficiently small $t \geq 0$ we have $$x_2(t,t) = 0, \quad x_2(-t,t) = 0.$$Taking the right-hand $t$-derivative of these equations at $t = 0$ and using that for smooth functions it coincides with the usual derivative, we get
$$
\dybydx{x_2}{x}(0,0) + \dybydx{x_2}{y}(0,0) = 0, \quad -\dybydx{x_2}{x}(0,0) + \dybydx{x_2}{y}(0,0) = 0,
$$
which implies
$$
\dybydx{x_2}{x}(0,0) = \dybydx{x_2}{y}(0,0) = 0.
$$
But this means that the Jacobian of the transformation $(x, y) \mapsto (x_1, x_2)$ vanishes at the origin, which contradicts  $(x_1, x_2)$ being a smooth chart.
\end{proof}
Nevertheless, it may still happen that the graph of $y=f(x)$ is a smooth {submanifold} of $\R^2$, even though $f$ is not smooth.
\begin{example}
The graph of $y = \sqrt[3]{x}$ is a smooth {submanifold} of $\R^2$.
\end{example}
\begin{proof}
It is the graph of $x = y^3$, which is smooth.
\end{proof}
\end{remark}
\begin{remark}
We will see later that every smooth {submanifold} of $\R^2$ is locally either a graph of a smooth function $y = y(x)$, or a graph of a smooth function $x = x(y)$.
\end{remark}
\begin{example}[Graphs of smooth maps]
Let $F \colon \R^m \to \R^n$ be smooth. Then its graph $$\Gamma = \{ (x_1, \dots, x_m, y_1, \dots, y_n) \in \R^{m+n} \mid (y_1, \dots, y_n) = F(x_1, \dots, x_m)  \}$$ is a smooth $m$-dimensional submanifold of $\R^{m+n}$.
\begin{proof}
Let $f_1(x_1, \dots, x_m), \dots, f_n(x_1, \dots, x_m)$ be components of $F$. Take new coordinates \begin{align*}\tilde x_1 &= x_1,\\ &\dots\\ \tilde x_m &= x_m,\\ \tilde x_{m+1} &= y_1 - f_1(x_1, \dots, x_m),\\ &\dots\\ \tilde x_{m+n} &= y_n - f_n(x_1, \dots, x_m).\end{align*}
Then the Jacobian of the transformation $ (x_1, \dots, x_m, y_1, \dots, y_n) \mapsto  (\tilde x_1, \dots, \tilde x_{m+n})$ is $1$, so this is indeed a coordinate system near every point. The graph $\Gamma$ is given in these coordinates by $ \tilde x_{m+1} = 0, \dots, \tilde x_{n+m} = 0$, which proves that $\Gamma$ is an $m$-dimensional submanifold.
\end{proof}
\end{example}
\begin{example}\label{ex:sphere}
The sphere $\sum_{i=1}^m x_i^2 = 1$ is a smooth submanifold of $\R^m$ of codimension $1$ (i.e. of dimension $m-1$).
\end{example}
\begin{proof}
Apply the same argument as in Example \ref{example:circle}: near every point of the sphere, one of the variables $x_i$ can be written as a smooth function of other variables, so the sphere is locally a graph of a smooth function of $m-1$ variables.
\end{proof}

\section{Restricting smooth maps to smooth submanifolds}
Most manifolds can be naturally described as submanifolds of something simpler. For example, spheres are defined as submanifolds of Euclidian spaces.  This suggests a way to check smoothness of various objects defined on the sphere, for instance smoothness of maps from the sphere to another manifold: first one checks that the given map is in fact defined and smooth on the whole ambient space, and then one restricts the map to the sphere. So, we need to show that the restriction of a smooth map to a submanifold is smooth. The proof is based on the smoothness of the inclusion map:
\begin{proposition}\label{prop:inclusionsmooth}
Let $N \subset M$ be a smooth submanifold. Then the inclusion map $i \colon N \to M$, given by $i(p) = p$, is smooth. 
\end{proposition}
\begin{remark}
Here we assume that $N$ is endowed with the smooth structure provided by Exercise~\ref{exercise:smoothstructure}.
\end{remark}
\begin{proof}[Proof of Proposition \ref{prop:inclusionsmooth}]
We take $p \in N$ and show that $i$ is smooth at $p$. By definition of a smooth submanifold, there are local coordinates $x_1, \dots, x_m$ on $M$ around $p$ in which $N$ is given by equations  $x_{n+1} = 0, \dots, x_{m} = 0$. Furthermore, $x_1, \dots, x_n$ can be taken as coordinates on $N$ around $p$ (see Exercise~\ref{exercise:smoothstructure}). Taking $x_1, \dots, x_n$ as coordinates around $p \in N$, and  $x_1, \dots, x_m$ as coordinates around $i(p) = p \in M$, we get the following coordinate representation of the map $i$:
\begin{align*} x_1 &= x_1,\\ &\dots\\  x_n &= x_n,\\  x_{n+1} &= 0, \\ &\dots\\ x_m &= 0, \end{align*}
where $x$-variables on the left are coordinates in $M$, while $x$-variables on the right are coordinates in $N$. This coordinate representation is smooth, so $i$ is smooth at $p$. Since $p$ was arbitrary, it follows that $i$ is smooth everywhere.
\end{proof}
\begin{proposition}\label{prop:restriction}
Let $\phi \colon M \to N$ be a smooth map, and let $M' \subset M$ be a smooth submanifold. Then $\phi\mid_{M'} \colon M' \to N$ is smooth.
\end{proposition}
\begin{proof}
We have $\phi\mid_{M'} = \phi \circ i$, where $i \colon M' \to M$ is the inclusion map. Since $\phi$ is known to be smooth, and $i$ is smooth by Proposition \ref{prop:inclusionsmooth}, it follows that the composition $\phi\mid_{M'} $ of those maps is smooth as well.
\end{proof}
Along with restricting the domain of a smooth map to a submanifold, we can also restrict the codomain, provided that the image of the map is contained in a submanifold:
\begin{proposition}\label{prop:imagerestriction}
Let $\phi \colon M \to N$ be a smooth map, and let $N' \subset N$ be a smooth submanifold. Assume also that $\phi(M) \subset N'$. Then $\phi$, regarded as a map $M \to N'$, is smooth.
\end{proposition}
\begin{proof}
We take $p \in M$ and show that $\phi \colon M \to N'$ is smooth at $p$. Let $y_1, \dots, y_m$ be any chart in $M$ around $p$, and let $y_1, \dots, y_n$ be a chart on $N$ around $\phi(p)$ in which $N'$ is given by equations  $y_{l+1} = 0, \dots, y_{n} = 0$. Then, since $\phi(M) \subset N'$, the coordinate representation of $\phi \colon M \to N$ has the form
\begin{align*} y_1 &= f_1(x_1, \dots,x_m ),\\ &\dots,\\  y_l &= f_l(x_1, \dots,x_m ),\\ y_{l+1} &= 0, \\&\dots\\ y_n &= 0, \end{align*}
Since $\phi \colon M \to N$ is a smooth map, the functions $f_1, \dots, f_l$ are smooth, and it follows that the coordinate representation
\begin{align*} y_1 &= f_1(x_1, \dots,x_m ),\\ &\dots,\\  y_l &= f_l(x_1, \dots,x_m )\end{align*} of $\phi \colon M \to N'$ is smooth as well, as desired.
\end{proof}
Furthermore, we can restrict the domain and the codomain at the same time:
\begin{corollary}\label{cor:twosiderestriction}
Let $\phi \colon M \to N$ be a smooth map, and let $M' \subset M$, $N'\subset N$ be smooth submanifolds. Assume that $\phi(M') \subset N'$. Then $\phi\mid_{M'}$, regarded as a map $M' \to N'$, is smooth.
\end{corollary}
\begin{proof}
By Proposition \ref{prop:restriction}, $\phi\mid_{M'} \colon M' \to N$ is smooth, but since $\phi\mid_{M'}(M') \subset N'$, it follows from Proposition \ref{prop:imagerestriction} that $\phi\mid_{M'}$ is also smooth when being regarded as a map $M' \to N'$.
\end{proof}
\begin{example}[See Problem Set 2]
Let $S^1$ be the unit circle identified with $\{z \in \C \mid |z|^2 = 1\}.$ Then the map $f \colon S^1 \to S^1$ given by $f(z) = z^n$ (where $n \in \Z$ is given) is smooth.
\end{example}
\begin{proof}
The map in question is the restriction of a map $\C \setminus \{0\} \to \C \setminus \{0\} $ given by the same formula $z \mapsto z^n$. The latter can be written in real coordinates as
$$
(x,y) \mapsto (\Re (x+iy)^n, \Im (x+iy)^n).
$$
For $n> 0$, this map is polynomial and hence smooth. For $n < 0$, it is a composition of a polynomial map and the map
$$
z \mapsto \frac{1}{z} = \frac{\!\bar z}{\,|z|^2},
$$
which is also smooth in $\C \setminus \{0\}$. So, our map $\C \setminus \{0\} \to \C \setminus \{0\} $ is smooth, which, in view of Corollary~\ref{cor:twosiderestriction}, shows that the corresponding map $S^1 \to S^1$ is smooth as well.
\end{proof}
\begin{remark}
Here we are implicitly using that the smooth structure on $S^1$ coming from its embedding to $\R^2$ as a submanifold coincides with the ``standard'' structure defined earlier in the course. This is left as an exercise.
\end{remark}
\section{Description of submanifolds as level sets}
In most cases it is inconvenient (and, globally, not possible) to describe submanifolds as graphs. A more common way to define submanifolds is to use equations
like
$
\sum x_i^2 = 1.
$
So, we need a tool that will allows us to prove that so-defined subsets a submanifolds.
\begin{proposition}\label{prop:zerolevel}
Assume that $f \colon \R^m \to \R$ is smooth, and let $N = \{ x \in \R^n \mid f(x) = 0\}$ be the zero set of $f$. Assume also that the gradient of $f$, i.e. the vector of its partial derivatives, does not vanish on $N$. Then $N$ is a smooth codimension $1$ submanifold of $\R^m$.
\end{proposition}
\begin{proof}
Let $p \in M$. Since the gradient of $f$ does not vanish of $p$, there is $i \in \{1, \dots, m\}$ such that $\dybydx{f}{x_i} \neq 0$. Without loss of generality, assume that $i = m$ (if not, we renumber the coordinates). Then the Jacobian of the map $(x_1, \dots, x_m) \mapsto (x_1, \dots, x_{m-1}, f)$ at $p$ is equal to $\dybydx{f}{x_m} \neq 0$. Therefore, $(x_1, \dots, x_{m-1}, f)$ is a smooth chart near $p$. In this chart, $N$ is the zero set of the last coordinate and hence a codimension $1$ submanifold.
\end{proof}
\begin{corollary}\label{cor:anylevel}
Assume that $f \colon \R^m \to \R$ is smooth, $c \in \R$, and let $N_c = \{ x \in \R^m \mid f(x) = c\}$. Assume also that the gradient of $f$ does not vanish on $N_c$. Then $N_c$ is a smooth codimension~$1$ submanifold of $\R^m$.
\end{corollary}
\begin{proof}
This follows from Proposition \ref{prop:zerolevel} applied to the function $f - c$.
\end{proof}
\begin{example}[cf. Example \ref{ex:sphere}]
The sphere $S^{m-1}$ is defined as level set  $f = 1$ for the function $f = \sum_{i=1}^m x_i^2 $ in $\R^m$. The gradient of this function only vanishes at the origin, which does not belong to the sphere. Therefore, the sphere is a codimension $1$ submanifold.
\end{example}
\begin{example}
$\SL_n(\R) = \{ A \in \Mat_{n\times n}(\R) \mid \det A = 1\}$ is a smooth codimension $1$ submanifold of $\Mat_{n\times n}(\R)$.
\end{example}
\begin{proof}
We have
$$
\dybydx{\det A}{a_{ij}} = A_{ij},
$$
where $A_{ij}$ is the cofactor of $a_{ij}$, that is the $(i,j)$ minor multiplied by $(-1)^{i+j}$. Furthermore, for any $A \in \SL_n(\R)$, at least one of its cofactors is non-zero, so the desired statement follows from Corollary \ref{cor:anylevel}.
\end{proof}
\begin{example}
The subset of the plane given by the equation $xy = 0$ is not a smooth submanifold (see Problem Set 5). The reason we cannot apply Proposition \ref{prop:zerolevel} is because the gradient of $xy$ vanishes at the origin.
\end{example}
Of course, not being able to apply Proposition \ref{prop:zerolevel} or Corollary \ref{cor:anylevel} does not mean that the given level set is not a submanifold.
\begin{example}
The subset of the plane given by $x^2 + y^2 = 0$ is a submanifold, even though  Proposition \ref{prop:zerolevel} does not apply. Note, however, that the codimension of this submanifold is $2$, while it would be $1$ if Proposition \ref{prop:zerolevel} was applicable.
\end{example}
\begin{corollary}
Assume that $M$ is a smooth manifold, $f \colon M \to \R$ is smooth, $c \in \R$, and let $N_c = \{ p \in M \mid f(p) = c\}$. Assume also that the differential of $f$ (which as an element of the cotangent space at every point) does not vanish on $N_c$. Then $N_c$ is a smooth codimension $1$ submanifold of $M$.
\end{corollary}
\begin{proof}
Take $p \in N_c$. Taking local coordinates, we identify a neighborhood of $p$ in $M$ with an open subset of $\R^m$. Furthermore, under this identification the differential becomes the vector of partial derivatives, so the desired statement follows from Corollary \ref{cor:anylevel}.
\end{proof}
%\begin{remark}
%Here we are using a version of Corollary \ref{cor:anylevel} with $f$ defined not on the whole
%\end{remark}
\begin{proposition}\label{prop:zerolevel2}
Assume that $f_1, \dots, f_n \colon \R^m \to \R$ are smooth functions, and let $N = \{ x \in \R^m \mid f_1(x) = \dots = f_n(x) = 0\}$ be the joint zero set of $f_1, \dots, f_n$. Assume also that the gradients of $f_i$'s are linearly independent of $N$. Then $N$ is a smooth codimension $n$ submanifold of $\R^m$.
\end{proposition}
\begin{proof}
Let $p \in N$. Assumption on the gradients means that the Jacobian matrix
\begin{align*}
\left.\left(\begin{array}{ccc}\dybydx{f_1}{x_1} & \dots & \dybydx{f_1}{x_m} \\ & \dots &  \\\dybydx{f_n}{x_1} & \dots & \dybydx{f_n}{x_m}\end{array}\right)\right\vert_p
\end{align*}
has rank $n$ and therefore admits a non-vanishing $n \times n$ minor. Without loss of generality, assume that it is the rightmost minor
\begin{align*}
\left|\begin{array}{ccc}\dybydx{f_1}{x_{m-n+1}} & \dots & \dybydx{f_1}{x_m} \\ & \dots &  \\\dybydx{f_n}{x_{m-n + 1}} & \dots & \dybydx{f_n}{x_m}\end{array}\right|
\end{align*}
(if not, we renumber the coordinates). Then it follows that the transformation $(x_1, \dots, x_m) \mapsto (x_1, \dots, x_{m-n}, f_1, \dots, f_n)$ has a non-vanishing Jacobian, and thus $ (x_1, \dots, x_{m-n}, f_1, \dots, f_n)$ is a local coordinate system in $\R^m$ near $p$. Therefore, $N$, which is the vanishing set for the last $n$ coordinates, is a codimension $n$ submanifold.
\end{proof}
Similarly to the case of one function, we can generalize this arbitrary level sets, and also replace $\R^m$ by an arbitrary manifold. We will go even further and replace $n$ functions by a map to an $n$-dimensional manifold. 
\begin{proposition}\label{prop:sublevelset}
Let $F \colon M \to N$ be a smooth map between smooth manifolds, and let $F^{-1}(q) = \{p \in M \mid F(p) = q\}$. Assume that the differential of $F$ is surjective at every point of $F^{-1}(q)$. Then $F^{-1}(q)$ is a smooth submanifold of $M$ whose codimension is $\dim N$.
\end{proposition}
\begin{remark}
A smooth map whose differential is surjective everywhere is called a \textit{submersion}. Proposition \ref{prop:sublevelset} in particular says that a level set of a submersion is a smooth submanifold.
\end{remark}
\begin{proof}[Proof of Proposition \ref{prop:sublevelset}]
Let $p \in F^{-1}(q)$. Take any smooth chart $(x_1, \dots, x_m)$ near $p$, and let $(y_1, \dots, y_n)$ be a chart centered at $q = F(p)$, which means that $y_1(q) = \dots = y_n(q) = 0$. We can assume that $F$ takes the domain of $x$-coordinates to the domain of $y$-coordinates (if not, we make the domain of $x$ coordinates smaller). Then $F$ can be represented in coordinates as
\begin{align*}
y_1 &= f_1(x_1, \dots, x_m),\\
&\dots\\
y_n &= f_n(x_1, \dots, x_m)
\end{align*}
for certain smooth functions $f_1, \dots, f_n$. Furthermore, $F^{-1}(q)$ is locally (in the domain of $x$ coordinates) the same as the joint zero level set of $f_1, \dots, f_n$. Therefore, the desired statement follows from Proposition \ref{prop:zerolevel2}.
\end{proof}
\begin{example}
The orthogonal group $\O_n(\R) = \{ A \in \Mat_{n\times n}(\R) \mid AA^t = \Id\}$ is a smooth submanifold of $\Mat_{n\times n}(\R)$.
\end{example}
\begin{proof}
For any, $A \in \Mat_{n\times n}(\R)$, the matrix $AA^t$ is symmetric, so $\phi \colon A \mapsto AA^t$ is a map $\Mat_{n\times n}(\R) \to \Sym_n(\R)$, where  $\Sym_n(\R)$ is the space of symmetric $n \times n$ real matrices. The differential of this map at $A$ is a map from $T_A \Mat_{n\times n}(\R) = \Mat_{n\times n}(\R)$ to $T_{\phi(A)} \Sym_n(\R) = \Sym_n(\R)$ given by
\begin{align*}
d_A \phi(X) = XA^t + AX^t.
\end{align*}
This mapping is surjective for $A \in \O_n(\R) $. Indeed, the equation
$$
XA^t + AX^t = B
$$
for symmetric $B$ and orthogonal $A$ has a solution given by $X = \frac{1}{2}BA$. So, the result follows from Proposition \ref{prop:sublevelset}.
\end{proof}
\begin{remark}
The submanifold  $\O_n(\R)$ is disconnected. Indeed, consider its subset  $\SO_n(\R) = \{A \in \O_n(\R) \mid \det A = 1\}$. This subset is closed as a level set of a continuous function. On the other hand, since the determinant of an orthogonal matrix is always $\pm 1$, it follows that $\{A \in \O_n(\R) \mid \det A = 1\} = \{A \in \O_n(\R) \mid \det A > 0\}$, so $\SO_n(\R)$ is also open, meaning that  $\O_n(\R)$ is not connected.
\end{remark}
\begin{remark}
Since $\SO_n(\R) $ is open in $\O_n(\R)$, it follows that  $\SO_n(\R) $ is also a submanifold of $\Mat_{n\times n}(\R)$. The same is true for its complement  $\O_n(\R) \setminus \SO_n(\R)$.
\end{remark}
\begin{exercise}[See Problem Set 5]
Prove that $\SO_n(\R)$ and $\O_n(\R) \setminus \SO_n(\R)$ are connected spaces, so $\O_n(\R)$ consists of two connected components.
\end{exercise}

\section{The tangent space of a submanifold}
In this section we show that the tangent space to a submanifold can be naturally viewed as a subspace in the tangent map of the ambient manifold.\par
Let $M$ be a smooth manifold, and $N$ be its smooth submanifold. Then, by Proposition \ref{prop:inclusionsmooth}, the inclusion mapping $i \colon N \to M$ is smooth, and we can compute its differential $d_pi$ at every point $p \in N$.
\begin{proposition}
\begin{enumerate}
\item
The mapping $d_pi \colon T_p N \to T_p M$ is injective.
\item In terms of smooth curves, $d_pi $ can be defined as follows: for every curve in $N$ passing through $p$, the mapping $d_pi $ takes its tangent vector at $p$ to the tangent vector at $p$ of the same curve, but regarded as a curve in $M$.
\item In terms of differential operators, $d_pi $ can be defined as follows: for any $v \in T_p N$ and any function $f$ on $M$ defined and smooth around $p$, we have
$$
d_pi (v)f = v(f\vert_N).
$$
\end{enumerate}
\end{proposition}
\begin{proof}
Let $m = \dim M$, $n = \dim N$. To prove the first statement, we use coordinates from the proof of Proposition \ref{prop:inclusionsmooth}. In these coordinates, the Jacobian matrix of the inclusion mapping $i$ has the form
$$
\left(\begin{array}{c}\Id_n \\0_{m - n, n}\end{array}\right),
$$
where $\Id_n$ is the $n \times n$ identity matrix, and $0_{m-n, n}$ is the $(m- n) \times n$ zero matrix. Since the columns of this matrix are linearly independent, it follows that $d_pi$ is injective, as desired.\par
To prove the second statement, take any parametrized curve $\gamma$ in $N$ with $\gamma(0) = p$. Then, by definition of the differential in terms of curves, we have
$$
d_pi\left(\left.\dbydp{t}\right\vert_{t=0}\gamma(t)\right) = \left.\dbydp{t}\right\vert_{t=0}i(\gamma(t)) =  \left.\dbydp{t}\right\vert_{t=0}\gamma(t),
$$
where in the latter formula we regard $\gamma$ as a curve in $M$. So, the second statement is proved.\par
Finally, we prove the last statement. Using the definition of the differential in terms of differential operators, we get
$$
d_pi (v)f = v(i^*f) = v(f \circ i) =  v(f\vert_N),
$$
as desired.
\end{proof}
In what follows, we do not distinguish between the tangent space of a submanifold and its image under the differential of the inclusion map. So, if $N$ is a submanifold of $M$, then $T_pN$ is a subspace of $T_pM$ for any $p \in N$. In this interpretation, $d_p i  \colon T_p N \to T_p M$ is simply the inclusion map of a subspace to the ambient space.\par
In the remaining part of this section, we give an explicit description of the tangent space for a submanifold defined as a level set. First, we prove the following preliminary statement, which is also useful on its own:
\begin{proposition}\label{prop:diffrest}
Let $\phi \colon M \to N$ be a smooth map, and let $M' \subset M$ be a smooth submanifold. Then, for every $p \in M'$, we have
$$
d_p (\phi\vert_{M'}) = (d_p\phi)\vert_{T_pM'}.
$$
In other words, the differential of the restriction is the same as the restriction of the differential.
\end{proposition}
\begin{proof}
Let $i \colon M' \to M$ be the inclusion map. Then
$$
d_p (\phi\vert_{M'}) = d_p(\phi \circ i) = d_p \phi \circ d_pi = (d_p\phi)\vert_{T_pM'},
$$
where in the last equality we used that $d_pi $ is the inclusion $T_p M' \to T_p M$.
\end{proof}
\begin{proposition}\label{prop:tsoflecelset}
Let $F \colon M \to N$ be a smooth map whose differential is surjective at all points of the level set $F^{-1}(q)$. Then, for every $p \in F^{-1}(q)$, we have
$$
T_p F^{-1}(q) = \Ker d_p F.
$$
\end{proposition}
\begin{proof}
We have 
$$
F\vert_{F^{-1}(q)} = q.
$$
Taking the differential of both sides at $p$ using Proposition \ref{prop:diffrest} and the fact that the differential of a constant map is zero, we get
$$
d_pF\vert_{T_pF^{-1}(q)} = 0,
$$
which means that
$$
T_pF^{-1}(q) \subset \Ker d_p F.
$$
So, to prove that these two vector spaces coincide, it suffices to show that they are of the same dimension.
We have
$$
\dim T_pF^{-1}(q) = \dim F^{-1}(q) = \dim M - \dim N,
$$
where in the last equality we used Proposition \ref{prop:sublevelset}. At the same time, we have
$$
\dim \Ker d_p F = \dim T_p M - \dim T_q N = \dim M - \dim N,
$$
where in the first equality we used that $d_p F$ is surjective. So, $T_pF^{-1}(q) $ is a vector subspace of $ \Ker d_p F$, and the dimensions of these spaces coincide, which means that they are equal, as desired.
\end{proof}
\begin{example}
The tangent space to a level set $\{f = c\}$ of a smooth function $f \colon \R^m \to \R$ is the plane orthogonal to the gradient, provided that the latter is non-zero.
\end{example}
\begin{proof}
Assume that the gradient of $f$ at a point $p \in \R^m$ does not vanish. Then $\{f = c\}$ is submanifold near $p$. By Proposition \ref{prop:tsoflecelset}, we have
$$
T_p \{f = c\} = \Ker d_pf, 
$$
where $d_p f$ is regarded as a map $T_p \R^m \to T_p\R$. The matrix of this map, written in standard bases for $T_p \R^m$ and $T_p\R$, is
$$
\left(\begin{array}{ccc}\dybydx{f}{x_1} & \dots & \dybydx{f}{x_1}\end{array}\right),
$$
and its kernel is exactly the orthogonal complement of the gradient of $f$, as desired.
\end{proof}
\begin{example}
The tangent plane to the sphere is orthogonal to the radius.
\end{example}
\begin{proof}
The sphere is the level set of $\sum x_i^2$. The gradient of the latter function is twice the radius-vector.
\end{proof}
\begin{example}
The tangent space to the orthogonal group $\O_n(\R)$ at $A \in O_n(\R)$ is the subspace of $T_A \Mat_{n \times n}(\R) =  \Mat_{n \times n}(\R) $ consisting of matrices $X$ satysfying the equation
$$
XA^t + AX^t = 0.
$$
In particular, the tangent space to  $\O_n(\R)$ (and hence  $\SO_n(\R)$) at the identity is the space of skew-symmetric $n\times n$ real matrices.
\end{example}
\begin{proof}
This follows from the formula $X \mapsto XA^t + AX^t$ for the differential at $A$ of the map $A \mapsto AA^t$.
\end{proof}
\begin{remark}
This statement in particular says that for any smooth family $A(t)$ of orthogonal matrices such that $A(0)= \Id$, the matrix $A'(0)$ is skew-symmetric. This can also be seen by explicit differentiation. A  less trivial part of the statement is that for any skew-symmetric $X$ there is a curve $A(t)$ in $\SO_n(\R)$ with $A(0) = \Id$ and $A'(0) = X$.
\end{remark}
    \end{document}