# 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).

In [1]:
version()

Out[1]:
'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

$$df_p(X_p)=X_p(f),\quad\mbox{for } X_p\in T_pM. \label{} \tag{9.1}$$

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$.

In [2]:
%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

Out[2]:
$\displaystyle \left({x^{0}}, {x^{1}}, {x^{2}}\right)$
In [3]:
print(v)                               # information on v
v.comp()[:]                            # components of v

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

Out[3]:
$\displaystyle \left[{v^0}, {v^1}, {v^2}\right]$
In [4]:
f.disp()                               # show scalar function f

Out[4]:
$\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$:

In [5]:
# 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:

Out[5]:
$\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)$:

In [6]:
bool(dfp(v)==v(f))                   # check if df_p(v)=v(f)

Out[6]:
$\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:

In [7]:
# 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

$$\displaystyle dx^i_p(X_p)=X_p(x^i), \label{}\tag{9.1'}$$

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.

In [8]:
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()

Out[8]:
$\displaystyle \left({x^{0}}, {x^{1}}, {x^{2}}\right)$

### And next their differentials:¶

In [9]:
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

Out[9]:
$\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$.

In [10]:
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

Out[10]:
$\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

$$\alpha_p= \alpha_p\Big( \frac{\partial}{\partial x^i}\big|_p\Big)dx^i_p. \label{} \tag{9.2}$$

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.$

In [11]:
# continuation
dfp.disp()                       # show df_p

Out[11]:
$\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.

In [12]:
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

In [13]:
a.disp()                  # show a

Out[13]:
$\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.

In [14]:
#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

Out[14]:
$\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)$.

In [15]:
v(a)                      # value of v on a

Out[15]:
$\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.

In [16]:
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

Out[16]:
$\displaystyle T_{p}\,M$
In [17]:
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

In [18]:
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*

Out[18]:
$\displaystyle T_{p}\,M^*$
In [19]:
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

$$(t_p ⊗ s_p )(v_1 ,\ldots , v_{k+m} ) ≡ t_p (v_1 ,\ldots, v_k ) s_p (v_{k+1} , . . . , v_{k+m} ), \label{eq:tensor_product}\tag{9.3}$$

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

$$t_p=t_{i_1\ldots i_k}dx^{i_1}_p\otimes\dots\otimes dx^{i_k}_p,\\ \label{}\tag{9.4}$$

where $$t_{i_1\ldots i_k}=t_p\big(\frac{\partial}{\partial x^{i_1}}\big|_p,\ldots,\frac{\partial}{\partial x^{i_k}}\big|_p\big). \label{}\tag{9.5}$$

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$.

In [20]:
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:

In [21]:
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

Out[21]:
$\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:

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

Out[22]:
$\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$.

In [23]:
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}

In [24]:
t.disp()                         # show t

Out[24]:
$\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}}$
In [25]:
s.disp()                         # show s

Out[25]:
$\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).

In [26]:
                                # 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]))

Out[26]:
$\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.

In [27]:
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

Out[27]:
$\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$.

In [28]:
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

Out[28]:
$\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.

In [29]:
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

Out[29]:
$\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$.

In [30]:
Xf = X.frame()                # default frame
Xfp = Xf.at(p); Xfp           # default frame at p

Out[30]:
$\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})$.

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

Out[31]:
$\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),$$

so $$t_p=t^{i_1\ldots i_k}_p\frac{\partial}{\partial x^{i_1}}\big|_p\otimes\dots\otimes\frac{\partial}{\partial x^{i_k}}\big|_p, \label{}\tag{9.7}$$

$$t_p^{i_1\ldots i_k}=t_p(dx^{i_1}_p,\ldots,dx^{i_k}_p). \label{}\tag{9.7'}$$

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.

In [32]:
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

Out[32]:
$\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.

In [33]:
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.

In [34]:
t.disp()                           # show t

Out[34]:
$\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:

In [35]:
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

Out[35]:
$\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$.

In [36]:
Xcf = X.coframe()               # basis of cotangent space
Xcfp = Xcf.at(p); Xcfp          # basis of cotangent space at p

Out[36]:
$\displaystyle \left(\mathrm{d} {x^{0}},\mathrm{d} {x^{1}}\right)$

Check that the component $\ t_{011}\$ is equal to $\ t( dx^0,dx^1, dx^1)$.

In [37]:
t(Xcfp[0], Xcfp[1], Xcfp[1])    # value of t(dx0,dx1,dx1)

Out[37]:
$\displaystyle 4$

### General tensors from $T^{(k,m)}_pM$¶

Since the definition of $T^{(k,m)}_pM$ was given above we start from definition of tensor product.

For $t_p\in T^{(k_1,m_1)},s_p\in T^{(k_2,m_2)}_pM$ we define the tensor product $t_p\otimes s_p\in T_p^{(k_1+k_2,m_1+m_2)}$ by

$$(t_p ⊗ s_p )(\alpha_1,\ldots\alpha_{k_1+k_2},v_1 ,\ldots , v_{m_1+m_2} )\\ =t_p (\alpha_1,\ldots,\alpha_{k_1},v_1 ,\ldots, v_{m_1} ) s_p (\alpha_{k_1+1},\ldots,\alpha_{k_1+k_2},v_{m_1+1},\ldots, v_{m_1+m_2} ), \tag{9.8}$$

for $\alpha_1,\ldots,\alpha_{k_1+k_2}\in T^*_pM$ and $v_1,\ldots,v_{m_1+m_2}\in T_pM$.

Generalizing the formulas (9.5) and (9.7) we obtain the following expression for the general tensor $t_p\in T^{(k,l)}_pM$ in local components

$$t_p= t_p\big(dx^{i_1}_p,..,dx^{i_k}_p,\frac{\partial}{\partial x^{j_1}}\big|_p,..,\frac{\partial}{\partial x^{j_m}}\big|_p\big) \frac{\partial}{\partial x^{i_1}}\big|_p\otimes..\otimes\frac{\partial}{\partial x^{i_k}}\big|_p\otimes dx^{j_1}_p\otimes..\otimes dx^{j_m}_p. \label{}\tag{9.9}$$

Very often the notation $$t^{i_1\ldots i_k}_{j_1\ldots j_m}=t_p\big(dx^{i_1}_p,..,dx^{i_k}_p,\frac{\partial}{\partial x^{j_1}}\big|_p,..,\frac{\partial}{\partial x^{j_m}}\big|_p\big) \tag{9.10}$$ is used and then $$t_p=t^{i_1\ldots i_k}_{j_1\ldots j_m}\frac{\partial}{\partial x^{i_1}}\big|_p\otimes\dots\otimes\frac{\partial}{\partial x^{i_k}}\big|_p\otimes dx^{j_1}_p\otimes\ldots\otimes dx^{j_m}_p. \tag{9.11}$$

To check that the elements

$$\frac{\partial}{\partial x^{i_1}}\big|_p\otimes\dots\otimes\frac{\partial}{\partial x^{i_k}}\big|_p\otimes dx^{j_1}_p\otimes\ldots\otimes dx^{j_m}_p \label{} \tag{9.12}$$

are linearly independent, assume that the linear combination

$$a^{i_1\ldots i_k}_{j_1\ldots j_m}\frac{\partial}{\partial x^{i_1}}\big|_p\otimes\dots\otimes\frac{\partial}{\partial x^{i_k}}\big|_p\otimes dx^{j_1}_p\otimes\ldots\otimes dx^{j_m}_p$$

vanishes. If we apply this combination to $\quad(dx^{q_1}_p,\ldots,dx^{q_k}_p,\frac{\partial}{\partial x^{r_1}}\big|_p,..,\frac{\partial}{\partial x^{r_m}}\big|_p\big)\$ we get $\ \displaystyle a^{q_1\ldots q_k}_{r_1\ldots r_m}=0$.
Since previously we have checked that elements of the type (9.12) span $T^{(k,l)}_pM$ we have proved, that these elements form a basis for $T^{(k,m)}_pM$.

Example 9.10

To show an example of a tensor $t_p\in T^{(2,2)}_pM$, we first define a 4-dimensional table with lower and upper indices.

In [38]:
N = 2                                           # dimension of manifold
st=[[[[var('t'+str(i0)+str(i1)+str(i2)+str(i3),
latex_name='t'+'^'+'{'+str(i0)+str(i1)+'}'+'_'+'{'+str(i2)+str(i3)+'}')
for i3 in range(N)] for i2 in range(N)]     # components of t with upper
for i1 in range(N)] for i0 in range(N)]   # and lower indices
st

Out[38]:
$\displaystyle \left[\left[\left[\left[{t^{00}_{00}}, {t^{00}_{01}}\right], \left[{t^{00}_{10}}, {t^{00}_{11}}\right]\right], \left[\left[{t^{01}_{00}}, {t^{01}_{01}}\right], \left[{t^{01}_{10}}, {t^{01}_{11}}\right]\right]\right], \left[\left[\left[{t^{10}_{00}}, {t^{10}_{01}}\right], \left[{t^{10}_{10}}, {t^{10}_{11}}\right]\right], \left[\left[{t^{11}_{00}}, {t^{11}_{01}}\right], \left[{t^{11}_{10}}, {t^{11}_{11}}\right]\right]\right]\right]$

Now define a 2-dimensional manifold $M$, tangent space at $p$ and $\ t_p\in T^{(2,2)}_pM$.

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


We can display a general tensor from $T_p^{(2,2)}M$ on a 2-dimensional manifold ($2^4$ components).

In [40]:
t.disp()                        # show t

Out[40]:
$\displaystyle t = {t^{00}_{00}} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + {t^{00}_{01}} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + {t^{00}_{10}} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + {t^{00}_{11}} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}} + {t^{01}_{00}} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + {t^{01}_{01}} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + {t^{01}_{10}} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + {t^{01}_{11}} \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}} + {t^{10}_{00}} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + {t^{10}_{01}} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + {t^{10}_{10}} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + {t^{10}_{11}} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}} + {t^{11}_{00}} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + {t^{11}_{01}} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + {t^{11}_{10}} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + {t^{11}_{11}} \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}$
In [41]:
#tt=t*t
#tt[:] very long output


A more concrete example can be defined as follows:

In [42]:
ct=range(1,17)         # [1,...,16] consecutive components
for i0 in range(N):
for i1 in range(N):
for i2 in range(N):
for i3 in range(N):
t[i0,i1,i2,i3]=ct[i0*N*N*N+i1*N*N+i2*N+i3]

In [43]:
t.disp()

Out[43]:
$\displaystyle t = \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + 2 \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + 3 \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + 4 \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}} + 5 \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + 6 \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + 7 \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + 8 \frac{\partial}{\partial {x^{0}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}} + 9 \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + 10 \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + 11 \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + 12 \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{0}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}} + 13 \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{0}} + 14 \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{0}}\otimes \mathrm{d} {x^{1}} + 15 \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{0}} + 16 \frac{\partial}{\partial {x^{1}} }\otimes \frac{\partial}{\partial {x^{1}} }\otimes \mathrm{d} {x^{1}}\otimes \mathrm{d} {x^{1}}$
In [44]:
#(t*t).disp()  - latex code
#(t*t)[:]  # long output


Using the bases of $T_pM$ and $T^*_pM$,

In [45]:
Xf = X.frame()                             # frame (d/dx0,d/dx1)
Xfp = Xf.at(p); print("Xfp-", Xfp)         # frame (d/dx0,d/dx1) at p
Xcf = X.coframe()                          # coframe (dx0,dx1)
Xcfp = Xcf.at(p); print("Xcfp-", Xcfp)     # coframe (dx0,dx1) at p

Xfp- Basis (∂/∂x0,∂/∂x1) on the Tangent space at Point p on the 2-dimensional differentiable manifold M
Xcfp- Dual basis (dx0,dx1) on the Tangent space at Point p on the 2-dimensional differentiable manifold M


one can check that the component $\ \ t^{10}_{01}\ \$ is equal to $\ \ t(dx_1,dx_0,\frac{\partial}{\partial x_0},\frac{\partial}{\partial x_1})$:

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

Out[46]:
$\displaystyle 10$

## What's next?¶

Take a look at the notebook Alternating forms on modules.