Dot product

Linear algebra · Formula · Appears in 3 lessons

a⋅b=∑i=1naibi=∥a∥ ∥b∥cos⁡θ\mathbf{a} \cdot \mathbf{b} = \sum_{i=1}^{n} a_i b_i = \|\mathbf{a}\|\,\|\mathbf{b}\|\cos\theta

Multiplies two vectors into a single number that measures how much they point the same way. It is positive when they broadly agree, zero when they are perpendicular, and negative when they oppose — which is why almost every similarity score in machine learning starts here.

Symbols

a\mathbf{a}
The first vector.
b\mathbf{b}
The second vector, of the same length.
θ\theta
The angle between them.
Esc
↑↓ navigate↵ open? shortcuts

Keyboard shortcuts

Press Esc to close

Anywhere

⌘K
Search and commands
/
Search
?
This sheet
Esc
Close

Reading a lesson

J
Next lesson
K
Previous lesson
B
Bookmark