Linear Algebra & Multivariable Calculus
Vectors, matrices, and gradients: the language every machine-learning idea is secretly written in.
AI tutor is turned off for this class
Use the MATH51 lectures, notes, and assignments below to keep learning.
Big Idea
The Math Underneath
Grade bands
K-2 · 3-5 · 6-8 · 9-12
AI literacy pillar
How AI works · Ethics
Lesson overview
Vectors, matrices, and gradients: the language every machine-learning idea is secretly written in. This module climbs from an everyday intuition to the real mechanism, then names the Stanford course it descends from.
Teacher script · ~45 min
- 0–5
Hook
A vector is just a list of numbers, or an arrow pointing somewhere. A matrix is a grid of numbers that transforms arrows: stretching, rotating, squishing space. Almost all of data science is moving points around with matrices, so this is the alphabet.
- 5–15
Explore
Students do the activity in pairs: Rotate a square drawn on graph paper 90 degrees by hand. The rule you used (swap and flip coordinates) IS a 2x2 matrix.
- 15–30
Explain
When a quantity depends on many inputs (loss depends on millions of weights), the gradient is the arrow pointing in the direction that increases it fastest. Walk the opposite way and you descend. Every neural network trains by repeatedly stepping downhill along the negative gradient. Calculus, in many dimensions, is just 'which way is up?'
- 30–40
Connect to the summit
Show students this is the real thing professionals build: MATH51, the real thing. Vectors, matrices, and gradients: the language every machine-learning idea is secretly written in.
- 40–45
Check
Run the formative check below. Anyone who can explain a key term in their own words has it.
Student activity
Rotate a square drawn on graph paper 90 degrees by hand. The rule you used (swap and flip coordinates) IS a 2x2 matrix.
Slides
Formative check
- 1.In your own words, what is "Vector"? (Looking for: An ordered list of numbers; geometrically, an arrow with direction and length.)
- 2.In your own words, what is "Matrix"? (Looking for: A grid of numbers that transforms vectors: rotating, scaling, projecting them.)
- 3.In your own words, what is "Gradient"? (Looking for: The vector pointing in the direction a multi-input function increases fastest.)
Carry-away concepts
- Vector
- An ordered list of numbers; geometrically, an arrow with direction and length.
- Matrix
- A grid of numbers that transforms vectors: rotating, scaling, projecting them.
- Gradient
- The vector pointing in the direction a multi-input function increases fastest.
- Eigenvector
- A special direction a matrix only stretches, never rotates.
From the summit · the Stanford source
You work fluently with vector spaces, matrix transformations, multivariable derivatives, and gradients: the machinery optimization and ML stand on.
This module descends from MATH51 at Stanford. Students who climb the full ladder arrive here.
