Gradient
Lesson 3.4MathCode~55 min

Matrix multiplication

Many dot products at once — and the reason GPUs exist.

Module 3 · 0/7 done

Many dot products at once

Multiplying two matrices is just doing a lot of dot products, neatly organised. To get the entry in row ii, column jj of the answer: take row i of the first matrix, dot it with column j of the second.

Cij=∑kAik BkjC_{ij} = \sum_{k} A_{ik}\, B_{kj}
Fig 3.6Watch each cell of C being computed: one row of A, one column of B, one dot product.