Dot products turn pairs of vectors into exact integers. The dot table shows the source vectors and recomputes each value from those integers.

highlighted = computed this step

The dot product

For two-dimensional vectors, u dot v is u1 times v1 plus u2 times v2. Because the coordinates are integers, the dot product is an integer.

uv=u1v1+u2v2u\cdot v=u_1v_1+u_2v_2
Exact dot productsDots are recomputed from displayed vectors.Exact dot productsDots are recomputed from displayed vectors.exact dot productstie-break: lexicographically smallest word among max dot productsvectors:cat=(3,1); kitten=(2,1); car=(1,3)pairdotcat·kitten7cat·car6kitten·car5nearest to cat by dot=kitten (dot=7)

Three exact dots

The exact dots are cat dot kitten = 7, cat dot car = 6, and kitten dot car = 5.

catkitten=7,catcar=6,kittencar=5\text{cat}\cdot\text{kitten}=7,\quad \text{cat}\cdot\text{car}=6,\quad \text{kitten}\cdot\text{car}=5
Exact dot productsDots are recomputed from displayed vectors.Exact dot productsDots are recomputed from displayed vectors.exact dot productstie-break: lexicographically smallest word among max dot productsvectors:cat=(3,1); kitten=(2,1); car=(1,3)pairdotcat·kitten7cat·car6kitten·car5nearest to cat by dot=kitten (dot=7)

Summary

The dot table is self-contained: it shows the source vectors and recomputes every dot from them. The next lesson uses those dots for an exact argmax.

dots 7,6,5\text{dots }7,6,5
Exact dot productsDots are recomputed from displayed vectors.Exact dot productsDots are recomputed from displayed vectors.exact dot productstie-break: lexicographically smallest word among max dot productsvectors:cat=(3,1); kitten=(2,1); car=(1,3)pairdotcat·kitten7cat·car6kitten·car5nearest to cat by dot=kitten (dot=7)