Dot product

Multiply two vectors number by number and add up the results. Large when they point the same way.

This is a dot product: it is big when the two vectors point the same way.
From Attention, step “Queries and keys”

See it in action

Try dot product hands-on in the lesson Attention, part of the AI fundamentals course.

Open the lesson