VECTORS, DOT PRODUCTS & NORMS
Section 1.1
01

What a vector really is

You have written SIMD code that adds eight floats in one instruction. You already have the right mental model for a vector; the ML field just loads extra meaning onto the word. Let’s separate the three senses so nothing is ambiguous later.

A vector is, first, an ordered list of numbers — a point in ℝⁿ. That’s the algebraic sense. Second, it’s a direction and magnitude — the geometric sense, an arrow from the origin. Third, in your SIMD code, it’s just a register’s worth of lanes. These coincide on purpose: the hardware vector holds the coordinates of the algebraic vector, and the algebraic vector is the geometric arrow. One object, three vocabularies.

Why does direction carry the meaning and not, say, the raw coordinates? Because the operations we’ll build — similarity, attention scores, quantization distortion — are all rotation-friendly: they care about the angles and lengths between vectors, not the accident of which axis is “axis 0.” Hold that thought; it’s literally why rotation-based quantization works at all (Ch. 25).

algebraic — coordinates[ 0.82, 0.57 ]geometric — len, angle‖a‖=1.00 θ=35°SIMD — register lanes__m128 = {0.82, 0.57, 0, 0}
θ 35°
One vector, three readings. Drag θ: the arrow (geometric), its coordinates (algebraic), and the lane values a SIMD register would hold — all the same object.
— think, then check —

Nothing structural — a vector is an ordered tuple of numbers. What’s added is interpretation: we equip the tuple with operations (dot product, norm) that give it geometric meaning — length and direction. The same eight floats in your SIMD register become “a vector” the moment you start measuring angles between them. That interpretive layer is the whole subject.