Linear algebra for machine learning

Free linear algebra course from zero: vectors, matrices, matrix multiplication, determinants, eigenvectors, SVD and PCA, with NumPy.

6 modules · 18 lessons so far

Module 1 · Beginner

Getting started with linear algebra

What linear algebra is, why every ML model uses it, and the four objects it works with.

  1. What is linear algebra, and why does ML need it?
  2. Scalars, vectors, matrices and tensors
  3. Set up NumPy for linear algebra

Module 2 · Beginner

Vectors

Arrows and lists of numbers: add them, measure them, and compare them, with pictures and NumPy.

  1. What is a vector? Arrows and lists of numbers
  2. Vector addition and scalar multiplication
  3. L1 and L2 norms explained
  4. Unit vectors and normalisation
  5. The dot product explained
  6. Cosine similarity and the angle between vectors
  7. Vector projection explained
  8. Distance between vectors: Euclidean, Manhattan

Module 3 · Beginner

Matrices

Tables of numbers, and the operations that power every dataset and neural network.

  1. What is a matrix?
  2. Matrix addition and scalar multiplication
  3. Matrix-vector multiplication explained
  4. Matrix multiplication explained
  5. The transpose of a matrix
  6. Identity, diagonal and other special matrices
  7. Symmetric, triangular and orthogonal matrices

Module 4 · Intermediate

Transformations and equations

See matrices as movements of space, and use them to solve many equations at once.

  1. Matrices as transformations: rotate, scale and shear
  2. Systems of linear equations with matrices
  3. Gaussian elimination explained
  4. The determinant explained visually
  5. The inverse of a matrix
  6. Rank of a matrix explained
  7. Linear independence explained
  8. Span, basis and dimension
  9. Change of basis explained visually
  10. Solve linear equations with NumPy

Module 5 · Advanced

Eigenvectors and decompositions

Break matrices into simpler pieces: the maths behind PCA, recommendations and compression.

  1. Eigenvalues and eigenvectors explained visually
  2. Eigendecomposition explained
  3. The covariance matrix explained
  4. Quadratic forms and positive definite matrices
  5. Singular value decomposition (SVD) explained
  6. PCA from scratch with NumPy
  7. Matrix factorisation for recommendation systems

Module 6 · Advanced

Linear algebra in machine learning

Where every idea in this course appears in real ML models, with projects.

  1. Linear algebra for machine learning, explained
  2. Datasets as matrices
  3. Linear regression with matrices: the normal equation
  4. Least squares as a projection
  5. A neural network layer is a matrix multiplication
  6. Tensors and broadcasting for deep learning
  7. Embeddings and vector search explained
  8. Project: compress an image with SVD
  9. Linear algebra interview questions