LearnWave
Learn it. Master it.

Matrices

Multiplying matrices

Multiply matrices and check whether a product is defined.

Multiplying matrices is different: it is not entry by entry.

When is AB possible? The number of columns of A must equal the number of rows of B. Write the orders side by side: (m × n)(n × p). If the two inner numbers match, the product exists, and its order is the two outer numbers, m × p.

A 3 × 2 matrix times a 2 × 4 matrix gives a 3 × 4 matrix. A 2 × 3 times a 2 × 3 does not exist, because 3 ≠ 2.

How to find each entry: row into column. The entry in row i, column j of AB comes from row i of A and column j of B: multiply the matching numbers in pairs, then add.

Example: [1, 2; 3, 4][5, 6; 7, 8].

  • Row 1 with column 1: 1 × 5 + 2 × 7 = 19.
  • Row 1 with column 2: 1 × 6 + 2 × 8 = 22.
  • Row 2 with column 1: 3 × 5 + 4 × 7 = 43.
  • Row 2 with column 2: 3 × 6 + 4 × 8 = 50.

So the product is [19, 22; 43, 50].

Some rules from ordinary numbers fail:

  • Order matters: in general AB ≠ BA. Sometimes AB exists and BA does not even make sense. (Here BA works out to [23, 34; 39, 46], a different matrix.) When AB = BA does happen, A and B are said to commute.
  • Two non-zero matrices can multiply to give the zero matrix, so AB = O does not force A = O or B = O.

Some rules do hold: (AB)C = A(BC) (associative), A(B + C) = AB + AC (distributive), and IA = AI = A for a square matrix A and the identity of the same order.

Powers like A² = AA make sense only for square matrices, since A must be able to multiply itself.

Row of the first × column of the second.
Row of the first × column of the second.

Practise this lesson

Questions that get harder as you improve, a Tutor that helps without giving the answer away, and progress you can see. Free for every learner.

No account, no email address. Opens the real product.