Mathematics for ML

Dot Product, explained

The dot product combines two vectors into a single number that reflects their alignment and magnitude.
Back to Glossary

Part of the Semantic Notion technical glossary.

Short Definition

The dot product combines two vectors into a single number that reflects their alignment and magnitude.

Intuition

If two vectors point in similar directions, their dot product is larger.

Technical Definition

The dot product is the sum of elementwise products between two equal-length vectors.

Example

Attention computes query-key similarity using dot products.

Common Misunderstandings

Dot product depends on vector magnitude as well as direction.
Cosine similarity removes magnitude by normalizing vectors.

Start here

Need the broader concept map?

Return to the glossary index to move from this definition into adjacent AI, ML, mathematics, and computer science terms.