This post is part of the “Matrix Multiplication in Excel” series. It’s composed of a math introduction (you are here), a silly interlude and an interactive tutorial. By the end of the series, you’ll learn how to perform Markov Chain calculations, which are used in some damage calculations.

A matrix (plural matrices) is a rectangular array of numbers, symbols or expressions arranged in rows and columns. For matrix below, the element at row and column is indexed as .

### A Few Matrix Operations

Matrices have lots of applications, but it’s probably best to start by thinking of them as an abstract entity with a set of rules to learn. For example:

- Multiplying a matrix by a constant multiplies each element of the matrix by that constant.
- Matrices can be added or subtracted from each other if they have the same dimensions. The operation is parsed entry by entry.
- Transposing a matrix exchanges every row with its column and vice-versa. This is indicated through a superscript capital T.

For instance, suppose you had two matrices, A and B with the following values:

What would be the value of:

If you don’t have experience with matrices and want to learn, I’d recommend working out the answer yourself before clicking here for the answer.

### Dot Products

One last operation before we turn to matrix multiplication. Dot products are performed on two equal-length sequences of numbers. In Excel, it is performed through the `=sumproduct()`

function. Dot products are equal to the sum of the products of each corresponding row. For instance:

## Matrix Multiplication

With these lemmas out of the way, let’s learn about Matrix Multiplication.

When you multiply an matrix by a matrix, you produce an matrix. **The number of columns in the first matrix has to match the number of rows in the second matrix.**

Unlike traditional multiplication, matrix multiplication isn’t commutative. Five times seven equals seven times five. However:

- A matrix times a matrix produces a matrix.
- A matrix times a matrix produces a matrix.
- A matrix times a matrix produces a matrix.
- A matrix times a matrix produces an error.

Each entry is equal to the dot product of row in matrix A and column in Matrix B.

An example is provided below. In it, a matrix is multiplied by a matrix to produce a matrix. Element is stepped out, and the final result is displayed.

At this point, this post may seem exceedingly esoteric. Pardon my platonism. For now, trust me when I say that matrix multiplication, and linear algebra as a whole, are far more useful than they immediately appear. After a brief interlude, I’ll show you how to perform these calculations in Excel and an important application for financial expert witnesses. Stay tuned.