Element-wise notation

Einstein summation convention

A vector can be written as a sum of its components.

\(v=\sum_i e_i v^i\)

The Einstein summation convention is to remove the \(\sum_i \) symbols where they are implicit.

For example we would instead write the vector as:


Adding vectors

\(v+w=(\sum_i e_i v^i)+(\sum_i f_iw^i)\)

\(v+w=\sum_i (e_iv^i+f_iw^i)\)


If the bases are the same then:

\(v+w=e_i (v^i+w^i)\)

Scalar multiplication


\(cv=\sum_i ce_iv^i\)


Matrix multiplication



Inner products

\(\langle v, w\rangle =\langle \sum_i e_iv^i, \sum_j f_jw^j\rangle \)

\(\langle v, w\rangle =\sum_iv^i\langle e_i, \sum_j f_iw^j\rangle \)

\(\langle v, w\rangle =\sum_i \sum_jv^i\overline {w^j}\langle e_i, f_j\rangle\)

If the two bases are the same then:

\(\langle v, w\rangle =\sum_i \sum_jv^i\overline {w^j}\langle e_i, e_j\rangle\)

We can define the metric as:

\(g_{ij}:=\langle e_i,e_j\rangle \)

\(\langle v, w\rangle =v^i\overline {w^j}g_{ij}\)

Covariant and contravariant bases

In element form we write a vector as:


The indices are raised and lowered to reflect whether the value is covariant or contravariant.

\(v^i\) is contravariant. If the basis moves one way, it moves the other.

\(e_i\) is covariant. If the basis moves, it moves with it.

Tensor product

Tensor product

We have spaces \(V\) and \(W\) over field \(F\). If we have a linear operation which takes a vector from each space and returns a scalar from the underlying field, it is an element of the tensor product of the two spaces.

For example if we have two vectors:



A tensor product would take these and return a scalar.

There are three types of tensor products:

  • Both are from the vector space

  • \(T_{ij}v^iw^j\)

  • \(T_{ij} \in V\otimes W\)

  • Both are from the dual space

  • \(T^{ij}v_iw_j\)

  • \(T_{ij} \in V^*\otimes W^*\)

  • One is from each space

  • \(T_i^jv^iw_j\)

  • \(T_{ij} \in V\otimes W^*\)

As a vector space, we can add together tensor products, and do scalar multiplication.

Basis of a tensor product

Not all elements spanned by a basis of a tensor product are themselves tensor products.

Eigenvalues and Eigenvectors of a tensor product


We can define homomorphisms in terms of tensor products.

\(Hom (V) =V \otimes V^*\)


We use the dual space for the second argument. This is because it ensures that changes to the bases do not affect the maps.

\(w^j=T_i^j v^i\)

Raising and lowering indices

We showed that the inner product between two vectors with the same basis can be written as:

\(\langle v, w\rangle =\langle \sum_i e_iv^i, \sum_j f_jw^j\rangle \)

\(\langle v, w\rangle =v^i\overline {w^j}\langle e_i, e_j\rangle\)

Defining the metric as:

\(g_{ij}:=\langle e_i,e_j\rangle \)

\(\langle v, w\rangle =v^i\overline {w^j}g_{ij}\)

Metric inverse

We can use this to define the inverse of the metric.


We can use this to raise and lower vectors.


Raising and lowering indices of tensors

If we have tensor:


We can define:



Tensor contraction

If we have:


We can contract it to:


Similarly we can have:


Kronecker delta

Consider matrix multiplication \(AI\).

We have:


We write this instead as:


Where \(\delta_{jk}=0\) if \(j\ne k\) and \(\delta_{jk}=1\) if \(j=k\).

Tensors form a vector space


Tensors form a vector space

Dimension of a tensor

Basis of a tensor


Tensor valence

Tensor inverses

For second order tensors we have:

  • \(T_j^i\)

  • \(T_{ij}\)

  • \(T^{ij}\)

For each of these we can define an inverse:

  • \(T_i^jU_j^k=\delta_i^k\)

  • \(T_{ij}U^{jk}=\delta_i^k\)

  • \(T^{ij}U_{jk}=\delta_i^k\)

Notation for inverses

If we have \(T_{ij}U^{jk}=\delta_i^k\), we can instead write:


Tensor contraction

We have a vector \(v\in V\) and \(w\in V^*\).

\(\mathbf v=\sum_i v^i \mathbf e_i\)

\(\mathbf w=\sum_i w_i \mathbf f^i\)

\(\mathbf w\mathbf v=[\sum_i v^i \mathbf e_i][\sum_i w_i \mathbf f^i]\)

\(\mathbf w\mathbf v=\sum_i \sum_j [v^i \mathbf e_i][w_j \mathbf f^j]\)

\(\mathbf w\mathbf v=\sum_i \sum_j v^i w_j \mathbf e_i\mathbf f^j\)

We use the dual basis so:

\(\mathbf w\mathbf v=\sum_i \sum_j v^i w_j \mathbf e_i\mathbf e^j\)

\(\mathbf w\mathbf v=\sum_i \sum_j v^i w_j \delta_i^j\)

We can see that this value is unchanged when there is a change in basis.

What if these were both from \(V\)?

\(\mathbf v=\sum_i v^i \mathbf e_i\)

\(\mathbf w=\sum_i w^i \mathbf e_i\)

\(\mathbf w\mathbf v=[\sum_i v^i \mathbf e_i][\sum_i w^i \mathbf e_i]\)

\(\mathbf w\mathbf v=\sum_i \sum_j v^i w^j \mathbf e_i\mathbf e_i\)

This term is dependent on the basis, and so we do not contract.

So if we have \(v_iw^i\), we can contract, because the result (calculated from the components) does not depend on the basis.

But if we have \(v_iw_i\), the result (calcualted from the components) will change depending on the choice of basis.

We define a new object

\(c=\sum_i w^iv_i\)

This new term, c, does not depend on \(i\), and so we have contracted the index.

Symmetric and antisymmetric tensors

Consider a tensor, e g \(T_{abc}\).

In general, this is not symmetric, that is:

\(T_{abc}\ne T_{bac}\)

Symmetric part of a tensor

We can write the symmetric part of this with regard to \(a\) and \(b\).


Clearly, \(T_{(ab)c}=T_{(ba)c}\)

Antisymmetric part of a tensor

We can also have an an antisymmetric part with regard to \(a\) and \(b\).


Clearly, \(T_{[ab]c}=-T_{[ba]c}\)

Tensors as sums of their symmetric and antisymmetric parts



Higher-order tensors

Higher-order tensors

We can create higher order tensors products. For example

\(V\otimes V \otimes V\otimes V^* \otimes V^*\)

We write elements of these as:


We can map from matrix to matrix etc higher dimensional

Matrix has \(A\): \(a_{ij}\).

Tensor can have \(T\): \(t_{ijk}\) for example

\(0\) rank tensor: scalar

\(1\) rank tensor: vector

\(2\) rank tensor: matrix

page on covariance and contravariance and type \((p,q)\)


Outer product

The outer product is a bilinear map

This is a bilinear map from two vectors from the same vector space to another vector space.

\(V\times V \rightarrow V\)

Calculating the outer product

\(u\otimes v = w\)


The dimensions of the tensor outer product

\(\dim (V \otimes W)= \dim V \times \dim W \)

Outer product on the complex numbers

Relation between the dot product and outer product

The dot product in the trace of the outer product.

Kronecker product

The Kronecker product takes the concept of the outer product and applies to to matrices.

We can essentially repace every element in the matrix on the left with the element multiplied by the entire matrix on the right.

Like outer products, Kronecker products are written as:

\(u\otimes v=w\)

Dot product

Dot product is a bilinear form

This is a bilinear form, a mapping from two vectors in the same vector space to the underlying field.

\(V\times V \rightarrow F\)

Calculating the dot product

This is calculated by multiplying each matching element, and summing the results.

\(u\cdot v =\sum_{i=1}^nu_iv_i\)

Dot product on the complex numbers

Properties don’t hold. Can get zero vectors from non-zero inputs. Get complex numbers from dot product on itself.

Inner products better deal with complex number fields. However they are not bilinear maps.

Homomorphism as a tensor product


A tensor is an element of a tensor product.