Matrix Multiplication Examples- Practice Problems

Matrix Multiplication Examples That Actually Make Sense

Most textbooks turn a simple concept into a nightmare. Here's the truth: matrix multiplication is just systematic multiplication and addition. Once you see the pattern, you'll wonder why anyone made it seem complicated.

What You Need Before Multiplying

Two matrices can multiply only if the columns of the first matrix equal the rows of the second matrix.

Say you have a 2Ɨ3 matrix and a 3Ɨ4 matrix. The inner numbers match (both are 3), so multiplication works. The result will be a 2Ɨ4 matrix.

If those numbers don't match, stop. There's no point trying to multiply.

How to Multiply Two Matrices

Here's the process:

That's it. Every single entry comes from one row times one column.

Example 1: Simple 2Ɨ2 Multiplication

Multiply:

A = [2, 3]
怀怀[1, 4]

B = [5, 1]
怀怀[2, 6]

Step 1: Find entry (1,1)

Row 1 of A = [2, 3]
Column 1 of B = [5, 2]

2Ɨ5 + 3Ɨ2 = 10 + 6 = 16

Step 2: Find entry (1,2)

Row 1 of A = [2, 3]
Column 2 of B = [1, 6]

2Ɨ1 + 3Ɨ6 = 2 + 18 = 20

Step 3: Find entry (2,1)

Row 2 of A = [1, 4]
Column 1 of B = [5, 2]

1Ɨ5 + 4Ɨ2 = 5 + 8 = 13

Step 4: Find entry (2,2)

Row 2 of A = [1, 4]
Column 2 of B = [1, 6]

1Ɨ1 + 4Ɨ6 = 1 + 24 = 25

Result:

[16, 20]
[13, 25]

Example 2: Different Dimensions

Multiply:

A = [1, 2, 3]
怀怀[4, 5, 6]怀怀This is a 2Ɨ3 matrix

B = [7, 8]
怀怀[9, 10]
怀怀[11, 12]怀怀This is a 3Ɨ2 matrix

The result will be 2Ɨ2.

Entry (1,1): Row 1 Ɨ Column 1
(1Ɨ7) + (2Ɨ9) + (3Ɨ11) = 7 + 18 + 33 = 58

Entry (1,2): Row 1 Ɨ Column 2
(1Ɨ8) + (2Ɨ10) + (3Ɨ12) = 8 + 20 + 36 = 64

Entry (2,1): Row 2 Ɨ Column 1
(4Ɨ7) + (5Ɨ9) + (6Ɨ11) = 28 + 45 + 66 = 139

Entry (2,2): Row 2 Ɨ Column 2
(4Ɨ8) + (5Ɨ10) + (6Ɨ12) = 32 + 50 + 72 = 154

Result:

[58, 64]
[139, 154]

Example 3: Real-World Style Problem

A store sells 3 products. Matrix P shows units sold this week:

P = [20, 15, 8]怀Product A, B, C

Matrix C shows prices and weights:

C = [25, 2]
怀怀[40, 3]
怀怀[15, 1]

Column 1 = price per unit, Column 2 = weight per unit

What does P Ɨ C give you?

Since P is 1Ɨ3 and C is 3Ɨ2, result is 1Ɨ2.

Entry (1,1): Total revenue
(20Ɨ25) + (15Ɨ40) + (8Ɨ15) = 500 + 600 + 120 = $1,220

Entry (1,2): Total weight
(20Ɨ2) + (15Ɨ3) + (8Ɨ1) = 40 + 45 + 8 = 93 units

One multiplication, two answers. That's the power of matrix math.

Practice Problems

Problem 1

Multiply:

[3, 1] Ɨ [2, 5]
怀怀怀[4, 6]

Problem 2

Multiply:

[1, 0, 2] Ɨ [3, 1]
怀怀怀怀怀怀[2, 4]
怀怀怀怀怀怀[1, 0]

Problem 3

If A = [2, 1] and B = [3], find A Ɨ B.
怀怀怀怀怀[1, 3]怀怀怀[1]
怀怀怀怀怀怀怀怀怀怀怀 [2]

Problem 4

Multiply these 3Ɨ3 matrices:

[1, 2, 3] Ɨ [1, 0, 0]
[4, 5, 6]怀[0, 1, 0]
[7, 8, 9]怀[0, 0, 1]

Solutions

Solution 1

[3, 1] Ɨ [2, 5] = [(3Ɨ2 + 1Ɨ4), (3Ɨ5 + 1Ɨ6)] = [10, 21]
怀怀怀[4, 6]

Solution 2

[1, 0, 2] Ɨ [3, 1] = [5, 1]
怀怀怀怀怀怀[2, 4]
怀怀怀怀怀怀[1, 0]

Check: (1Ɨ3 + 0Ɨ2 + 2Ɨ1) = 5
(1Ɨ1 + 0Ɨ4 + 2Ɨ0) = 1

Solution 3

[2, 1] Ɨ [3] = [7, 5]
[1, 3]怀[1]怀[6, 6]
怀怀怀怀 [2]

Entry (1,1): 2Ɨ3 + 1Ɨ1 = 7
Entry (1,2): 2Ɨ1 + 1Ɨ3 = 5
Entry (2,1): 1Ɨ3 + 3Ɨ1 = 6
Entry (2,2): 1Ɨ1 + 3Ɨ3 = 10

Solution 4

This is multiplication by the identity matrix. The result equals the original matrix:

[1, 2, 3]
[4, 5, 6]
[7, 8, 9]

Common Mistakes

MistakeWhat Actually Happens
Multiplying in wrong orderAƗB ≠ BƗA in most cases. Order matters.
Forgetting to check dimensionsIf columns of A ≠ rows of B, multiplication fails
Multiplying corresponding positions onlyThat's element-wise multiplication, not matrix multiplication
Skipping the addition stepEach entry is a sum of products, not just one product

When You'll Actually Use This

Computer graphics use matrix multiplication to rotate, scale, and move objects. Neural networks multiply huge matrices of weights and inputs. Game physics engines do it thousands of times per second.

The examples above are tiny. Real applications involve matrices with hundreds of rows and columns. But the process is identical. You now have the foundation.