Skip to main content

M02.5 · Matrix multiplication as composition

A free, illustrated module of 4 lessons and one interactive in M02 Linear Algebra I: Vectors and Matrices: One map after another; The multiplication rule, derived; Order matters; Shapes, identity and powers.

M02.5 L1 · Core 4 lessons · about 100 min Live · in review

Part of M02 Linear Algebra I: Vectors and Matrices in the Mathematics track.

Do one linear map and then another, and the result is again a linear map with a matrix of its own. That matrix is the product. These four lessons build matrix multiplication from that one idea: they follow the basis vectors through two maps, derive the row-times-column rule instead of handing it down, show why the order of a product matters while its brackets do not, and end with shapes, the identity, powers and the reason a neural network needs a non-linearity between its layers.

What you need first. Matrices as linear maps (M02.4): the columns of a matrix are where the basis vectors land, the matrix-vector product by columns and by rows, the rotation and shear matrices, and matrices that are not square.

Lessons

  1. One map after another M02.5.1 25 min

    Apply one linear map to the result of another and you get a third linear map. Prove it, find the matrix of the combined map by following the two basis vectors through both steps, and learn why a product of matrices is read from right to left.

  2. The multiplication rule, derived M02.5.2 25 min

    The columns of a product AB are A applied to the columns of B. From that one fact, derive the row-times-column rule for every entry, multiply matrices by hand in two ways, write the three loops from scratch, and meet the @ operator.

  3. Order matters M02.5.3 25 min

    Shear then turn is not turn then shear, so AB and BA are usually different matrices. See why, then prove what does survive from ordinary arithmetic: brackets can move, and multiplication distributes over addition. A map of which school-algebra habits are safe with matrices.

  4. Shapes, identity and powers M02.5.4 25 min

    When does a product of two matrices exist, and what shape is it? Meet the shape rule, the identity matrix and powers of a matrix, then see a stack of neural-network layers collapse into one matrix, and why a non-linearity between the layers stops that.

The interactive

M02.5-X1 · Composition explorer. Choose two maps, step through applying one and then the other, and compare the result with the single product matrix. Swap the order and watch the picture land somewhere else. It lives in Order matters.

Back to top