THE BIG QUESTION01 / 12

Can a Phone Recognize Your Face?

AI begins with numbers, even when the world looks visual.

Your eyes see a face.
What does AI process?
Camera image↓Numbers↓Organised as a Matrix↓Patterns
THE FOUNDATION02 / 12

What Is a Matrix?

A matrix is a rectangular arrangement of numbers in rows and columns.

[
235410
]
→ ROWSHorizontal lines
↓ COLUMNSVertical lines
Every number inside is an element
Millions of numbers? Matrices keep them organised.
MATRIX BASICS03 / 12

Rows × Columns = Order

The dimensions of a matrix tell us how its elements are arranged.

[
235410
]
2 rows · 3 columns
2 × 3
Order: Rows first, then Columns
a₂₃ = 0Second row, third column
a₁₂ = 3First row, second column
AI AND IMAGES04 / 12

A Picture Can Become a Matrix

Grayscale pixel brightness can be represented by numbers from 0 to 255.

3 × 3 grayscale image
→
[
0802551602206030190130
]
Each pixel's brightness = one number
0 = Black
255 = White
AI calculates on these numbers to find patterns
A real photo has millions of pixels!
AI AND DATA05 / 12

Training Data Can Be a Matrix

Rows represent examples. Columns represent features.

StudentStudy
hours
Practice
sets
A23
B41
C32
→
Feature matrix X
[
234132
]
Row = one student
Column = one feature
3 examples × 2 features · Used in Machine Learning
THE FIRST AI CALCULATION06 / 12

Weights Combine Information

A simple model multiplies feature values by weights and adds the results.

Student A · Features
[
23
]
×
Example weights
[
21
]
=
Score
7
2 × 2 + 3 × 1 = 4 + 3 = 7
Weight = importance of a feature
Illustrative score — not actual exam marks
In real ML, the model learns weights through training
MATRIX MULTIPLICATION07 / 12

Calculate Many Scores at Once

One matrix product can calculate outputs for several examples together.

X · 3 × 2
[
234132
]
×
W · 2 × 1
[
21
]
=
Y · 3 × 1
[
798
]
Columns of X (2) = Rows of W (2)The inner numbers must match
✓ Multiplication is possible
A: 2×2 + 3×1 = 7B: 4×2 + 1×1 = 9C: 3×2 + 2×1 = 8
Many examples, one calculation
You: check Student C!
WHERE LEARNING HAPPENS08 / 12

AI Learns by Adjusting Weights

Training measures errors, then updates weights.

Does multiplying matrices alone make AI learn? No!
DATATraining examples
↓
PREDICTUse current weights
↓
COMPAREMeasure the error
↓
UPDATEChange the weights
↻ Repeat to reduce prediction errors
Matrix multiplicationhelps calculate
Traininghelps learn better weights
THE NEXT LEVEL09 / 12

Neural Networks Use Matrices Too

Layers use matrix multiplication, bias, and activation functions.

InputHiddenOutput
Matrix multiplication · Bias · Activation
Layer output = f(XW + b)
X InputW Weight matrixb Biasf Activation function
REAL-WORLD CONNECTIONS10 / 12

You Already Use Matrix-Powered AI

Different AI applications share the same mathematical foundation.

▦ → ?
Image recognition

Face Unlock · pixel values reveal visual patterns.

[A B C]
Language models

ChatGPT · words become numbers that are transformed.

U × I
Recommendations

YouTube, shopping apps · patterns across users and items.

Matrices = a key foundation of modern AI
PAUSE AND PRACTISE11 / 12

Your Turn: Solve the Product

Pause for 10 seconds and solve before looking at the answer.

[
32
]
×
[
21
]
=
?
A. 5B. 7C. 8D. 10
Think, calculate, then explain.
ANSWER AND RETRIEVAL12 / 12

The Answer Is 8. Explain Why.

When you can explain an idea, you are more likely to remember it.

8
3 × 2 = 62 × 1 = 26 + 2 = 8
01 · DEFINEWhat is a matrix? How do we find its order?
02 · CALCULATEImages and data as matrices; multiplication in AI
03 · EXPLAINModels adjust weights during training
30-SECOND CHALLENGEExplain to a friend: what is the role of matrices in AI?
Understanding, not just memorising
Keep Learning What Lasts!
LEARN WHAT LASTS · MATHEMATICS & AI