Lesson 3 · Properties of Matrix Multiplication

Multiplication of Matrices

Optional MathematicsSubject
8 minEstimated read

Adding a Matrix to Itself

Start with a matrix you already know how to add. Take \( A = \begin{pmatrix} a & b \\ c & d \end{pmatrix} \). To add two matrices of the same order, we add the elements that sit in the same position. So adding A to itself gives:

\[ A + A = \begin{pmatrix} a+a & b+b \\ c+c & d+d \end{pmatrix} \]

Each element has been doubled, so we write the answer as 2A:

\[ 2A = \begin{pmatrix} 2a & 2b \\ 2c & 2d \end{pmatrix} \]

Adding A three times works the same way. Every element appears three times in its own position, so A + A + A becomes:

\[ 3A = \begin{pmatrix} 3a & 3b \\ 3c & 3d \end{pmatrix} \]

Look at what the number in front has done. The 2 in 2A did not change only one corner of the matrix. It reached every element. The 3 in 3A did the same. This is exactly the idea of multiplying a matrix by a number, and it is the first kind of multiplication in this topic.

Multiplying a Matrix by a Scalar

Definition

Scalar: a single number, such as 3, \( -2 \) or \( \frac{1}{2} \). A scalar is not arranged in rows and columns, which is what makes it different from a matrix.

Definition

Scalar multiplication: If A is any matrix and k is a scalar, then kA is the matrix obtained by multiplying each element of A by k.

For a 2 × 2 matrix, the rule looks like this:

\[ k\begin{pmatrix} a & b \\ c & d \end{pmatrix} = \begin{pmatrix} ka & kb \\ kc & kd \end{pmatrix} \]

Two things do not change when a matrix is multiplied by a scalar. The order stays the same, so a 2 × 3 matrix multiplied by 5 is still a 2 × 3 matrix. And each element stays in its own place; it is only made k times bigger. When k is negative, every sign in the matrix flips. When an element is 0, it stays 0.

Common mistake

Do not multiply only the first row, or only the first element, by k. The scalar multiplies every element of the matrix, including the negative ones.

Worked Examples on Scalar Multiplication

Example 1. If \( A = \begin{pmatrix} 2 & -1 & 0 \\ 3 & 4 & -5 \end{pmatrix} \), find kA, and hence find 3A and \( -2A \).

Step 1: Multiplying each element of A by k:

\[ kA = \begin{pmatrix} 2k & -k & 0 \\ 3k & 4k & -5k \end{pmatrix} \]

Step 2: Putting k = 3 into kA:

\[ 3A = \begin{pmatrix} 6 & -3 & 0 \\ 9 & 12 & -15 \end{pmatrix} \]

Step 3: Putting \( k = -2 \) into kA. Every nonzero element changes sign because it is multiplied by a negative number:

\[ -2A = \begin{pmatrix} -4 & 2 & 0 \\ -6 & -8 & 10 \end{pmatrix} \]

Example 2. Let \( M = \begin{pmatrix} 3 & 1 \\ -1 & 2 \end{pmatrix} \) and \( N = \begin{pmatrix} 1 & 1 \\ 3 & 0 \end{pmatrix} \). P is a 2 × 2 matrix such that 3M + 5N + 2P = O, where O is the zero matrix of order 2 × 2. Find P.

Step 1: Multiplying M by the scalar 3:

\[ 3M = \begin{pmatrix} 9 & 3 \\ -3 & 6 \end{pmatrix} \]

Step 2: Multiplying N by the scalar 5:

\[ 5N = \begin{pmatrix} 5 & 5 \\ 15 & 0 \end{pmatrix} \]

Step 3: Adding 3M and 5N, element by element:

\[ 3M + 5N = \begin{pmatrix} 14 & 8 \\ 12 & 6 \end{pmatrix} \]

Step 4: Since 3M + 5N + 2P = O, taking 3M + 5N to the other side gives 2P = O minus that sum. Subtracting from the zero matrix changes every sign:

\[ 2P = \begin{pmatrix} -14 & -8 \\ -12 & -6 \end{pmatrix} \]

Step 5: Multiplying both sides by the scalar \( \frac{1}{2} \):

\[ P = \begin{pmatrix} -7 & -4 \\ -6 & -3 \end{pmatrix} \]

Key idea

You can check an answer like this by putting it back. Here 2P plus 3M plus 5N gives \( -14 + 9 + 5 = 0 \) in the first corner, and the other three positions also give 0.

The Row by Column Rule

Multiplying one matrix by another matrix is a different operation. It is not done by multiplying elements in the same position. Instead, a ROW of the first matrix is paired with a COLUMN of the second. The first element of the row is multiplied by the first element of the column, the second by the second, and so on, and then all these products are added.

Definition

Row by column rule: to multiply a row by a column, multiply their elements in pairs, first with first, second with second, and so on, and add the products. The sum is one element of the product matrix.

\[ \begin{pmatrix} a & b & c \end{pmatrix}_{1\times 3} \begin{pmatrix} x \\ y \\ z \end{pmatrix}_{3\times 1} = \begin{pmatrix} ax+by+cz \end{pmatrix}_{1\times 1} \]

Here is the rule with numbers. We find \( \begin{pmatrix} 2 & 3 & 1 \end{pmatrix} \begin{pmatrix} 4 \\ 5 \\ 6 \end{pmatrix} \).

Step 1: Pairing each element of the row with the matching element of the column:

\[ 2 \times 4 + 3 \times 5 + 1 \times 6 \]

Step 2: Working out the products and adding them:

\[ 8 + 15 + 6 = 29 \]

So the product is the 1 × 1 matrix (29). Notice that the row had three elements and the column also had three. If the column had only two, the third element of the row would have no partner, and the product could not be formed at all. That observation is the whole rule for when two matrices can be multiplied.

When Can Two Matrices Be Multiplied?

In the product AB, the first matrix A is called the multiplier and the second matrix B is called the multiplicand. Each row of A must be paired with each column of B. A row of A has as many elements as A has columns, and a column of B has as many elements as B has rows. So the pairing works only when the number of columns in A equals the number of rows in B.

Definition

Conformable matrices: Two matrices \( A_{m\times n} \) and \( B_{p\times q} \) are said to be conformable for matrix multiplication if and only if n = p, and the product matrix AB then has the order m × q.

The two inside numbers of the orders must match. The two outside numbers give the order of the product AB.
The two inside numbers of the orders must match. The two outside numbers give the order of the product AB.

A quick way to test any pair is to write the two orders side by side. If the inside numbers match, the product exists, and the outside numbers are its order. The table shows this test on some pairs.

Order of AOrder of BDoes AB exist?Order of AB
2 × 33 × 1Yes, 3 = 32 × 1
1 × 22 × 2Yes, 2 = 21 × 2
3 × 22 × 2Yes, 2 = 23 × 2
2 × 11 × 2Yes, 1 = 12 × 2
2 × 23 × 2No, 2 is not 3no product

Matrix Multiplication in Daily Life

Matrix multiplication is not only a classroom rule. It is how a shopkeeper works out a bill. A school stationery shop buys notebooks and pens on three days. The quantities bought and the prices are shown below.

DayNotebooksPens
Monday2015
Tuesday2510
Wednesday1820
ItemPrice
NotebookRs 60 each
PenRs 25 each

The cost for Monday is 20 notebooks at Rs 60 plus 15 pens at Rs 25. That is a row times a column:

\[ \begin{pmatrix} 20 & 15 \end{pmatrix} \begin{pmatrix} 60 \\ 25 \end{pmatrix} = (1200 + 375) = (1575) \]

Tuesday gives 25 × 60 + 10 × 25 = 1500 + 250 = 1750, and Wednesday gives 18 × 60 + 20 × 25 = 1080 + 500 = 1580. Instead of three separate sums, all three days can be done at once. The quantities form a 3 × 2 matrix and the prices form a 2 × 1 matrix, so the product is 3 × 1:

\[ \begin{pmatrix} 20 & 15 \\ 25 & 10 \\ 18 & 20 \end{pmatrix} \begin{pmatrix} 60 \\ 25 \end{pmatrix} = \begin{pmatrix} 1575 \\ 1750 \\ 1580 \end{pmatrix} \]

Each row of the answer is the cost in rupees for one day: Rs 1575 on Monday, Rs 1750 on Tuesday and Rs 1580 on Wednesday.

Multiplying Two 2 × 2 Matrices

Now take two square matrices, \( A = \begin{pmatrix} a & b \\ c & d \end{pmatrix} \) and \( B = \begin{pmatrix} w & x \\ y & z \end{pmatrix} \). Both are 2 × 2, so AB exists and is also 2 × 2. It has four elements, and each one comes from one row of A meeting one column of B.

Step 1: Row 1 of A with column 1 of B gives the element in row 1, column 1 of AB:

\[ aw + by \]

Step 2: Row 1 of A with column 2 of B gives the element in row 1, column 2:

\[ ax + bz \]

Step 3: Row 2 of A with column 1 of B gives the element in row 2, column 1:

\[ cw + dy \]

Step 4: Row 2 of A with column 2 of B gives the element in row 2, column 2:

\[ cx + dz \]

Putting the four elements in their places:

\[ AB = \begin{pmatrix} aw+by & ax+bz \\ cw+dy & cx+dz \end{pmatrix} \]

Key idea

The element in row i and column j of AB always comes from row i of A and column j of B. Know which row and which column you are using, and you will never put an element in the wrong place.

Worked Example: AB Is Not Equal to BA

Example 3. Given \( A = \begin{pmatrix} 3 & 2 \\ 1 & -4 \end{pmatrix} \) and \( B = \begin{pmatrix} 5 & -1 \\ 2 & 3 \end{pmatrix} \), find A × A, A × B and B × A.

Finding A × A, which is also written \( A^2 \). Step 1: Applying row by column to all four positions:

\[ A^2 = \begin{pmatrix} 3 \times 3 + 2 \times 1 & 3 \times 2 + 2 \times (-4) \\ 1 \times 3 + (-4) \times 1 & 1 \times 2 + (-4)(-4) \end{pmatrix} \]

Step 2: Working out each element:

\[ A^2 = \begin{pmatrix} 11 & -2 \\ -1 & 18 \end{pmatrix} \]

Finding A × B. Step 1: Rows of A with columns of B:

\[ AB = \begin{pmatrix} 3 \times 5 + 2 \times 2 & 3(-1) + 2 \times 3 \\ 1 \times 5 + (-4) \times 2 & 1(-1) + (-4) \times 3 \end{pmatrix} \]

Step 2: Working out each element:

\[ AB = \begin{pmatrix} 19 & 3 \\ -3 & -13 \end{pmatrix} \]

Finding B × A. Now B comes first, so the rows come from B and the columns from A. Step 1: Rows of B with columns of A:

\[ BA = \begin{pmatrix} 5 \times 3 + (-1) \times 1 & 5 \times 2 + (-1)(-4) \\ 2 \times 3 + 3 \times 1 & 2 \times 2 + 3(-4) \end{pmatrix} \]

Step 2: Working out each element:

\[ BA = \begin{pmatrix} 14 & 14 \\ 9 & -8 \end{pmatrix} \]

Compare the last two answers. AB and BA use the same two matrices, but they are completely different matrices. With ordinary numbers, 3 × 5 and 5 × 3 are equal. With matrices, changing the order changes which rows meet which columns, so the answer changes.

Definition

Matrix multiplication is not commutative: for two matrices A and B, in general \( AB \neq BA \).

Order matters

AB means A first and B second. Never swap the matrices in a product to make the working easier, because the swapped product is usually a different matrix, or may not exist at all.

Worked Example: When Only One Product Exists

Example 4. If \( A = \begin{pmatrix} 1 & 3 \\ -2 & 0 \\ 4 & -1 \end{pmatrix} \) and \( B = \begin{pmatrix} 2 & -1 \\ 3 & 5 \end{pmatrix} \), find AB and BA wherever possible.

Step 1: Checking the orders for AB. A is 3 × 2 and B is 2 × 2. The number of columns of A is 2 and the number of rows of B is 2, so AB exists and its order is:

\[ A_{3\times 2} \, B_{2\times 2} = (AB)_{3\times 2} \]

Step 2: Multiplying each of the three rows of A by each of the two columns of B:

\[ AB = \begin{pmatrix} 2 + 9 & -1 + 15 \\ -4 + 0 & 2 + 0 \\ 8 - 3 & -4 - 5 \end{pmatrix} \]

Step 3: Adding in each position:

\[ AB = \begin{pmatrix} 11 & 14 \\ -4 & 2 \\ 5 & -9 \end{pmatrix} \]

Step 4: Checking the orders for BA. B is 2 × 2 and A is 3 × 2. The number of columns of B is 2 but the number of rows of A is 3:

\[ B_{2\times 2} \, A_{3\times 2}, \quad 2 \neq 3 \]

The matrices are not conformable in this order, so BA does not exist. This example shows a second reason why order matters: one product can exist while the other cannot even be formed.

Worked Example: Finding an Unknown Matrix

Example 5. Find the matrix X if \( \begin{pmatrix} 3 \\ 2 \end{pmatrix} X = \begin{pmatrix} 12 & -6 \\ 8 & -4 \end{pmatrix} \).

Step 1: Finding the order of X. The multiplier has order 2 × 1 and the product has order 2 × 2. For the orders to work, X must have 1 row (to match the 1 column) and 2 columns (to give the 2 columns of the product):

\[ (2\times 1)(1\times 2) = (2\times 2) \]

Step 2: Letting \( X = \begin{pmatrix} a & b \end{pmatrix} \) and multiplying row by column:

\[ \begin{pmatrix} 3 \\ 2 \end{pmatrix} \begin{pmatrix} a & b \end{pmatrix} = \begin{pmatrix} 3a & 3b \\ 2a & 2b \end{pmatrix} \]

Step 3: Setting this equal to the given product:

\[ \begin{pmatrix} 3a & 3b \\ 2a & 2b \end{pmatrix} = \begin{pmatrix} 12 & -6 \\ 8 & -4 \end{pmatrix} \]

Step 4: By equality of matrices, elements in the same position are equal. So 3a = 12, which gives a = 4, and 3b = \( -6 \), which gives b = \( -2 \). The second row agrees, since 2 × 4 = 8 and 2 × (\( -2 \)) = \( -4 \). Hence:

\[ X = \begin{pmatrix} 4 & -2 \end{pmatrix} \]

Worked Example: Proving a Matrix Equation

Example 6. If \( M = \begin{pmatrix} 2 & 1 \\ 3 & 0 \end{pmatrix} \) and I is the identity matrix of order 2 × 2, prove that \( M^2 - 2M - 3I = O \). Recall that \( I = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} \) and O is the zero matrix.

Step 1: Finding \( M^2 = M \times M \) by the row by column rule:

\[ M^2 = \begin{pmatrix} 4 + 3 & 2 + 0 \\ 6 + 0 & 3 + 0 \end{pmatrix} = \begin{pmatrix} 7 & 2 \\ 6 & 3 \end{pmatrix} \]

Common mistake

\( M^2 \) does not mean squaring each element. Squaring the elements here would give \( \begin{pmatrix} 4 & 1 \\ 9 & 0 \end{pmatrix} \), which is wrong. \( M^2 \) is M multiplied by M, row by column.

Step 2: Multiplying M by the scalar 2:

\[ 2M = \begin{pmatrix} 4 & 2 \\ 6 & 0 \end{pmatrix} \]

Step 3: Multiplying I by the scalar 3:

\[ 3I = \begin{pmatrix} 3 & 0 \\ 0 & 3 \end{pmatrix} \]

Step 4: Subtracting 2M and 3I from \( M^2 \), position by position:

\[ \begin{pmatrix} 7 - 4 - 3 & 2 - 2 - 0 \\ 6 - 6 - 0 & 3 - 0 - 3 \end{pmatrix} = \begin{pmatrix} 0 & 0 \\ 0 & 0 \end{pmatrix} \]

Every element is 0, so \( M^2 - 2M - 3I = O \), which was to be proved. This one question used both kinds of multiplication: row by column for \( M^2 \), and scalar multiplication for 2M and 3I.

🔐

The full lesson is waiting for you

The notes are free to read in full. A free account opens the rest of the practice, and tracks your progress and confidence score for every subject. Presentations and videos need approval from Learn Yeti.