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.

  1. 01
    Introduction

    Why matrices follow vectors and how shape-aware tables organize computation.

  2. 02
    Matrices as Tables

    Matrix entries, rows, columns, and row-column indexing.

  3. 03
    Rows, Columns, and Shapes

    How matrix shape controls what operations are allowed.

  4. 04
    Matrix-Vector Products

    Reading matrix-vector multiplication as one dot product per row.

  5. 05
    Matrix Multiplication

    Matrix products as repeated row-column dot products.

  6. 06
    Identity, Diagonal, and Transpose

    Three matrix patterns that appear throughout ML equations.

  7. 07
    Batches and Shape Reasoning

    Reading examples-by-features matrices and predicting batch outputs.

  8. 08
    Matrices as Linear Maps

    Matrices as operations that transform input vectors into output vectors.

  9. 09
    Matrices in Neural Network Layers

    How weight matrices mix features inside a basic neural network layer.

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

Chapter progress