Linear Algebra — Overview
Linear algebra is the language of data. A grayscale image is a grid of numbers. A user’s music taste is a list of numbers. A sentence, once embedded, is a vector of numbers. The moment you represent something as an array of numbers, linear algebra gives you the tools to measure it, combine it, and transform it — which is exactly what every machine learning model does.
This chapter follows Chapter 2 of Mathematics for Machine Learning. Here’s the whole territory on one map before we walk through it piece by piece.
The concept map
Everything in this chapter connects. Vectors are the atoms; every other idea is a way of combining, relating, or transforming them.
flowchart TD V["Vector"] M["Matrix"] VS["Vector space"] SLE["System of
linear equations"] GE["Gaussian
elimination"] MI["Matrix inverse"] LM["Linear /
affine mapping"] LI["Linear
independence"] B["Basis"] V -->|"comprises"| M V -->|"closure"| VS M -->|"represents"| SLE M -->|"represents"| LM SLE -->|"solved by"| GE SLE -->|"solves"| MI VS --> LM V -->|"property of"| LI LI -->|"maximal set"| B M -->|"used in"| VC["Vector calculus (Ch 5)"] LM --> AG["Analytic geometry (Ch 3)"] LM --> CL["Classification / SVM (Ch 12)"] B --> DR["Dimensionality reduction / PCA (Ch 10)"]
(Adapted from Figure 2.2 of the book — the same mind map the authors use to open the chapter.)
The through-line
Read the chapter as one continuous story:
- Systems of Linear Equations — the original problem: many constraints, find the unknowns. This is where linear algebra was born.
- Matrices — a compact notation that turns a messy system into the single equation . Matrices both store data and transform it.
- Solving Systems — Gaussian elimination, the algorithm that actually finds the answer (and the matrix inverse along the way).
- Vector Spaces — zoom out: what is the set of all vectors you can build? The rules (closure) that make a collection well-behaved.
- Linear Independence — which vectors carry new information, and which are redundant combinations of the others?
- Basis and Rank — the smallest set of vectors that builds the whole space, and a single number measuring how much a matrix “spans.”
- Linear Mappings — functions that preserve structure. Every such function is a matrix, and every matrix is such a function.
- Affine Spaces — lines and planes shifted off the origin — the geometry behind regression lines and decision boundaries.
Where each idea shows up in ML
| Linear algebra idea | Machine learning payoff |
|---|---|
| Vectors in | Every data point, feature vector, and embedding |
| Matrix multiplication | A neural network layer is |
| Solving | Closed-form linear regression |
| Linear independence | Detecting redundant / collinear features |
| Basis & rank | PCA, low-rank compression, feature reduction |
| Linear mappings | Rotations, projections, the core of every layer |
| Affine spaces | Regression lines & SVM decision boundaries |
The one habit to build
Whenever you meet a new object in this chapter, ask three questions:
- What is it? (a definition you could write down)
- What does it look like? (a picture in 2-D or 3-D)
- Why does ML care? (where it shows up in a real model)
Every page answers all three. Start with Systems of Linear Equations.
If this helped you, consider buying me a coffee ☕
Buy me a coffeeWas this page helpful?
Let us know how we did
