Gradium × TensorTonic Voice Challenge is open for registration.Register now
30 Problems

Linear Algebra

Master vectors, matrices, and transformations. The essential mathematical foundation for understanding how ML algorithms work under the hood.

17 Easy7 Medium6 Hard

Unlock the full study plan

Upgrade to Pro to access the full curriculum.

Upgrade to Pro
5 sections

What you will learn

Linear algebra is the language of machine learning: data, weights and activations are all vectors and matrices. This plan has 30 problems in five sections, from vector operations to matrix decompositions and their use in ML methods such as PCA and attention.

Prerequisites

Python and basic NumPy. The NumPy study plan covers the array skills used here. If your math is shaky, start with the guide on how to learn linear algebra for machine learning with coding, which explains each concept before you solve its problem.

The sections, in order

  1. Vectors: dot product, Euclidean distance, cosine similarity, vector norms, outer products and linear combinations.
  2. Matrix basics: transpose, trace, Hadamard product, matrix-vector and matrix-matrix products, determinant and rank.
  3. Linear systems: vector projection, Gram-Schmidt, solving linear systems and LU decomposition.
  4. Decompositions: SVD and low-rank approximation, eigendecomposition, projection matrices, QR, Cholesky and the pseudoinverse.
  5. ML applications: Mahalanobis distance, PCA, least squares, whitening, RBF kernels and scaled dot-product attention.

Where to go next

Continue with the Calculus for ML study plan, which builds on matrices for gradients and Jacobians, or read the ML Math lessons for visual explanations of each topic.