This notebook is part of the Introduction to manifolds in SageMath by Andrzej Chrzeszczyk (Jan Kochanowski University of Kielce, Poland).
version()
'SageMath version 9.6, Release Date: 2022-05-15'
Let $M$ be a smooth manifold and $p ∈ M$. A tangent vector to $M$ at $p$ is a map $X_p : C^∞ (M ) → R$ such that
\begin{equation} \begin{matrix} X_p (a f + bg) = aX_p ( f ) + bX_p (g),\\ X_p(f g) = f (p)X_p(g) + g(p)X_p(f), \end{matrix} \tag{8.1} \end{equation}for all $f, g ∈ C^\infty (M )$ and $a,b\in R$.
Maps $C^∞ (M ) → R$ satisfying the last relation are also said to have a derivation property and are called
derivations (into $R$).
In the previous notebook we have checked that the tangent vectors to smooth curves are derivations. Later in this notebook we will show that all tangent vectors are in fact tangent vectors to some curve.
If we define addition and multiplication by a scalar on the set of derivations at $p$ by
for $\ f ∈ C^\infty (M )$ and $\lambda\in R$, then we obtain a vector space.
Tangent space $T_p M$ to a smooth manifold $M$ at a point $p$ is the vector space of all tangent vectors to $M$ at $p$.
Let $(U, φ)$ be a chart on $M,$ with coordinates $x^1 , . . . , x^n$ and $p ∈ U$. The tangent vectors,$ \frac{∂}{∂ x^i}\Big|_p$ are defined by \begin{equation} \frac{∂}{∂ x^i}\Big|_p(f) = D_i ( f ◦ φ^{−1} )|_{φ( p)}. \tag{8.3} \end{equation}
Here $f\in C^\infty(M)$ and $D_i$ denotes the partial derivative in $R^n$, i.e.
$$\displaystyle D_i(g)|_q=\lim_{h\to 0}\frac{g(q+he_i)-g(q)}{h}, \quad \text{for}\ g\in C^\infty(M),\ q\in M,$$where $e_i$ is the vector in $R^n$ with $i$-th component 1 and all other 0.
Using the Leibniz rule for $D_i$ one can show that $\frac{∂}{∂ x^i}\Big|_p$ satisfy (8.1), so they are tangent vectors to $M$ at $p\in M$.
Let us check how the tangent vectors $\ \frac{∂}{∂ x^i}\big|_p$ act on coordinate functions $x^j$. We have
$$x^j\circ\phi^{-1}(\phi(p)+he_i)-x^j\circ\phi^{-1}(\phi(p))= \left\{ \begin{array}{ll} h, & \mbox{if } i=j,\\ 0, & \mbox{if } i\not=j. \end{array}\right.$$As a consequence we obtain
The vectors $\ \ \displaystyle\frac{\partial}{\partial x^i}\Big|_p,\ \ $ $i=1,\ldots,n\ \ $ form a basis of $T_pM$.
The linear independence follows from the fact that if $\sum_{i=1}^n a^i\frac{\partial}{\partial x^i}\Big|_p=0\in T_pM$, then by (8.4) $$\sum_{i=1}^n a^i\frac{\partial}{\partial x^i}\Big|_p(x^j)=\sum_{i=1}^n a^i\delta^j_i=a^j=0.$$
To show that $\ \ \displaystyle\frac{\partial}{\partial x^i}\Big|_p,\ \ $ $i=1,\ldots,n\ \ $ span the tangent space $\ T_pM\ $ we need to prove:
If $\phi=(x^1,\ldots,x^n): U\to R^n$ is a coordinate chart on a manifold $M$ and $X_p\in T_pM$ is a tangent vector at $p\in U$, then \begin{equation} X_p=\sum_{i=1}^n X_p(x^i)\frac{\partial}{\partial x^i}\Big|_p. \label{}\tag{8.5} \end{equation}
Using this convention, the last formula can be written as
$$X_p=X_p(x^i)\frac{\partial}{\partial x^i}\Big|_p.$$To check (8.5) let $f\in C^\infty(M)$ and let $F=f\circ\phi^{-1}$. If $q\in U$, then
$$f(q)=(f\circ\phi^{-1})(\phi(q))=F(\phi(q)).$$Analogously $f ( p) = F (φ( p)).\ \ $ We shall use the following version of the mean value theorem.
If $p$ is fixed, then (8.6) leads to
$$f (q) = f ( p) + [x^i (q) − x^i ( p) ]g_i (q).$$Since $q$ is arbitrary point in a neighborhood of $p$
\begin{equation} f = f ( p) + [x^i − x^i ( p)] g_i. \tag{8.7} \end{equation}Using (8.1) and the fact that $f(p)$ and $x^i(p)$ are constants ($p$ is fixed) we have
$$X_p ( f ) = X_p ( f ( p)) + [x^i ( p) − x^i ( p)] X_p (g_i ) + g_i ( p) X_p (x^i − x^i ( p)) = g_i ( p) X_p (x^i ). $$Since $g_i(p)=D_i(f\circ\phi^{-1})|_{\phi(p)}=\frac{\partial}{\partial x^i}\Big|_p(f)$, we have proved (8.5).
In the sequel we shall use variables with upper indices in latex output
Example 8.1
Now let us define our first tangent vector, using variables with superscripts in Latex output.
%display latex
M = Manifold(3, 'M') # Manifold M
X = M.chart(r"x0:x^0 x1:x^1 x2:x^2") # chart (x^0,x^1,x^2)
p = M.point((1,0,-2), name='p') # point in M
Tp = M.tangent_space(p) # tangent space at p
v = Tp((2,1,3), name='v') ; print(v) # tangent vector in Tp
v.disp() # show v
Tangent vector v at Point p on the 3-dimensional differentiable manifold M
If we would like subscripts instead, we should write
# Version with subscripts !!!
M = Manifold(3, 'M') # Manifold
X = M.chart(r"x0:x_0 x1:x_1 x2:x_2") # chart (x_0,x_1,x_2)
p = M.point((1,0,-2), name='p') # point in M
Tp = M.tangent_space(p) # tangent space at p
v = Tp((2,1,3), name='v') ; print(v) # tangent vector in Tp
v.disp() # show v
Tangent vector v at Point p on the 3-dimensional differentiable manifold M
Example 8.2
Let us introduce a tangent vector with symbolic components, first with subscripts.
# version with subscripts
%display latex
M = Manifold(2, 'M') # Manifold
X.<x0,x1> = M.chart() # chart (X0,X1)
p = M.point((x0, x1), name='p') # generic point in M
Tp = M.tangent_space(p) # tangent space at p
var('v',n=2) # symbols v0,v1
v = Tp((v0,v1), name='v') # tan. vector in Tp
v.disp() # show v
Now the version with superscripts and manifold dimension specified by N
:
%display latex
N = 2
M = Manifold(N, 'M') # manifold M
X = M.chart(' '.join(['x'+str(i)+':x^{'+str(i)+'}' for i in range(N)])) # chart on M
p = M.point(X[:], name='p') # generic point of M
Tp = M.tangent_space(p) # tangent space at p
v = [var('v'+str(i),latex_name='v'+'^'+str(i))
for i in range(N)] # variables with superscripts
V = Tp(v, name='V') # tangent vector at p
V.disp() # show tangent vector
Check that the tangent vector V
maps a scalar function f
to the real number
$v^0\left.\frac{\partial f}{\partial x^0}\right|_p+
v^1\left.\frac{\partial f}{\partial x^1}\right|_p\quad
\big(=v^i\left.\frac{\partial f}{\partial x^i}\right|_p\big)$.
x0, x1 = X[:] # coordinates x^0 and x^1 of chart X as the Python variables x0 and x1
f = M.scalar_field(function('f')(x0, x1), name='f') # scalar function f
V(f) # value of vect. field on f
Let us check the derivation property:
# scalar function g:
g = M.scalar_field(function('g')(x0, x1), name='g')
# V is derivation?
bool(V(f*g) == V(f)*g(p) + f(p)*V(g))
The definition of smooth maps (from notebook 1) is equivalent to the following. Let $M$ and $N$ be two smooth manifolds with some atlases {$(U_α,φ_α )$} and
{$(V_β,ψ_β)$}, respectively.
A continuous map $F : M → N$ is a smooth ($C^\infty$) map if for all $α$ and $β$ with
$F^{−1}(V_β)∩ U_α \not= ∅$,
the composition
$ψ_β ◦ F ◦ φ^{−1}_α : φ_α(U_α ∩ F^{-1}(V_β ))→ ψ_β (V_β )$
is smooth ($C^∞$ map on the open subset $φ_α(U_α ∩ F^{-1}(V_β ))$ of $R^n$).
A diffeomorphism of manifolds is a bijective $C^∞$ map $F : N → M$ whose inverse $F^{−1}$ is also $C^∞$.
If $M$ is a smooth manifold, then the coordinate maps $\phi: U\to \phi(U)$ are examples of diffeomorphisms of open subsets $U$ and $\phi(U)$.
In fact, $\phi: U\to \phi(U)$ is homeomorphic by definition. Take the atlas with a single chart $\{(U,\phi)\}$ on $U$ and the atlas with a single chart $\{(\phi(U),id_{\phi(U)})\}$ on $\phi(U)$. To check the smoothness of $\phi$ and $\phi^{-1}$ it suffices to note that $id_{\phi(U)}\circ \phi \circ \phi^{-1}$ and $\phi \circ \phi^{-1}\circ id_{\phi(U)}$ are identity maps $\phi(U)\to\phi(U).\ \ $ Note, that if $V=\phi(U)$, then $\phi(U\cap\phi^{-1}(V))=\phi(U)\ $ and if $\psi=id_{\phi(U)}\ $, then $\psi(V)=\phi(U)$.
Every smooth map ${\displaystyle F :M\to N}$ between smooth manifolds induces natural linear maps between their corresponding tangent spaces: $${\displaystyle {d} {F }_{p}:T_{p}M\to T_{F (p)}N,\quad p\in M.}$$ This map is defined by \begin{equation} {\displaystyle [ {d} {F }_{p}(X_p)]f\mathrel {\stackrel {\text{}}{=}} X_p(f\circ F ),} \tag{8.8} \end{equation} for $X_p\in T_pM$ and $f\in C^\infty(M).$
The linear map ${\displaystyle {d} {F }_{p}}$ is called the differential of $F$ at $p$, the derivative, or pushforward of ${\displaystyle F }$ at $ {\displaystyle p}$. It is frequently expressed using another notations, for example ${(F _{*})_{p}}$ or $T_pF$.
Chain Rule. If $F : X → Y$ and $H : Y → Z$ are smooth maps between smooth manifolds, then $d(H ◦ F)_p = dH_{F(p)}◦dF_p$ for any point $p ∈ X$.
This is a consequence of
$$ dH_{F(p)}(dF_p(X_p))f=(dF_p(X_p)(f\circ H)=X_p(f\circ H\circ F)=d(H\circ F)_pf.$$If $F : N → M$ is a diffeomorphism of manifolds and $p ∈ N$, then $dF_p : T_p N → T_{F(p)} M$ is an isomorphism of vector spaces and $d(F^{-1})_{F(p)}=(dF_p)^{-1}$.
For a smooth map $F : M → N$ of manifolds and a point $p ∈ M$, let $(U, x^1 , \ldots , x^n )$ and $(V, y^1 , \ldots , y^m )$ be coordinate charts about $p$ in $M$ and $F(p)$ in $N$, respectively. Relative to the bases $\frac{ ∂ }{∂ x^j} |_p $ for $T_p M$ and $\frac{ ∂ }{ ∂ y^i} |_{F(p)} $ for $T_{F(p)} N$, the differential $dF_p : T_p M → T_{F(p)} N$ is represented by the Jacobian matrix $$\displaystyle \Big[ \frac{∂ F^i} { ∂ x^j}\big|_p\Big],$$
where $F^i = y^i ◦ F $ is the $i$-th component of $F$ i.e.,
$$dF_p\big(\frac{\partial}{\partial x_j}\big|_p\big) =\frac{∂ F^i} { ∂ x^j}\big|_p\frac{\partial}{\partial y^i}\big|_{F(p)}. $$To check this formula, let us note, that as a linear map, the differential $dF_p$ is is determined by the matrix $a^i_j$ such that $$dF_p\big(\frac{\partial}{\partial x^j}\big|_p\big) =a^k_j \frac{\partial}{\partial y^k}\big|_{F(p)},\quad j=1,\ldots,n. $$ Applying both sides to $y^i$ we obtain
$$a^i_j=a^k_j\delta^i_k=\Big(a^k_j\frac{\partial}{\partial y^k}\big|_{F(p)}\Big)y^i=dF_p\Big( \frac{\partial}{\partial x^j}\big|_p\Big)y^i=\frac{\partial}{\partial x^j}\big|_p(y^i\circ F) =\frac{\partial F^i}{\partial x^j}\big|_p. $$Example 8.3
Consider the map $\Phi:R^2\to R^3$ defined by
$$\Phi(x,y)=(u,v,w)=(x,y,xy).$$For $p=(x,y)$ compute the values $\ \ d\Phi_p(\frac{\partial}{\partial x}\big|_p\big)\ \ $ and $\ \ d\Phi_p(\frac{\partial}{\partial y}\big|_p\big)$.
M = Manifold(2, 'M') # manifold M
X.<x,y> = M.chart() # coordinates on M
N = Manifold(3, 'N') # manifold N
Y.<u,v,w> = N.chart() # coordinates on N
# smooth map Phi: M->N:
Phi=M.diff_map(N,{(X,Y):[x,y,x*y]},name='Phi',latex_name=r'\Phi')
p = M.point((x,y), name='p') # point p on M
dPhip = Phi.differential(p) # differential of Phi at p
print(dPhip) # print info on the differential
Generic morphism: From: Tangent space at Point p on the 2-dimensional differentiable manifold M To: Tangent space at Point Phi(p) on the 3-dimensional differentiable manifold N
Tp=M.tangent_space(p) # tangent space at p
b=Tp.default_basis();b # basis of Tp
# index p is dropped
The values of $d\Phi_p$ on the basis vectors:
[dPhip(b[0]).disp(),'_______',dPhip(b[1]).disp()]
The coefficients in the basis $\ \frac{\partial}{\partial u},\ \frac{\partial}{\partial v}, \ \frac{\partial}{\partial w}\ \ $ of the tangent vectors $\ \ d\Phi_p(\frac{\partial}{\partial x}\big|_p\big)\ \ $ and $\ \ d\Phi_p(\frac{\partial}{\partial y}\big|_p\big)$ can be found in columns of the Jacobian:
dPhip.matrix() # matrix of dPhi at p
Example 8.4
Let us show how the tangent vectors in $R^2$ are transformed by the map $\ \Phi(x,y)=(x,y,1-(x^2+y^2)/4).$
First we sketch a tangent vector $v$ in $R^2$:
# Tangent vector in R^2
R2 = Manifold(2,'R2') # manifold R2
ch1.<x,y>=R2.chart() # coordinates on R2
p = R2((4,-4), name='p') # p=(4,-4) "starting point"
Tp = R2.tangent_space(p) # tangent space at p
v = Tp((4, -2), name='v') # (4,-2) -vector coordinates
p1 = v.plot(fontsize=18,label='$v$', # plot vector v
arrowsize=2,label_offset=0.7,color='black')
p2 = ch1.plot(color='black') # plot the coordinate lines
(p1 + p2).show(figsize=[3,3]) # combine plots
To obtain more information on plotting vectors use the command v.plot?
:
# v.plot?
To show the corresponding tangent vector to the graph of $\Phi$ we have to define the ambient space $R^3$ which contains the graph. The corresponding tangent vector is equal to $d\Phi_p(v)$.
# Continuation, image of the previous manifold under the map
# (x,y) --> (x,y,1-(x^2+y^2)/4)
R3 = Manifold(3,'R3') # manifold R^3
ch2.<X,Y,Z> = R3.chart() # coordinates X,Y,Z
Phi = R2.diff_map(R3,{(ch1,ch2):[x,y,1-(x^2+y^2)/4]},
name='Phi',latex_name=r'\Phi') # define Phi
pl=ch1.plot(chart=ch2,mapping=Phi, thickness=1,number_values=9,
label_axes=False,color='black') # image of coord. lines x,y
pl1=parametric_plot3d([x,y, 1-0.25*(x^2+y^2)],(x,-8,8),(y,-8,8),
color='lightgrey',opacity=0.9) # plot the image of Phi
vpl=v.plot(ch2,mapping=Phi,scale=1,width=6,fontsize=24, label='V',
color='black',label_offset=0.8) # plot vector V
(pl+pl1+vpl).rotateZ(-pi/1.7).show(frame=False,
aspect_ratio=[1,1,0.3]) # combine plots
# the rotation allows for better view of the vector V
Let us compute the value of the differential $d\Phi_p$ on the tangent vector $v$.
dPhi = Phi.differential(p) # differential of Phi at p
dPhi(v).disp() # show the differential
The coordinates (4,-2,-12) of $d\Phi_p(v)$ can be obtained as a result of multiplication of the Jacobian of $\Phi$ at $p$ by the vector of components of $v$:
# jacobian in an arbitrary
jac=Phi.jacobian_matrix() # point (x,y)
# jacobian at the point p
# with coordinates (4,-4):
jac0=jac.apply_map(lambda u:u.subs({x:4,y:-4}))
jac0
jac0*vector([4,-2]) # jacobian at p times vector([4,-2])
Example 8.5
Let us show a tangent vector in polar coordinates. This time we define the map by $\Phi(r,\phi)=(r\cos(\phi),r\sin(\phi), 1-r^2/2)$.
Its Jacobian is of the form jac= $\left(\begin{matrix} \partial\Phi_1/\partial r & \partial\Phi_1/\partial\phi\\ \partial\Phi_2/\partial r & \partial\Phi_2/\partial\phi\\ \partial\Phi_3/\partial r & \partial\Phi_3/\partial\phi \end{matrix} \right). $
%display latex
R2 = Manifold(2, 'R2')
V = R2.open_subset('V') # disk in r,ph plane
c_rph.<r,ph> = V.chart(r'r:(0,2) ph:(0,2*pi):\phi') # polar coord.
R3 = Manifold(3, 'R^3') # ambient space R^3
c_cart.<x,y,z> = R3.chart() # Cartesian coord. on R^3
Phi = V.diff_map(R3, # define Phi:
{(c_rph,c_cart):[r*cos(ph),r*sin(ph),1-r^2/2]},
name='Phi',latex_name=r'\Phi')
jac=Phi.jacobian_matrix();jac # Jacobian of Phi
For the point $p$ in the $r,\phi$ plane with $(r,\phi)=(1,\pi/2)$
we define jac0 as the value of jac in $p$.
jac0=jac.apply_map(lambda x:x.subs({r:1,ph:pi/2}))
jac0 # show Jacobian at p
The image of the vector $v$ in the $r,\phi$ plane with components $(0,1)$ i.e. $ v=0\frac{\partial}{\partial r}+1\frac{\partial}{\partial\phi}$ is the vector $d\Phi|_p(v)$:
p = V((1,pi/2), name='p') # point p in V
c_cart(Phi(p)) # coordinates of Phi at p
dPhi=Phi.differential(p) # differential of Phi at p
Tp = V.tangent_space(p) # tangent space at p
v = Tp((0, 1), name='v')
dPhi(v).disp()
Components of this vector can be computed using the jacobian jac0.
jac0*vector([0,1]) # multiply matrix jac0 by the vector [0,1]
Since the points of the the tangent plane are of the form:
vector(c_cart(Phi(p)))+jac0*vector([r,ph]),
we can add the plot of the tangent plane to the surface.
# plot the image of coordinate lines r,ph under Phi:
pl=c_rph.plot(chart=c_cart,mapping=Phi, thickness=2,
number_values=20,label_axes=False,color='black')
# plot the image of v under Phi
vpl=v.plot(chart=c_cart,mapping=Phi,scale=1.4,width=2,
fontsize=24, label='V',
color='black',label_offset=0.4)
# plot the graph of Phi
pl1=parametric_plot3d((r*cos(ph),r*sin(ph), 1-0.5*r^2),
(r,0,2),(ph,0,2*pi),color='darkgrey')
# plot the tangent plane at p
tpl=parametric_plot3d(vector(c_cart(Phi(p)))+
jac0*vector([r,ph])+jac0*vector([r,ph]),
(r,-0.5,0.5),(ph,-pi/4,pi/4),opacity=0.7,color='lightgrey')
# combine plots
(pl+vpl+pl1+tpl).rotateZ(pi/8).show(aspect_ratio=[1,1,0.9],
frame=False)