Skip to content
md ~/guide/lineer-cebir
Back to the guide

Step 1

Linear Algebra

Vectors, matrices and transformations. Almost every calculation in machine learning, computer graphics and games is a matrix operation.

  • Vectors and matrices
  • Systems of linear equations
  • Matrix multiplication and inverse
  • Vector spaces and rank
  • Determinants
  • Eigenvalues and eigenvectors
  • Least squares

Why it matters

An image is a matrix of pixels, a neural network layer is a matrix multiplication, and every rotation and scaling in a game is a transformation matrix. Even the coefficients of linear regression come from a matrix equation. Without this course you memorize machine learning formulas without understanding them.

What to know

  • Vectors, the dot product, length and angle.
  • Seeing matrix multiplication as a transformation: rotation, scaling, projection.
  • Systems of linear equations and Gaussian elimination.
  • Inverse, rank and vector spaces (column space, null space).
  • Determinants and what they mean.
  • Eigenvalues and eigenvectors; the basis of PCA.
  • Least squares: the closest solution to a system with no exact solution (which is linear regression).

Practice and projects

  • Watch 3Blue1Brown's "Essence of Linear Algebra" series before the course; it gives a visual picture of each topic.
  • Try matrix operations with NumPy; load an image as a matrix and rotate and scale it.
  • Solve linear regression yourself without a library, with the normal equation (XᵀX)⁻¹Xᵀy.

Common mistakes

  • Learning only the calculations and skipping the geometric meaning.
  • Assuming matrix multiplication is commutative (AB = BA).
  • Solving equations in code by taking an inverse when numerically more stable methods (solve, lstsq) exist.

Careers that use this course most