Lesson 2 of 13 7 min · 151 words
Vector operations
Adding, scaling and combining vectors.
Vectors of the same length are added element by element: . Multiplying by a scalar scales every entry: . Geometrically, addition places arrows tip to tail and scaling stretches or flips an arrow.
A linear combination is . A linear model's prediction is exactly this: a weighted combination of features. The set of all linear combinations of some vectors is their span.
The length (norm) of a vector is . Dividing by it gives a unit vector pointing in the same direction. Vectors are linearly independent if none of them is a combination of the others.
Formula to remember
Manhattan distance
Slides
Sum of absolute differences (L1).
Quick check · +5 XP