Complete the L2 normalization formula
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Divide each component by the L2 norm (||v||), and the resulting vector has length 1 (the unit-length vector pointing in the same direction).
Imagine you measured the height of an arrow with a ruler. To make all your arrows the same length, divide each one's coordinates by that ruler reading. Whatever the original length was, the new length is exactly one unit. The direction does not change; only the length does. Now every arrow lives on the same circle and is easy to compare with the others.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
5 to 7 min: state formula + worked numerical example + production implications + zero-vector caveat + difference from feature standardization.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Writing 'sum of squares' as the denominator instead of the square root of the sum of squares. The L2 norm is the square root.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.