Matrix multiplication

Linear algebra · Formula · Not yet linked from a lesson

(AB)ij=∑k=1nAikBkj(AB)_{ij} = \sum_{k=1}^{n} A_{ik} B_{kj}

Each entry of the product is the dot product of one row of A with one column of B. Composing two linear maps this way is the single operation that dominates both training and inference cost, which is why hardware is designed around it.

Symbols

AA
The left matrix, with shape m by n.
BB
The right matrix, with shape n by p.
kk
The shared inner dimension being summed over.
Esc
↑↓ navigate↵ open? shortcuts

Keyboard shortcuts

Press Esc to close

Anywhere

⌘K
Search and commands
/
Search
?
This sheet
Esc
Close

Reading a lesson

J
Next lesson
K
Previous lesson
B
Bookmark