Drag the tips of a and b (or focus them and use the arrow keys).
- Dot product a·b
- 4·2 + 1·3 = 11
- Lengths ‖a‖ and ‖b‖
- 4.123 · 3.606
- Cosine similarity
- 0.74(angle 42.3°)
- Euclidean distance
- 2.828(Manhattan 4)
- Projection of a onto b
- (1.69, 2.54)
The cosine does not change if you lengthen an arrow without turning it; the distance does. Try it.