On this post you will see how to calculate a matrix multiplication. We explain the procedure of multiplying matrices step by step through an example, and then you will find solved exercises so that you can also practice. Finally, you will learn when two matrices cannot be multiplied and all the properties of this matrix operation.

Table of Contents

## How to multiply two matrices?

To **multiply two matrices**, multiply the rows of the matrix on the left by the columns of the matrix on the right.

Let’s see the procedure of how to do the multiplication of two matrices with an example:

First of all, we have to multiply **the first row of the matrix on the left by the first column of the matrix on the right.** To do this, we multiply each element in the first row by each element in the first column one by one, and then we add the results. So all of this will be the first element in the first row of the resulting matrix. Take a look at the procedure:

We do the calculations:

Secondly, we have to multiply **the first row by the second column**. So we repeat the procedure: we multiply each element in the first row by each element in the second column one by one, and then we add the results. And all this will be the second element of the first row of the resulting matrix:

We perform the operations:

Once we have calculated the first row of the resulting matrix, we move on to the second row. So we multiply **the second row by the first column** repeating the procedure: we multiply each element of the second row by each element of the first column one by one, and then we add the results:

Thus:

Finally, we multiply **the second row by the second column**. Always applying the same procedure: we multiply each element in the second row by each element in the second column one by one, and then we add the results:

Which results in the following matrix:

And here ends the product of the two matrices. As you have seen, the rows have to be multiplied by the columns, always repeating the same procedure: we multiply each element in the row by each element in the column one by one, and then we add the results of the multiplications.

## Practice matrix multiplication

### Problem 1

Solve the following 2×2 matrix multiplication:

**See solution**

It is a product of matrices of order 2:

To solve a matrix product we must multiply the rows of the matrix on the left by the columns of the matrix on the right.

Therefore, we first multiply the first row by the first column. To do this, we multiply each element in the first row by each element in the first column one by one, and add the results.

Now we multiply the first row by the second column in order to find the second element of the first row of the resulting matrix:

We go to the second row, so we multiply the second row by the first column:

Finally, we multiply the second row by the second column to calculate the last element of the matrix:

So the result of the matrix product of 2×2 matrices is as follows:

### Problem 2

Multiply the following 2×2 matrices:

**See solution**

To solve the matrix product we have to multiply the rows of the matrix on the left by the columns of the matrix on the right:

### Problem 3

Calculate the following 3×3 matrix multiplication:

**See solution**

To perform the 3×3 matrix multiplication, we must multiply the rows of the matrix on the left by the columns of the matrix on the right:

### Problem 4

Given matrix A:

Calculate:

**See solution**

First we will calculate the transpose of matrix A in order to do the multiplication. And to transpose a matrix we have to interchange its rows by its columns, in other words, the first row of the matrix becomes the first column of the matrix, and the second row of the matrix becomes the second column of the matrix.

So the matrix operation is:

Now we can do the calculations. We first multiply matrix A by the scalar 2 (although we could also calculate A·A^{T} first):

And finally, we solve the matrix product:

### Problem 5

Given the following matrices:

Calculate:

**See solution**

It is an operation that combines a subtraction together with a multiplication of square matrices of order 2:

We first calculate the multiplication on the left:

Now we solve the multiplication on the right:

And finally we subtract the matrices:

## When can’t two matrices be multiplied?

Due to the matrix multiplication rules, not all matrices can be multiplied. **Two matrices can only be multiplied if the number of columns of the matrix on the left is the same as the number of rows of the matrix on the right.**

For example, the following multiplication cannot be performed because the first matrix has 3 columns and the second matrix has 2 rows:

However, if we reverse the order, they can be multiplied. Since the first matrix has two columns and the second matrix has two rows:

## Properties of matrix multiplication

This type of matrix operation has the following characteristics:

- Matrix multiplication is
**associative**, so the following equation always holds:

- Matrix multiplication also has the
**distributive**property, so:

- The product of matrices
**is not commutative**, that is, the result of multiplying two matrices depends on the order in which they are multiplied:

For example, the following matrix multiplication gives a result:

But the result of the product is different if we change the order of matrix multiplication:

When the multiplication of two matrices gives the same result regardless of the multiplication order they are commuting matrices. But these type of matrices are very unusual.

- Multiplying two matrices and then transposing the result is equivalent to transposing each matrix first and then multiplying them but changing their order of multiplication:

- Also, any matrix multiplied by the identity matrix results in the same matrix. This is called the
**multiplicative identity property:**

For example:

- Any matrix multiplied by the null matrix is equal to the null matrix. This is called the
**multiplicative property of zero:**

For example: