The interactive film is in the book's Companion

Play it, pause it, turn it and drag it with Mathematics for AI and Machine Learning.

Get the book

Kronecker Product and the Vectorization Identity

Chapter 10 · Mathematics for AI and Machine Learning · Advanced · 1:32

An interactive live film: each element of A scales a 3D block of B, flipping below the floor when negative; stacking columns turns X into vec(X) and verifies vec(AXB) = (B^T (x) A) vec(X).

Narration

Start with two small matrices, A and B. The Kronecker product builds a large block matrix by replacing every entry of A with a scaled copy of B.

Here A and B are two by two, so the product is four by four. Each of the four blocks is matrix B, multiplied by one scalar from A.

The rest of the narration is in the book's Companion.

More from Chapter 10

Interactive2:11Tensor Parallelism: Block Products Across DevicesChapter 10Preview1:24Block Diagonal Matrices: Separate WorldsChapter 10Preview1:28Block Multiplication: Blocks Multiply Like NumbersChapter 10Preview1:39Longer Contexts with Rotary PositionsChapter 10Preview2:20Woodbury Identity: a Rank-One Update of the InverseChapter 10Preview1:40Schur Complement: What Is Left After Minimizing Out a BlockChapter 10Preview1:40Block Cholesky: Two Steps to a CircleChapter 10Preview1:30Online Softmax, One Tile at a TimeChapter 10Preview1:56Mixture of Experts: Routing Tokens to a Few BlocksChapter 10