Skip to main content

Index Notation

Previously, we introduced matrices and how they can be used to represent linear transformations. We will now introduce a new notation that simplifies the representation of matrices and vectors (sometimes): index notation.

This is usually not used in introductory linear algebra courses, but it is widely used in physics and engineering. Especially in higher-level courses like tensor calculus, index notation is used extensively, so it's good to get a head start.

This page is completely optional, and you can skip it if you're not interested in the topic.

Table of Contents

Vectors in Index Notation

As we know, a vector can be represented as a list of numbers. They represent the coefficients of the basis vectors in the vector space.

For example, in , a vector can be represented as:

For the purposes of this page, we can use a more general notation for the basis vectors. We will use to represent the -th basis vector. So instead of , , and , we can write , , and .

Then, the vector can be written as:

Notice that we can write this in a more compact form using a summation:

In -dimensional space, we can write this as:

Linear Transformations in Index Notation

Matrices can also be represented in index notation. A matrix can be represented as a two-dimensional array of numbers.

To index the elements of the matrix, we use two indices: one for the row and one for the column. Remember: first count the rows (from top to bottom) and then the columns (from left to right).

The matrix can be represented as:

In general, an matrix can be represented as:

Now let's think about how we can write the rules for linear transformations (matrix-vector multiplication) in index notation. When we multiply a matrix with a vector , we get a new vector . This can be written as:

Recall that each column in the matrix represents the image of the corresponding basis vector under the transformation. This means that can be written as:

Then, we can write that the first component of is:

Likewise, the second and third components of can be written as:

If we call this component of as , we can write this more generally as:

Then, the entire vector can be written as:

Often, in higher-level courses, these summations are very, very common. For example, in tensor calculus, you will regularly see expressios with three, four, or more indices. Hence, the summation notation is often dropped, and the summation is implied. This means that the above equation can be written as:

The index is called a dummy index. This means that it is summed over, and it doesn't matter what letter we use. In contrast, the index is a free index, and it is not summed over.x This notion of omitting the summation symbol is called Einstein summation convention.

Matrix Multiplication in Index Notation

Now, let's think about how we can write the rules for multiplying two matrices in index notation. When we multiply two matrices and , we get a new matrix . Recall that this represents the composition of two linear transformations.

We have previously discussed the intuition and the rules for multiplying matrices together. To summarize, for a matrix and a matrix , the product can be written as:

We can notice that the first element of the matrix is:

The second and third elements of the matrix in the first row can be written as:

Here are more examples:

Notice the numbers that are colored; the and indices are the indices we are using to access the matrix . These are the free indices. In contrast, the indices are summed over, so they are the dummy indices.

If we generalize this, we can write the element of the matrix as:

And in the Einstein summation convention, this can be written as: