# Tensors: A Simple Introduction For Beginners

## Table of contents

Before we understand tensors in their general definition, let's first get to know them from an engineering perspective. As long as you know scalars, vectors and matrices, it will be easy for you to understand tensors from this perspective, because tensors are nothing more than a generalization of scalars, vectors and matrices. Just as we use scalars, vectors and matrices to describe physical laws, we can use tensors to describe physics. **Tensors are an even more powerful tool** with which we can describe physics that cannot be formulated with scalars, vectors and matrices alone. In order to develop the modern theory of gravity, Albert Einstein first had to understand the concept of tensors. Only then was he able to mathematically formulate the general theory of relativity.

## Zero and first Order Tensors in Physics

Let's start with the simplest tensor: The **zero order tensor**. Represented by a scalar, let's call it \( \sigma \). This tensor is therefore an ordinary number and represents, for example, the electrical conductivity of an isotropic wire. The zeroth-order tensor as conductivity therefore indicates how well a wire conducts electric current.

A somewhat more complex tensor, let's call it \(\boldsymbol{j} \), is a **first-order tensor**. This is a vector with three components \(j_1\), \(j_2\) and \(j_3\) in three-dimensional space.

Of course, the vector can also describe two components or more than three components, as is the case in the general theory of relativity, where we work with tensors in a four-dimensional space-time. This first-order tensor can, for example, describe the current density in a wire.

In Eq. 1

we have represented the first-order tensor as a column vector. Of course, we can also represent it as a row vector:

At this stage, it doesn't matter how we write down the components. But remember that it will matter later!

The notation of first-order tensors as row or column vectors only makes sense when we are calculating with concrete numbers, such as in computer physics, where we use tensors to obtain numerical results. In order to work with them theoretically, for example to derive equations or simply to formulate a physical theory, the tensors are formulated compactly in index notation. You are probably already familiar with this concept from vector calculus. Instead of writing out all three components of the first-level tensor, we write them with an index \(k\), that is: \(j_k\). How we designate the index is irrelevant. \(j_k\) stands for the first component \(j_1\), second \(j_2\) or third \(j_3\) component, depending on what we actually use for index \(k\). In theoretical physics, we usually do not use anything concrete because we want to write the physics as generally and compactly as possible.

It is not clear from this index notation \(j_k\) whether it represents a column or row vector. This is not good, because later it will be important to distinguish between column and row vectors. But we can easily introduce this distinction into our index notation by noting the index at the bottom \(j_k\) if we mean a row vector. And we notate the index above \(j^k\) if we mean a column vector. The notation of indices above and below has a deeper meaning, which we will get to know later. For the time being, we only distinguish the representation of the first level tensor.

## Second level tensor in physics

The next most complex tensor is the **second order tensor**. Let's call this tensor a \( \sigma \), because a second-order tensor can also describe the electrical conductivity like a zero-level tensor. Conductivity as a zero-order tensor describes an *isotropic* material. The conductivity as a second-order tensor, on the other hand, describes a *non-isotropic* material, in which the conductivity is different depending on the direction in which the current flows.

You have probably already become familiar with this tensor in mathematics in the matrix representation. In a three-dimensional space, the second-order tensor is a 3x3 matrix:

We also use index notation for the second-order tensor and write the components of the matrix as \(\sigma_{mk}\), for example. The indices m and k can have the values 1, 2 or 3. The index m indicates the row and the index \(k\) indicates the column.

## Tensors of higher orders

We can continue the game and consider a third order tensor. This tensor has three indices \( \sigma_{mkn} \). The fourth order tensor has four indices: \( \sigma_{mkni} \). And so on. The indices of a tensor of any order can also be superscripted. For example, the indices \(mk\) of the fourth order tensor can be at the top and the indices \(ni\) at the bottom: \({\sigma^{mk}}_{ni} \). You will find out exactly what this means in the next lessons.

The **number of components** \( d^r \) of a tensor depends on the **space dimension** \( d \) and on the **order** (rank) \(r\) of the tensor. In a three-dimensional space \( ( d=3 )\), a second-rank tensor \( ( r=2 )\) consequently has \( 3^2 = 9\) components.

## Properties of Tensors: Symmetric and Antisymmetric

In theoretical physics, especially in the theory of relativity and quantum mechanics, we will regularly encounter symmetric and antisymmetric tensors.

A **symmetric tensor** \( t_{ij} \) remains the same if we swap its indices: \( t_{ij}=t_{ji} \). Swapping the indices of the second-level tensor as a matrix means that the matrix remains the same if we transpose it, that is, mirror the rows and columns on the diagonal:

This symmetry property of tensors is very useful and simplifies calculations tremendously in computational physics. Moreover, this property is crucial in quantum mechanics because symmetric matrices have real eigenvalues. They represent physical quantities (we call them observables) that we can measure in an experiment. So, if you, as a theoretical physicist, encounter a symmetric tensor, you should immediately get a dopamine kick. The Kronecker delta \( \delta_{mk} \), for example, is a concrete example of a simple symmetric tensor.

We have considered a second order tensor. What happens when the tensor is of a higher order? How does its symmetry property look then? For instance, if the tensor has four indices: \( t_{\class{red}{m}\class{blue}{k}ni} \), and it remains the same when we interchange the first two indices: \( t_{\class{red}{m}kni}=t_{\class{blue}{k}\class{red}{m}ni} \), then we refer to it as a **symmetric tensor in the first two indices**, or more precisely, **symmetric in the \( \class{red}{m}\class{blue}{k} \) indices**.

However, we will also encounter tensors that are antisymmetric. An antisymmetric tensor \( t_{ij} \) changes sign if we swap its indices: \( t_{ij}=-t_{ji} \). If the antisymmetric tensor is represented as a matrix, then it is equal to its negative transpose:

Unfortunately, most tensors are neither symmetric nor antisymmetric. But the great thing is: Mathematically, we can decompose every tensor \( T \) into a symmetric \( S_{ij} \) and an antisymmetric \( A \) part: \( T = S + A \).

## Calculating with Tensors

We can do little with tensors alone. We need to be able to do calculations with them. There are several operations with which we can combine two tensors \( a \) and \( b \) to form a new tensor \( c \).

### Addition of Tensors

We can add two tensors \( a_{\class{red}{i}\class{blue}{j}} \) and \( b_{\class{red}{i}\class{blue}{j}} \) of the same order:

The result is a new tensor \( c_{\class{red}{i}\class{blue}{j}} \) *of the same* rank. When we represent tensors \( a_{\class{red}{i}\class{blue}{j}} \) and \( b_{\class{red}{i}\class{blue}{j}} \) as matrices, adding tensors is nothing more than adding matrices component-wise. The component \( a_{\class{red}{1}\class{blue}{1}} \) of matrix \(a\) in the first row and first column is added to the component \( b_{\class{red}{1}\class{blue}{1}} \) of matrix \( b \), which is also in the same column and row. This is how matrix addition works. Similarly, we proceed with all other components.

The result is the matrix \( c \).

### Subtraction of Tensors

We can subtract two tensors \( a_{\class{red}{i}\class{blue}{j}} \) and \( b_{\class{red}{i}\class{blue}{j}} \) of the same order:

The result is a new tensor \( c_{\class{red}{i}\class{blue}{j}} \) of the same rank. Subtraction works analogously to addition. Simply replace the plus sign in Eq. 7

with a minus sign.

### The Outer Product of Tensors (Tensor Product)

The next operation is probably new to you, namely the tensor product \( \otimes \). Sometimes it is also called outer product. In this operation, we don't combine the same components as in the addition and subtraction of tensors. For this operation, we need to label the indices of tensors \( a_{\class{red}{i}\class{blue}{j}} \) and \( b_{\class{green}{k}\class{violet}{m}} \) differently. Therefore, tensor \( b_{\class{green}{k}\class{violet}{m}} \) has been assigned the indices \( \class{green}{k} \) and \( \class{violet}{m} \):

If we form the tensor product of second-order tensors, the result \( c_{\class{red}{i}\class{blue}{j}\class{green}{k}\class{violet}{m}} \) is a fourth-order tensor. On the other hand, if we form the tensor product of first-order tensors \( a_{\class{red}{i}} \) and \( b_{\class{green}{k}} \), the result is a second-order tensor:

This is how the tensor product works with two tensors of any order. The only exception is zeroth-order tensors. In this case, the result remains a zeroth-order tensor. Typically, the tensor symbol \( \otimes \) is omitted in 10

and 11

.

The first index, the index \(\class{red}{i}\), numbers the rows of the matrix by definition and the second index, the index \(\class{green}{k}\), numbers the columns.

~=~ C_{\class{red}{i}\class{blue}{j}\class{green}{m}\class{purple}{k}\class{violet}{n}} \end{align} $$

As you may have noticed, for example, \( B_{\class{purple}{k}\class{violet}{n}} \) specifically represents the \(\class{purple}{k}\class{violet}{n}\)-th component of the tensor \(B\). Similarly, \( A_{\class{red}{i}\class{blue}{j}\class{green}{m}} \) is the \(\class{red}{i}\class{blue}{j}\class{green}{m}\)-th component of the tensor \(A\). When we form the tensor product as in 13

, it is the tensor product of these components. The result is the \(\class{red}{i}\class{blue}{j}\class{green}{m}\class{purple}{k}\class{violet}{n}\)-th component of the tensor \(C\). When we denote a tensor with indices, we always refer to its components. Nevertheless, we colloquially use the term »tensor« to refer to its index notation.

~=~ {{C}^{\class{red}{i}\class{blue}{j}}}_{\class{green}{m}\class{purple}{k}\class{violet}{n}} \end{align} $$

### Contraction of Tensors

The next operation we can perform is the contraction of a tensor. As an example, let's consider a fourth-order tensor: \( t_{ijmk} \). The contraction of this tensor means the following:

- We choose two of its indices. For example, the index \(i\) and \(m\): \( t_{\class{red}{i}j\class{red}{m}k} \).
- Then we set the two indices equal: \( \class{red}{i}=\class{red}{m} \). For example, we can call them both \(\class{red}{i}\): \( t_{\class{red}{i}j\class{red}{i}k} \).
- We then sum over the index \(\class{red}{i}\): \( \underset{\class{red}{i}~=~1}{\boxed{+}} \, t_{\class{red}{i}j\class{red}{i}k} \). In three-dimensional space, the index \(\class{red}{i}\) goes from 1 to 3, therefore the contraction of the tensor \( t_{ijmk} \) results in the following sum: \( t_{\class{red}{1}j\class{red}{1}k}+t_{\class{red}{2}j\class{red}{2}k}+t_{\class{red}{3}j\class{red}{3}k} \).

If we want to communicate these three steps to another physicist, we would say: Contraction of indices \( \class{red}{i} \) and \( \class{red}{m} \) of the tensor \(t_{\class{red}{i}j\class{red}{m}k}\). Or: **Contraction of the first and third index of the tensor** \(t_{\class{red}{i}j\class{red}{m}k}\).

Contraction is very useful because it reduces the order of a tensor. Thus, the contraction of the fourth-rank tensor \(t_{\class{red}{i}j\class{red}{m}k}\) reduces its order by two. The result of the contraction is a second-rank tensor: \( t_{\class{red}{i}j\class{red}{i}k} = c_{jk}. \)

In physics, we use the Einstein's Summation Convention, which states that we can omit the sum sign in \( \underset{\class{red}{i}~=~1}{\boxed{+}} \, t_{\class{red}{i}j\class{red}{i}k} \) to simplify the notation if two identical indices appear in a tensor or tensor product. With the tensor \( t_{\class{red}{i}j\class{red}{i}k} \) in combination with the Einstein's Summation Convention, summation is therefore performed using the index \(\class{red}{i}\): \( t_{\class{red}{i}j\class{red}{i}k} = t_{\class{red}{1}j\class{red}{1}k}+t_{\class{red}{2}j\class{red}{2}k}+t_{\class{red}{3}j\class{red}{3}k} \).

If we contract a *second-order* tensor \( t_{\class{red}{i}\class{red}{i}} \) then the contraction is also called the **trace** \( \mathrm{Tr}(t) \) of the tensor: \( t_{\class{red}{i}\class{red}{i}} = t_{\class{red}{1}\class{red}{1}}+t_{\class{red}{2}\class{red}{2}}+t_{\class{red}{3}\class{red}{3}}=\mathrm{Tr}(t) \). The result is a zero-order tensor, that is, a scalar.

Of course, we can also contract the indices of two different tensors. For example, let's take a tensor \( M_{i\class{red}{j}} \) and a tensor \(v_{\class{red}{k}}\). The tensor product \( M_{i\class{red}{j}}v_{\class{red}{k}} \) without contraction results in a tensor of the third order. Now we contract the indices \(\class{red}{j}\) and \(\class{red}{k}\). In the matrix and vector representation, this corresponds exactly to the multiplication of a matrix \(M\) with a vector \(v\). The result \(u_i\) is a first-order tensor, that is, a vector: