37. Matrix Multiplication

For matrices 𝐴 (𝑚×𝑛) and 𝐵 (𝑛×𝑝), the product 𝐶=𝐴𝐵 is the 𝑚×𝑝 matrix with entries:

𝑐𝑖𝑗=𝑘=1𝑛𝑎𝑖𝑘𝑏𝑘𝑗

Each entry 𝑐𝑖𝑗 is the dot product of row 𝑖 of 𝐴 with column 𝑗 of 𝐵.

Compatibility: inner dimensions must match — 𝐴’s columns must equal 𝐵’s rows.

Example
𝐴=[1234]𝐵=[5678]𝐴𝐵=[15+2716+2835+4736+48]=[19224350]

37.1. Properties

37.2. Geometric meaning

If 𝐴 and 𝐵 represent linear transformations, then 𝐴𝐵 represents the composition — apply 𝐵 first, then 𝐴 (see Composition of Linear Transformations).

37.3. Special cases