Chapter 3
Matrices
Matrices as tables, shape rules, linear maps, and neural network layers.
What this chapter does
Matrices organize many vectors at once. This chapter teaches shape discipline first, then shows how row-column products become transformations, batches, and the weight matrices used in neural network layers.
Lessons
Read these in order.
Start with the chapter introduction, then move through the topic lessons. The order is chosen so each page can reuse ideas from the pages before it.
- 01Introduction
Why matrices follow vectors and how shape-aware tables organize computation.
- 02Matrices as Tables
Matrix entries, rows, columns, and row-column indexing.
- 03Rows, Columns, and Shapes
How matrix shape controls what operations are allowed.
- 04Matrix-Vector Products
Reading matrix-vector multiplication as one dot product per row.
- 05Matrix Multiplication
Matrix products as repeated row-column dot products.
- 06Identity, Diagonal, and Transpose
Three matrix patterns that appear throughout ML equations.
- 07Batches and Shape Reasoning
Reading examples-by-features matrices and predicting batch outputs.
- 08Matrices as Linear Maps
Matrices as operations that transform input vectors into output vectors.
- 09Matrices in Neural Network Layers
How weight matrices mix features inside a basic neural network layer.
Review and practice
Close the chapter deliberately.
Use the conclusion and revision notes before the chapter exercises. Hints and solutions are collected here, while lesson-level exercises reveal their own help inline.
What Chapter 3 accomplished and how matrices prepare geometry.
Summary and Revision NotesA compact review of matrix notation, shapes, and common traps.
ExercisesChapter-level practice for matrix entries, shapes, and products.
HintsLow-spoiler nudges for the Chapter 3 exercises.
SolutionsExplained solutions for the Chapter 3 exercises.
Before moving on
- Predict the shape of matrix products.
- See a matrix as an operation on vectors.
- Explain each output entry as a row-column dot product.
- Read a neural layer as matrix-vector multiplication plus bias and activation.
Where this leads
- Geometry
- Neural network layers
- Transformer projections
- Linear Systems and Decompositions