Multiplication or product of matrices. Exercises solved step by step.

Do you want to learn the multiplication of matrices step by step? Next I’m going to explain how to make the product of matrices, with exercises solved step by step.

Unlike with numbers, which we can multiply any of them, we cannot multiply any matrix.

[announcement_b30 id=4]

How to multiply matrices. Matrices product

To multiply two matrices, a very important condition must be met:

The number of columns in the first matrix must be equal to the number of rows in the second matrix. [/box]

To define the dimensions of an array, 2×2, 3×3, 3×2… the first dimension refers to the rows of the array and the second dimension to the columns:

how to multiply matrices

Therefore, if we have a matrix A of m rows and n columns, we can only multiply it by a matrix B that has n rows and p columns (same number of columns of A, same number of rows of B):

how to multiply matrices

The resulting matrix will have the same number of rows as A and the same number of columns as B.

Anyway, you don’t have to learn this by heart to know how to multiply matrices. You just have to keep in mind that you can’t multiply any matrix. They must always fulfill the previous condition and that the resulting matrix will have different dimensions to the two matrices that are multiplied.

Matrices product. Solved exercises

Let’s see how the matrix product is performed with one exercise.

Exercise 1

Let matrices A and B be as follows:

multiply matrices

Multiply AxB.

First of all, can AxB be multiplied?

We have to look at the columns of A and the rows of B. Matrix A has 3 columns and matrix B has 3 rows. They are the same and can therefore be multiplied.

multiplication of matrices step by step

To multiply two matrices, we must multiply each row of the first matrix by each column of the second matrix.

box]Rows are multiplied by columns[/box]

Let’s see it step by step.

First we multiply the first row of A by the first column of B. A scalar product is made, that is, the elements of the row and the column are multiplied and their results are added as follows:

The first element of the row by the first element of the column…

…more…

the second element of the row by the second element of the column…

…more…

…the third element of the row by the third element of the column.

This operation, which is the result of multiplying the first row by the first column, will form the first element of the first row of the resulting matrix:

multiplication of matrices exercises solved step by step

We continue multiplying the first row of A by the second column of B. We multiply each element of the row by each element of the column (first by first, second by second and third by third) and the operation will form the second element of the first row of the resulting matrix:

condition to multiply matrices

So far we have multiplied the first row of A by all the columns of B. With your results, we have formed the first row of the resulting matrix.

We repeat the same with the second row of A, multiplying it by each of B’s columns.

We continue with the second row of A by the first column of B, whose result will form the first element of the second row:

matrices multiplication

And to finish we multiply the second row of A by the second column of B, to form the second element of the second row:

multiplication of solved example matrices
Now we have multiplied all the rows of A by all the columns of B and it only remains to perform the operations we have left in each element:

multiplication of an array

Note that the dimensions of the resulting matrix are different from A and B (it has the same rows as A and the same columns as B).

[announcement_b30 id=4]

Exercise 2

Calculate the possible products between the following matrices:

matrix product

What we are asked in this exercise is to multiply the matrices that can be multiplied. To do this, the number of columns in the first matrix must be equal to the number of rows in the second matrix.

Let’s start with matrix A, which has 3 columns. We can multiply this matrix by the matrices that have 3 rows. First, we can multiply it by the same matrix A, which also has 3 rows.

We make the product of matrices of A.A=.

matrix product exercises

We multiply rows by columns:

How matrix product is made

And we operate:

matrix product examples

Matrix B also has 3 rows, so we can multiply A.B=.

exercises product of matrices

We multiply rows by columns and operate:

examples matrix product

We continue with matrix B which has 1 column. We can multiply it by any matrix that has 1 row, but in this case we don’t have any, since matrix A has 3 rows, matrix B itself has 3 rows and matrix C has 2 rows. Therefore, matrix B cannot be multiplied by any matrix.

Finally we are going to see the possible products of matrices with the shade C. Matrix C has 3 columns, so we can multiply it by matrices that have 3 rows.

Matrix A has 3 rows, so we multiply C.A:

matrix product step by step

We multiply rows by columns:

ejercicios resueltos producto de matrices

And we operate:

square matrix product

Matrix C can also be multiplied by matrix B, which has 3 rows:

producto de matrices algebra

We multiply rows by columns and operate:

matrix product equal to zero

Now that you know how to multiply matrices, let’s look at the properties of the square matrices product.

[ad_b30 id=4]

Properties of square matrix multiplication

1- The product of square matrices fulfills the associative property

multiplication of solved example matrices

2- The neutral element is the matrix identity

Any matrix multiplied by the identity matrix will result in the same matrix. The matrix identity is as if it were 1 for the numbers.

3- The multiplication of matrices is not commutative in general.

As a general rule, the multiplication of A by B does not have the same result as B by A.

multiply different matrices dimensions
There may be the case that A.B=B.A, but it is not normal.

4- It is distributive with respect to the sum

multiply two matrices

5- The product of two non-null matrices can be a null matrix.

For example:

matrix multiplication exercises

6- Given a square matrix A, there will not always be an inverse matrix that complies:

matrix exercises multiplication