← Back to all lessons
Class 12Algebra18:35Published 13 May 2026

Product of Matrices

An introduction to multiplying matrices for Class 12: when two matrices can be multiplied, the row-into-column method, and the laws that matrix multiplication obeys, worked through several questions from Exercise 3.2.

This lesson teaches how to find the product of two matrices. It starts with the condition for multiplication, that the number of columns of the first matrix must equal the number of rows of the second, and how that fixes the order of the answer. It then walks through the row-into-column rule with worked examples, and covers the laws of matrix multiplication: not commutative, associative, distributive, and the existence of an identity matrix. Several questions from Exercise 3.2 are solved in full.

What you'll learn

  • When two matrices can be multiplied, and how to read off the order of the product
  • How to multiply matrices using the row into column rule and add up the products
  • Why matrix multiplication is not commutative but is associative and distributive
  • How the identity matrix acts as the multiplicative identity for square matrices

Lesson chapters

0:00When can two matrices be multiplied
1:52First example: row into column
4:22Multiplying two square matrices
6:26Laws of matrix multiplication
10:40Exercise 3.2: worked questions

Lesson notes

This lesson introduces the product of two matrices: when the product exists, the row-into-column rule for computing it, and the laws matrix multiplication obeys, followed by several worked questions from Exercise 3.2.

When can two matrices be multiplied

To find the product ABAB, the number of columns of AA must equal the number of rows of BB. If AA has order m×nm \times n and BB has order n×pn \times p, then the product ABAB exists and has order m×pm \times p.

To multiply, take row into column (not row into row): multiply the first row of AA by the first column of BB element by element and add up, then the first row by the second column, and so on. Move to the second row of AA and repeat against each column of BB.

First example

Let A=[345125]A = \begin{bmatrix} 3 & 4 & 5 \\ 1 & 2 & 5 \end{bmatrix} (order 2×32 \times 3) and B=[123]B = \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix} (order 3×13 \times 1).

Since the columns of AA match the rows of BB, the product has order 2×12 \times 1: AB=[3(1)+4(2)+5(3)1(1)+2(2)+5(3)]=[3+8+151+4+15]=[2620]AB = \begin{bmatrix} 3(1) + 4(2) + 5(3) \\ 1(1) + 2(2) + 5(3) \end{bmatrix} = \begin{bmatrix} 3 + 8 + 15 \\ 1 + 4 + 15 \end{bmatrix} = \begin{bmatrix} 26 \\ 20 \end{bmatrix}

Multiplying two square matrices

Let P=[1325]P = \begin{bmatrix} 1 & 3 \\ 2 & 5 \end{bmatrix} and Q=[4526]Q = \begin{bmatrix} 4 & 5 \\ 2 & 6 \end{bmatrix}, both 2×22 \times 2, so PQPQ is 2×22 \times 2.

PQ=[1(4)+3(2)1(5)+3(6)2(4)+5(2)2(5)+5(6)]=[10231840]PQ = \begin{bmatrix} 1(4) + 3(2) & 1(5) + 3(6) \\ 2(4) + 5(2) & 2(5) + 5(6) \end{bmatrix} = \begin{bmatrix} 10 & 23 \\ 18 & 40 \end{bmatrix}

Laws of matrix multiplication

  • Not commutative. In general ABBAAB \neq BA.
  • Associative. (AB)C=A(BC)(AB)C = A(BC).
  • Distributive. A(B±C)=AB±ACA(B \pm C) = AB \pm AC and (A±B)C=AC±BC(A \pm B)C = AC \pm BC.
  • Multiplicative identity. For every square matrix there is an identity matrix of the same order that acts as the multiplicative identity. I1,I2,I3I_1, I_2, I_3 are the identities for square matrices of order 1,2,31, 2, 3 respectively, so for a 2×22 \times 2 matrix the identity is I2I_2.

Exercise 3.2: worked questions

Question 1

Compute [abba][abba]\begin{bmatrix} a & b \\ -b & a \end{bmatrix} \begin{bmatrix} a & b \\ -b & a \end{bmatrix}. The product is 2×22 \times 2: [a(a)+b(b)a(b)+b(a)b(a)+a(b)b(b)+a(a)]=[a2+b200a2+b2]\begin{bmatrix} a(a) + b(-b) & a(b) + b(a) \\ -b(a) + a(-b) & -b(b) + a(a) \end{bmatrix} = \begin{bmatrix} a^2 + b^2 & 0 \\ 0 & a^2 + b^2 \end{bmatrix} The off-diagonal entries are abab=0ab - ab = 0 and ab+ab=0-ab + ab = 0.

Question 2

Multiply the column matrix by the row matrix. Here A=[123]A = \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix} is 3×13 \times 1 and B=[234]B = \begin{bmatrix} 2 & 3 & 4 \end{bmatrix} is 1×31 \times 3, so the answer is 3×33 \times 3. Each entry is one element of AA times one element of BB (do not add): AB=[2344686912]AB = \begin{bmatrix} 2 & 3 & 4 \\ 4 & 6 & 8 \\ 6 & 9 & 12 \end{bmatrix}

Question 4

Let A=[234345456]A = \begin{bmatrix} 2 & 3 & 4 \\ 3 & 4 & 5 \\ 4 & 5 & 6 \end{bmatrix} and B=[135024305]B = \begin{bmatrix} 1 & -3 & 5 \\ 0 & 2 & 4 \\ 3 & 0 & 5 \end{bmatrix}, both 3×33 \times 3, so ABAB is 3×33 \times 3: AB=[2+0+126+6+010+12+203+0+159+8+015+16+254+0+1812+10+020+20+30]=[140421815622270]AB = \begin{bmatrix} 2 + 0 + 12 & -6 + 6 + 0 & 10 + 12 + 20 \\ 3 + 0 + 15 & -9 + 8 + 0 & 15 + 16 + 25 \\ 4 + 0 + 18 & -12 + 10 + 0 & 20 + 20 + 30 \end{bmatrix} = \begin{bmatrix} 14 & 0 & 42 \\ 18 & -1 & 56 \\ 22 & -2 & 70 \end{bmatrix}

Question 6

Let A=[313102]A = \begin{bmatrix} 3 & -1 & 3 \\ -1 & 0 & 2 \end{bmatrix} (2×32 \times 3) and B=[231031]B = \begin{bmatrix} 2 & -3 \\ 1 & 0 \\ 3 & 1 \end{bmatrix} (3×23 \times 2), so ABAB is 2×22 \times 2: AB=[61+99+0+32+0+63+0+2]=[14645]AB = \begin{bmatrix} 6 - 1 + 9 & -9 + 0 + 3 \\ -2 + 0 + 6 & 3 + 0 + 2 \end{bmatrix} = \begin{bmatrix} 14 & -6 \\ 4 & 5 \end{bmatrix}

Key takeaways

  • The product ABAB exists only when the columns of AA equal the rows of BB; if AA is m×nm \times n and BB is n×pn \times p, then ABAB is m×pm \times p.
  • Multiply row into column: pair each row of the first matrix with each column of the second, multiply matching elements, and add.
  • Matrix multiplication is associative and distributive but not commutative, and every square matrix has an identity matrix of the same order as its multiplicative identity.