Lesson 3 · 10 min
Matrices and matrix multiplication
A neural network is, mostly, a sequence of matrix multiplications.
A matrix is a stack of vectors
A matrix W of shape (m, n) is m rows of n numbers. Two ways to think of it:
- A list of m vectors (each row is a vector in n-D)
- A linear transformation that maps n-D vectors to m-D vectors
When you compute y = W @ x (where x is a length-n vector), you get a length-m vector. The model has transformed x into a new space.