Contact
sagemanifolds
GitHub Repository: sagemanifolds/IntroToManifolds
Views: 80
Kernel: SageMath 9.6

# 9. Tensors on $T_pM$

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'

Warning. In this notebook there are many repetitions with respect to the notebook 9a. Tensors on modules. Although mathematically tensors on modules are generalizations of tensors on the tangent spaces, the SageMath Manifolds code in the present notebook differs significantly from that in notebook 9a.

### Differentials of functions, linear forms, covectors

If $M$ is a smooth manifold, $p ∈ M$, $T_pM$ is the tangent space to $M$ at $p$, and $f ∈ C^∞(M)$, then the differential of $f$ at $p$, denoted by $d f_p$, is defined by

ParseError: KaTeX parse error: Undefined control sequence: \label at position 65: …} X_p\in T_pM. \̲l̲a̲b̲e̲l̲{} \tag{9.1} \e…

Let us show some examples of scalar functions and differentials.

Example 9.1

Define a 3-dimensional manifold $M,$ a point $p\in M$, the tangent space at $T_pM$, a tangent vector $v\in T_pM$ and some scalar function $f$ on $M$.

%display latex
N = 3
M = Manifold(N, 'M')                   # manifold M of dimension N
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 p of M
Tp = M.tangent_space(p)                # tangent space at p
# components of tangent vector v:
vn = [var('v'+str(i), latex_name='v'+'^'+str(i)) for i in range(N)]
v = Tp(vn, name='v')                   # tangent vector v
f = M.scalar_field(function('f')(*X), name='f') # scalar funct.
print(p)                               # information on p
p.coord()                              # coordinates of p

Point p on the 3-dimensional differentiable manifold M

$\displaystyle \left({x^{0}}, {x^{1}}, {x^{2}}\right)$

print(v)                               # information on v
v.comp()[:]                            # components of v

Tangent vector v at Point p on the 3-dimensional differentiable manifold M

$\displaystyle \left[{v^0}, {v^1}, {v^2}\right]$

f.disp()                               # show scalar function f


$\displaystyle \begin{array}{llcl} f:& M & \longrightarrow & \mathbb{R} \\ & \left({x^{0}}, {x^{1}}, {x^{2}}\right) & \longmapsto & f\left({x^{0}}, {x^{1}}, {x^{2}}\right) \end{array}$

Now let us define the differential of $f$ at $p$:

# continuation
df = f.differential()                   # differential of f
dfp = df.at(p)                          # differential of f at p
print("df_p is a")
print(dfp)                            # information on dfp
print("Components of df_p:")
dfp.components()[:]          # components of differential at p

df_p is a Linear form df on the Tangent space at Point p on the 3-dimensional differentiable manifold M Components of df_p:

$\displaystyle \left[\frac{\partial}{\partial {x^{0}}}f\left({x^{0}}, {x^{1}}, {x^{2}}\right), \frac{\partial}{\partial {x^{1}}}f\left({x^{0}}, {x^{1}}, {x^{2}}\right), \frac{\partial}{\partial {x^{2}}}f\left({x^{0}}, {x^{1}}, {x^{2}}\right)\right]$

and check that the value of $df$ at $p$ on the tangent vector $v$ is equal to $v(f)$:

bool(dfp(v)==v(f))                   # check if df_p(v)=v(f)


$\displaystyle \mathrm{True}$

### Linearity of $df_p$

Recall that for a vector space (or a module) $V$ the map $t:V\to R$ is linear iff

$t (av + bw ) = at(v) + bt(w ),\quad\text{for}\quad v,w\in V,\quad a,b\in R.$

To check that $df_p: T_pM\to R$ is linear let us note that

$d f_p (av_p + bw_p ) = (av_p + bw_p )( f ) = av_p ( f ) + bw_p ( f ) = a d f_p (v_p ) + b d f_p (w_p ).$

### Cotangent space $T^*_pM$

The space of linear forms on $T_pM$ is by definition the dual space of $T_pM$ and is denoted by $T_p^*M$. Elements of $T_p^*M$ are called covectors or covariant vectors and $T_p^*M$ is called the cotangent space to $M$ at $p$.
The vector space operations in $T_p^*M$ are defined in a natural way

$(\alpha_p+\beta_p)(v_p)=\alpha_p(v_p)+\beta_p(v_p),\quad (aα_p )(v_p ) = a(α_p (v_p )),$

for $\ \ α_p , β_p ∈ T_p^∗ M,\ \ v_p ∈ T_p M\$ and $a ∈ R$.

To check what kind of object is $df_p$ we can use the parent method:

# continuation
# mathematical object of which "dfp" is an element.
print(dfp.parent())

Dual of the Tangent space at Point p on the 3-dimensional differentiable manifold M

Example 9.2

If $x^1,\ldots,x^n$ are local coordinates on $M$, then differentials $dx^i_p$ are covectors from $T_p^*M$. From (9.1) it follows that if the tangent vector is expressed as $X_p=X_p(x^i)\frac{\partial}{\partial x^i}\big|_p$, then

ParseError: KaTeX parse error: Undefined control sequence: \label at position 54: …X_p)=X_p(x^i), \̲l̲a̲b̲e̲l̲{}\tag{9.1'} \e…

i.e. $\ dx^i_p$ is the covector that maps the tangent vector at $p$ to its $i$-th component in the basis $\displaystyle \big\{\frac{\partial}{\partial x^j}\big|_p\big\}_{j=1}^n.$

Example 9.3

Let us define the scalar functions representing the i-th coordinate of the point.

N = 3                                # dimension of manifold M
M = Manifold(N, 'M')               # manifold M of dimension N
X = M.chart(' '.join(['x'+str(i)+':x^{'+str(i)+'}' for i in range(N)]))  # chart on M
x0, x1, x2 = X[:]
p = M.point((x0, x1, x2), name='p')               # point of M
fx0 = M.scalar_field(x0, name='fx0')   # fx0: x-->x^0
fx1 = M.scalar_field(x1, name='fx1')   # fx1: x-->x^1
fx2 = M.scalar_field(x2, name='fx2')   # fx2: x-->x^2
fx0.expr(), fx1.expr(), fx2.expr()


$\displaystyle \left({x^{0}}, {x^{1}}, {x^{2}}\right)$

### And next their differentials:

dx0 = fx0.differential()             # differential of fx0
dx1 = fx1.differential()             # differential of fx1
dx2 = fx2.differential()             # differential of fx2

dx0_p = dx0.at(p)                    # differential of fx0 at p
dx1_p = dx1.at(p)                    # differential of fx1 at p
dx2_p = dx2.at(p)                    # differential of fx2 at p

[dx0_p.disp(), dx1_p.disp(), dx2_p.disp()]  # show all three


$\displaystyle \left[\mathrm{d}fx0 = \mathrm{d} {x^{0}}, \mathrm{d}fx1 = \mathrm{d} {x^{1}}, \mathrm{d}fx2 = \mathrm{d} {x^{2}}\right]$

We can check that the just defined differentials, when applied to the tangent vector $v$ give its i-th component $v^i$.

Tp = M.tangent_space(p)            # tangent space at p
# variables with superscripts:
vn = [var('v'+str(i), latex_name='v'+'^'+str(i)) for i in range(N)]
v = Tp(vn, name='v')               # tangent vector at p
(dx0_p(v), dx1_p(v), dx1_p(v))     # values of differentials of xi
# at p on a tangent vector v


$\displaystyle \left({v^0}, {v^1}, {v^1}\right)$

### Bases in the cotangent space

Using the definition of the basis tangent vectors $\frac{\partial}{\partial x^i}\Big|_p(f)=D_i\Big|_{\phi(p)}(f\circ\phi^{-1})$ and the fact that $(x^j\circ\phi^{-1}(x^1(p),\ldots,x^n(p))=(x^j\circ\phi^{-1})(\phi(p))=x^j(p),\$ we see that $\frac{\partial}{\partial x^i}\Big|_p(x^j)=\delta_i^j$ and consequently $dx^i_p\big(\frac{\partial}{\partial x^j}\big|_p\big)= \frac{\partial}{\partial x^j}\big|_p(x^i)=\delta_j^i$. The last relation implies that:

The family $\{dx^i_p\}_{i=1}^n$ is a basis of $T_p^*M$.

In fact if the linear combination $\ a_idx^i_p\$ is equal to zero covector, then $\ 0 = (a_i dx^i_p ) (∂/∂ x^j|_p)= a_i\delta_j^i=a_j\$ i.e., the coefficients of this combination vanish, so the family is linearly independent.
If $\ \alpha_p\in T^*_pM$, then for $\ v_p\in T_pM\$ in the form $v_p= v_p(x^i)\frac{\partial}{\partial x^i}\big|_p$ we have

$\alpha_p(v_p)=\alpha_p\big( v_p(x^i)\frac{\partial}{\partial x^i}\big|_p\big)= v_p(x^i)\alpha_p\big(\frac{\partial}{\partial x^i}\big|_p\big).$

From the definition of the differential it follows $v_p(x^i)=dx^i_p(v_p)$, so

$\alpha_p(v_p)= \alpha_p\big(\frac{\partial}{\partial x^i}\big|_p\big)dx^i_p(v_p)=\Big[ \alpha_p\big(\frac{\partial}{\partial x^i}\big|_p\big)dx^i_p\Big](v_p),$

consequently

ParseError: KaTeX parse error: Undefined control sequence: \label at position 91: …_p\Big)dx^i_p. \̲l̲a̲b̲e̲l̲{} \tag{9.2} \e…

Thus every covector from $T_p^*M$ is a linear combination of $\{dx^i_p\}_{i=1}^n.$

Example 9.4

For example the differential of $f$ is a linear combination of $dx^0,dx^1,dx^2$ with coefficients $\frac{\partial f}{\partial x^0},\frac{\partial f}{\partial x^1}, \frac{\partial f}{\partial x^2}.$

In SageMath Manifolds the index $p$ denoting the point is always dropped.

The function display shows the differentials of functions and general linear forms as linear combinations of $dx^i.$

# continuation
dfp.disp()                       # show df_p


$\displaystyle \mathrm{d}f = \frac{\partial}{\partial {x^{0}}}f\left({x^{0}}, {x^{1}}, {x^{2}}\right) \mathrm{d} {x^{0}} + \frac{\partial}{\partial {x^{1}}}f\left({x^{0}}, {x^{1}}, {x^{2}}\right) \mathrm{d} {x^{1}} + \frac{\partial}{\partial {x^{2}}}f\left({x^{0}}, {x^{1}}, {x^{2}}\right) \mathrm{d} {x^{2}}$

Example 9.5

Let us define a general linear form on the tangent space $T_pM$ of a 3-dimensional manifold.

N = 3                        # dimension of manifold M
M = Manifold(N, 'M')         # manifold M of dimension N
X = M.chart(' '.join(['x'+str(i)+':x^{'+str(i)+'}' for i in range(N)]))  # chart on M
p = M.point(X[:], name='p')  # point of M
Tp = M.tangent_space(p)      # tangent space at p
a = Tp.linear_form()         # linear form on T_pM
a[:] = var('a', n=3)         # coefficients in the basis dx^i

a.disp()                  # show a


$\displaystyle a_{0} \mathrm{d} {x^{0}} + a_{1} \mathrm{d} {x^{1}} + a_{2} \mathrm{d} {x^{2}}$

The linear form applied to a tangent vector gives a scalar.

#continuation             # variables wit superscripts:
vn = [var('v'+str(i), latex_name='v'+'^'+str(i)) for i in range(N)]
v = Tp(vn, name='v')      # tangent vector v at p
a(v)                      # value of a on v


$\displaystyle a_{0} {v^0} + a_{1} {v^1} + a_{2} {v^2}$

The value of a tangent vector $v\in T_pM$ on a linear form $a\in T_p^*M$ is by definition equal to $a(v)$.

v(a)                      # value of v on a


$\displaystyle a_{0} {v^0} + a_{1} {v^1} + a_{2} {v^2}$

## Tensors in tangent spaces

Recall, that if $V$ is a vector space or a module, by a multilinear or more precisely $k$-linear form we mean a function $t: V^k\to R$ which is linear in each of its arguments i.e., for $i=1,\ldots,k$

$t(v_1\ldots,\alpha v_i+\beta w_i,\ldots v_k)= \alpha t(v_1\ldots,v_i,\ldots v_k)+\beta t(v_1\ldots,w_i,\ldots v_k),\quad \alpha,\beta\in R,\quad v_i,w_i\in V.$

Assume that $M$ is a smooth manifold.

### Space of tensors $T^{(k,m)}_pM$ of mixed type

is the space of multilinear maps:

$T^{(k,m)}_pM = \{t_p:\underbrace{T_p^*M\times\cdots\times T_p^*M}_{k\ \; \mbox{times}} \times \underbrace{T_pM\times\cdots\times T_pM}_{m\ \; \mbox{times}}\to R\},$

where $T_pM$ is the tangent space at $p\in M$ and $T_p^*M$ is the corresponding cotangent space.

Since for linear forms $\alpha$ and tangent vectors $v$ the assignment $\alpha\to v(\alpha)$ defines a linear form $T_p^*M\to R$, the elements $v\in T_pM$ can be considered as elements of $T_p^{(1,0)}$. On the other hand $T^{(0,1)}_p$ as the space of linear forms on $T_pM$ is equal to $T_p^*M$. Thus, the tensor spaces generalize the tangent and cotangent spaces.

Example 9.6

Let us show how to define tensor modules of type (1,0) and (0,1) in SageMath Manifolds.

N = 3                        # manifold dimension
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')  # point on M
Tp = M.tangent_space(p)      # tangent space at p
Tp.tensor_module(1,0)        # T_p^(1,0)M


$\displaystyle T_{p}\,M$

print(Tp.tensor_module(1,0)) # tensors (1,0) type are tangent vectors

Tangent space at Point p on the 3-dimensional differentiable manifold M
Tp.tensor_module(0,1)  # tensors of type (0,1) are linear forms on T_pM
# SageMath output looks a little strange
# but note that the dual space to V is denoted by V*


$\displaystyle T_{p}\,M^*$

print(Tp.tensor_module(0,1)) # SageMath naming is ready for arbitrary
# tensors, covector is just (0,1) tensor

Free module of type-(0,1) tensors on the Tangent space at Point p on the 3-dimensional differentiable manifold M

### Space $T^{(0,k)}_pM$ - of covariant tensors of rank $k$

is the space of multilinear maps

$T^{(0,k)}_pM = \{t_p:\underbrace{T_pM\times\cdots\times T_pM}_{k\ \; \mbox{times}}\to R\},$

where $T_pM$ denotes the tangent space at $p\in M$.

For k=1 we obtain the space of covectors at $p$, i.e., linear forms on $T_pM.$

In $T^{(0,k)}_pM$ we introduce the vector space structure by

$(at_p+bs_p)(v_1\ldots,v_k)=at_p(v_1\ldots,v_k)+bs_p(v_1\ldots,v_k),$

where $t_p,s_p\in T^{(0,k)}_pM$, $v_1,\ldots,v_k\in T_pM$ and $a,b\in R$.

For $t_p\in T^{(0,k)}_pM,\, s_p\in T^{(0,m)}_pM$ we define the tensor product $t_p\otimes s_p\in T_p^{(0,k+m)}M$ by

ParseError: KaTeX parse error: Undefined control sequence: \label at position 115: …. , v_{k+m} ), \̲l̲a̲b̲e̲l̲{eq:tensor_prod…

for $v_1,\ldots,v_{k+m}\in T_pM$.

In SageMath Manifolds the symbol of tensor product is simply $*$.

### Covariant tensors in local components

If the tangent vectors $v_i$ are expressed as $v_i=v_i(x^j)\frac{\partial}{\partial x^j}\big|_p=dx^j_p(v_i)\frac{\partial}{\partial x^j}\big|_p, \ \ i=1,\ldots k$, then by the multilinearity of $t_p$ and the definition (9.3) of the tensor product we have for $t_p\in T^{(0,k)}_p$:
$t_p(v_1,\ldots,v_k)=t_p\big(dx^{i_1}_p(v_1)\frac{\partial}{\partial x^{i_1}}\big|_p,\ldots,dx^{i_k}_p(v_k)\frac{\partial}{\partial x^{i_k}}\big|_p\big)\\ =dx^{i_1}_p(v_1)\dots dx^{i_k}_p(v_k)t_p\big(\frac{\partial}{\partial x^{i_1}}\big|_p,\ldots,\frac{\partial}{\partial x^{i_k}}\big|_p\big)\\ =\Big[t_p\big(\frac{\partial}{\partial x^{i_1}}\big|_p,\ldots,\frac{\partial}{\partial x^{i_k}}\big|_p\big)dx^{i_1}_p\otimes\dots\otimes dx^{i_k}_p\Big](v_1,\ldots,v_k),$ so

ParseError: KaTeX parse error: Undefined control sequence: \label at position 83: … dx^{i_k}_p,\\ \̲l̲a̲b̲e̲l̲{}\tag{9.4} \en…

where ParseError: KaTeX parse error: Undefined control sequence: \label at position 139: …}\big|_p\big). \̲l̲a̲b̲e̲l̲{}\tag{9.5} \en…

Example 9.7

Let us check the formula (9.3) in the case of two general tensors from $T^{(0,2)}_pM$ for a 2-dimensional manifold $M$.

N = 2                         # dimension of manifold M
M2 = Manifold(N, 'M2')        # manifold M2 of dimension 2
X = M2.chart(' '.join(['x'+str(i)+':x^{'+str(i)+'}' for i in range(N)]))  # chart on M
p = M2.point(X[:], name='p')  # p -point with coordinates (x^0,x^1)
Tp = M2.tangent_space(p)      # Tp -tangent space at p
t = Tp.tensor((0,2))          # t -tensor from T^{(0,2)}_pM
s = Tp.tensor((0,2))          # s -tensor from T^{(0,2)}_pM


First we define a list of components of four tangent vectors:

M = 4                             # number of vectors
vv=[[var('v'+str(i)+str(j),       # components of four vectors
latex_name='v'+'^{'+str(i)+'}_{'+str(j)+'}')
for i in range(N)] for j in range(M)]
vv                                # show four vectors components


$\displaystyle \left[\left[{v^{0}_{0}}, {v^{1}_{0}}\right], \left[{v^{0}_{1}}, {v^{1}_{1}}\right], \left[{v^{0}_{2}}, {v^{1}_{2}}\right], \left[{v^{0}_{3}}, {v^{1}_{3}}\right]\right]$

and the vectors:

v=[Tp(vv[k]) for k in range(M)];  # list of 4 tangent vectors
v[0].disp()                       # show first tangent vector


$\displaystyle {v^{0}_{0}} \frac{\partial}{\partial {x^{0}} } + {v^{1}_{0}} \frac{\partial}{\partial {x^{1}} }$

Next we define the components of two (0,2)-type tensors $t\$ and $s$.

tt=[[var('t'+str(i)+str(j))       # components of tensor t
for j in range(N)] for i in range(N)]
ss=[[var('s'+str(i)+str(j))       # components of tensor s
for j in range(N)] for i in range(N)]

t[:] = tt                 # define tensor t components t_{ij}
s[:] = ss                 # define tensor s components s_{ij}

t.disp()                         # show t


$\displaystyle t_{00} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + t_{01} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + t_{10} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + t_{11} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}$

s.disp()                         # show s


$\displaystyle s_{00} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + s_{01} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + s_{10} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + s_{11} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}$

Now we are ready to check the formula (9.3).

                                # check the formula (9.3)
bool((t*s)(v[0],v[1],v[2],v[3]) == t(v[0],v[1])*s(v[2],v[3]))


$\displaystyle \mathrm{True}$

### Algebraic properties of tensor product of covariant tensors

Tensor product has the following properties

$\begin{matrix} (a\,r_p + b\,s_p ) ⊗ t_p = a\,r_p ⊗ t_p + b\,s_p ⊗ t_p ,\\ r_p ⊗ (a\,s_p + b\,t_p ) = a\,r_p ⊗ s_p + b\,r_p ⊗ t_p ,\\ (r_p ⊗ s_p ) ⊗ t_p = r_p ⊗ (s_p ⊗ t_p ), \end{matrix}$

for $a,b\in R\$ and for arbitrary covariant tensors $r_p,s_p,t_p$ (the addition is defined only for tensors of the same rank $(0,k)$).

To check the first formula, let us note that for $X_1,\ldots X_{k+l}\in T_pM$

$(ar_p+bs_{ p} ) ⊗ t_p (X_1 , . . . , X_{k+l} ) = (ar_{ p} + bs_{ p} )(X_1 , . . . , X_k ) t_p (X_{k+1} , . . . , X_{k+l} )\\ = (ar_{ p} (X_1 , . . . , X_k ) + b s_{ p} (X_1 , . . . , X_k )) t_p (X_{k+1} , . . . , X_{k+l} ) \\ =ar_{ p} (X_1 , . . . , X_k )t_p (X_{k+1}, . . . , X_{k+l} ) +b s_{ p} (X_1 , . . . , X_k )t_p (X_{k+1} , . . . , X_{k+l} )\\ = (a r_{ p} ⊗ t_p + b s_{ p} ⊗ t_p) (X_1 , . . . , X_{k+l} ),$

and similarly for the second formula.

The associativity follows from

$((r_p ⊗ s_p ) ⊗ t_p)(X_1 , . . . , X_{k+l+m} )\\ = (r_p ⊗ s_p )(X_1 , . . . , X_{k+l} )\; t_p (X_{k+l+1} , . . . , X_{k+l+m} )\\ = (r_p (X_1 , . . . , X_k ) s_p (X_{k+1} , . . . , X_{k+l} )) t_p (X_{k+l+1} , . . . , X_{k+l+m})\\ = r_p (X_1 , . . . , X_k )( s_p (X_{k+1} , . . . , X_{k+l} ) t_p (X_{k+l+1} , . . . , X_{k+l+m} ))\\ = r_p (X_1 , . . . , X_k ) (s_p ⊗ t_p )(X_{k+1} , . . . , X_{k+l+m} )\\ = (r_p ⊗ (s_p ⊗ t_p )) (X_1 , . . . , X_{k+l+m} ),$

for $X_1 , . . . , X_{k+l+m} \in T_pM.$

Example 9.8

Let us show an example of a tensor $t\in T^{(0,3)}_pM$. First let us define the corresponding 3-dimensional table of components.

N = 2                                   # dimension of manifold
st=[[[var('t'+str(i0)+str(i1)+str(i2))  # components of t
for i2 in range(N)]
for i1 in range(N)]
for i0 in range(N)]
st


$\displaystyle \left[\left[\left[t_{000}, t_{001}\right], \left[t_{010}, t_{011}\right]\right], \left[\left[t_{100}, t_{101}\right], \left[t_{110}, t_{111}\right]\right]\right]$

Now we define a manifold $M$, a point $p\in M$, tangent space $T_pM$ and the tensor $t\in T^{(0,3)}_pM$.

M = Manifold(N, 'M')          # 2-dimensional manifold
X = M.chart(' '.join(['x'+str(i)+':x^{'+str(i)+'}' for i in range(N)]))  # chart on M
p = M.point(X[:], name='p')   # point in M
Tp = M.tangent_space(p)       # tangent space T_p
t = Tp.tensor((0,3), name='t')  # tensor of type (0,3)
t[:] = st                       # define components of t
t.disp()                        # show t


$\displaystyle t = t_{000} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + t_{001} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + t_{010} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + t_{011} \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}} + t_{100} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + t_{101} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + t_{110} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + t_{111} \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}$

Next we show how to define a tensor of type (0,3) on a 2-dimensional manifold with concrete components.

ct=range(1,9)                # 1,...,8 -components of t
for i0 in range(N):
for i1 in range(N):
for i2 in range(N):
t[i0,i1,i2]=ct[i0*N*N+i1*N+i2]
t.disp()                     # show t


$\displaystyle t = \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + 2 \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + 3 \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + 4 \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}} + 5 \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + 6 \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + 7 \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + 8 \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}$

Define the local basis of $T_pM$.

Xf = X.frame()                # default frame
Xfp = Xf.at(p); Xfp           # default frame at p


$\displaystyle \left(\frac{\partial}{\partial {x^{0}} },\frac{\partial}{\partial {x^{1}} }\right)$

Check that the component $t_{011}$ of the tensor from the previous example is equal to $t(\frac{\partial}{\partial x_0},\frac{\partial}{\partial x_1},\frac{\partial}{\partial x_1})$.

t(Xfp[0], Xfp[1], Xfp[1])     # value of t(d/dx0,d/dx1,d/dx1)


$\displaystyle 4$

### Space $T^{(k,0)}_pM$ of contravariant tensors of rank $k$

is the space of multilinear forms:

$T^{(k,0)}_pM = \{t_p:\underbrace{T_p^*M\times\cdots\times T_p^*M}_{k\ \;\mbox{times}} \to R\},$

where $T_p^*M$ is the cotangent space at $p\in M$.

In $T^{(k,0)}_pM$ we introduce the vector space structure by

$(at_p+bs_p)(\alpha_1\ldots,\alpha_k)=at_p(\alpha_1\ldots,\alpha_k)+bs_p(\alpha_1\ldots,\alpha_k),$

where $t_p,s_p\in T^{(k,0)}_pM$, $\alpha_1,\ldots,\alpha_k\in T_p^*M$ and $a,b\in R$.

For $t_p\in T^{(k,0)}_pM,s_p\in T^{(m,0)}_pM$ we define the tensor product $t_p\otimes s_p$ by

$$$(t_p ⊗ s_p )(\alpha_1 ,\ldots , \alpha_{k+m} ) = t_p (\alpha_1 ,\ldots, \alpha_k ) s_p (\alpha_{k+1} , \ldots , \alpha_{k+m} ), \tag{9.6}$$$

for $\alpha_1,\ldots,\alpha_{k+m}\in T^*_pM$.

### Contravariant tensors in local components

Let $t_p\in T^{(k,0)}_pM,\ \ α_1 , . . . , α_k ∈ T_p^∗M$ and let all covectors $\alpha_i$ be expressed as $α_i = α_i \big(\frac{∂}{∂ x^j}\big|_p\big) dx^j_ p\ \$ (cf. (9.2)). We have

$t_p(\alpha_1,\ldots,\alpha_k)= t_p\big(\alpha_1\big(\frac{\partial}{\partial x^{i_1}}\big|_p\big)dx^{i_1}_p,\ldots, \alpha_k\big(\frac{\partial}{\partial x^{i_k}}\big|_p\big)dx^{i_k}_p \big)\\ =\alpha_1\big(\frac{\partial}{\partial x^{i_1}}\big|_p\big)\ldots\alpha_k\big(\frac{\partial}{\partial x^{i_k}}\big|_p\big)t_p(dx^{i_1}_p\dots dx^{i_k}_p).$

Since $v_p(\alpha_p)=\alpha_p(v_p)$ we obtain

$t_p(\alpha_1,\ldots,\alpha_k) =\Big[t_p(dx^{i_1}_p,\dots, dx^{i_k}_p)\frac{\partial}{\partial x^{i_1}}\big|_p\otimes\ldots\otimes\frac{\partial}{\partial x^{i_k}}\big|_p\Big](\alpha_1,\ldots,\alpha_k),$ParseError: KaTeX parse error: Undefined control sequence: \label at position 142: …{i_k}}\big|_p, \̲l̲a̲b̲e̲l̲{}\tag{9.7} \en…ParseError: KaTeX parse error: Undefined control sequence: \label at position 73: …s,dx^{i_k}_p). \̲l̲a̲b̲e̲l̲{}\tag{9.7'} \e…

Example 9.9

Let us give an example of a tensor $t_p\in T^{(3,0)}_pM$.

First we define the corresponding 3-dimensional table of components with upper indices.

N = 2                                    # dimension of manifold
st=[[[var('t'+str(i0)+str(i1)+str(i2),
latex_name='t'+'^'+'{'+str(i0)+str(i1)+str(i2)+'}')
for i2 in range(N)]
for i1 in range(N)]           # components of t
for i0 in range(N)]       # with superscripts
st


$\displaystyle \left[\left[\left[{t^{000}}, {t^{001}}\right], \left[{t^{010}}, {t^{011}}\right]\right], \left[\left[{t^{100}}, {t^{101}}\right], \left[{t^{110}}, {t^{111}}\right]\right]\right]$

Now we define a two-dimensional manifold, the tangent space and the tensor $t_p\in T^{(3,0)}_pM$ t with component from the table st.

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')        # point p in M
Tp = M.tangent_space(p)            # tangent space at p
t = Tp.tensor((3,0), name='t')     # tensor of type (3,0)
t[:] = st                          # tensor components


We are ready to display the general tensor of type (3,0) on a 2-dimensional manifold in components.

t.disp()                           # show t


$\displaystyle t = {t^{000}} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} } + {t^{001}} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} } + {t^{010}} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} } + {t^{011}} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} } + {t^{100}} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} } + {t^{101}} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} } + {t^{110}} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} } + {t^{111}} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }$

Here is a tensor of type (3,0) on a 2-dimensional manifold with concrete components:

ct=range(1,9)                     # 1,...,8 - components of t
for i0 in range(N):
for i1 in range(N):
for i2 in range(N):
t[i0,i1,i2]=ct[i0*N*N+i1*N+i2]
t.disp()                         # show t


$\displaystyle t = \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} } + 2 \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} } + 3 \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} } + 4 \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} } + 5 \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} } + 6 \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} } + 7 \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} } + 8 \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }$

Let us define the basis of $T^*_pM$.

Xcf = X.coframe()               # basis of cotangent space
Xcfp = Xcf.at(p); Xcfp          # basis of cotangent space at p


$\displaystyle \left(\mathrm{d} {x^{0}},\mathrm{d} {x^{1}}\right)$

Check that the component $\ t_{011}\$