Linear algebra Introduction
Dot product
Combine inputs and weights into a single score.
Before this
The intuition
Multiply matching entries of two vectors, then add the products. This is a weighted sum: each weight controls how strongly an input contributes.
A concrete example
[2, 3] · [4, 1] = 2 × 4 + 3 × 1 = 11. The first input contributes 8, the second contributes 3.
What to remember
A dot product produces a scalar. As a similarity measure, its size also depends on vector lengths.
Check your understanding
What happens if both weights are zero?
Reveal explanation
The score is zero, regardless of the inputs.