Linear Algebra

Norms

A norm is a notion of vector length; different norms change geometry, distances, and what 'small' means in optimization.

status: reviewimportance: importantdifficulty 2/5math: undergraduateread: 14mdemo planned

Concept Structure

Norms

01Intuition

Start with the picture, metaphor, or geometric mechanism.

02Math

Make the objects explicit and connect them with notation.

03Code

Mirror the equations with runnable implementation details.

04Interactive Demo

Manipulate the mechanism and watch the idea respond.

1prerequisites
2next concepts
2related links

Learning map

Norms
BeforeDot ProductNow3/4 sections readyTryUse the demo notes to predict the mechanism before moving on.NextGradient Clipping & Explosion Prevention

Object flow

3/4 sections readyAsk about thisResearch room
ConceptNormsLinear Algebra
Local snapshot ready
concept:linear-algebra/norms

Conceptual Bridge

What should feel connected as you move through this page.

Carry inDot Product

Bring the mental model from Dot Product; this page will reuse it instead of restarting from zero.

Work hereNorms

A norm is a notion of vector length; different norms change geometry, distances, and what 'small' means in optimization.

Carry outGradient Clipping & Explosion Prevention

The next edge should feel earned: use the demo prediction here before following Gradient Clipping & Explosion Prevention.

Test the linkUse the demo notes to predict the mechanism before moving on.Then continue to Gradient Clipping & Explosion Prevention
01

01

Intuition

Build the mental picture first so the rest of the page has something to attach to.

Section prompt

A norm is a notion of “length.” But there isn’t only one reasonable way to measure length.

The usual Euclidean length asks for the straight-line distance from the origin. That is perfect when every coordinate should be treated like a perpendicular spatial axis. But machine learning often asks different questions: how large is the total absolute weight mass, how large is the biggest coordinate, or how big is a gradient update before we apply it?

Changing the norm changes the geometry:

  • In 2\|\cdot\|_2 (Euclidean norm), circles are circles.
  • In 1\|\cdot\|_1, circles become diamonds.
  • In \|\cdot\|_\infty, circles become squares.

Those shapes are not decorative. They describe what the model considers “equally large.” An 1\ell_1 penalty tends to make sparse solutions because its diamond-shaped level sets have corners on the coordinate axes. An 2\ell_2 penalty spreads shrinkage more smoothly. An \ell_\infty constraint cares about the worst coordinate.

In optimization, norms decide how we measure parameter size, gradient size, perturbation size, and distance moved by an update. That is why regularization, gradient clipping, adversarial perturbations, and embedding normalization all depend on choosing the right notion of “length.”

02

02

Math

Translate the story into symbols, assumptions, and a derivation you can inspect.

Section prompt

Let VV be a real vector space. A function :VR\|\cdot\|: V \to \mathbb{R} is a norm if for all x,yVx,y \in V and αR\alpha \in \mathbb{R}:

  1. Non-negativity: x0\|x\| \ge 0 and x=0    x=0\|x\| = 0 \iff x = 0
  2. Homogeneity: αx=αx\|\alpha x\| = |\alpha|\,\|x\|
  3. Triangle inequality: x+yx+y\|x+y\| \le \|x\| + \|y\|

These axioms say length is never negative, scaling a vector scales its length by the same amount, and taking a two-step path cannot be shorter than the direct path.

Common norms on Rn\mathbb{R}^n:

  • 2\ell_2: x2=ixi2\|x\|_2 = \sqrt{\sum_i x_i^2}
  • 1\ell_1: x1=ixi\|x\|_1 = \sum_i |x_i|
  • \ell_\infty: x=maxixi\|x\|_\infty = \max_i |x_i|

More generally, for p1p \ge 1,

xp=(i=1nxip)1/p.\|x\|_p = \left(\sum_{i=1}^n |x_i|^p\right)^{1/p}.

If your norm comes from a dot product, then

x=xx.\|x\| = \sqrt{x\cdot x}.

For the standard dot product on Rn\mathbb{R}^n, this gives the Euclidean norm:

xx=i=1nxixi=i=1nxi2=x2.\sqrt{x\cdot x} = \sqrt{\sum_{i=1}^n x_i x_i} = \sqrt{\sum_{i=1}^n x_i^2} = \|x\|_2.

Not every norm comes from a dot product. The 1\ell_1 and \ell_\infty norms are valid lengths, but they do not come from an inner product in the same way. This matters because dot-product geometry gives angles and projections, while general norms mainly give size and distance.

Once a norm is chosen, it induces a distance:

d(x,y)=xy.d(x,y) = \|x-y\|.

So changing the norm changes both what counts as a small vector and what counts as two points being close.

03

03

Code

Keep the implementation aligned with the notation so the algorithm is legible.

Section prompt
import numpy as np

x = np.array([3.0, -1.0, 2.0])

l1 = float(np.sum(np.abs(x)))
l2 = float(np.linalg.norm(x, 2))
linf = float(np.linalg.norm(x, np.inf))

print("||x||1 =", l1)
print("||x||2 =", l2)
print("||x||inf =", linf)

print("x / ||x||2 =", x / l2)
04

04

Interactive Demo

Use direct manipulation to connect the explanation to a moving system.

Section prompt

No interactive demo yet. A great demo: show the different unit balls for 1\ell_1, 2\ell_2, and \ell_\infty, and let users drag a point and see which norm is largest.

No live visualization is registered for this concept yet.

The page still supports explanatory demo notes above; when a viz.tsx exists, it will render here without changing the route.

After The First Pass

Turn the concept into an inspected object.

Once the invariant is visible in the intuition, math, code, and demo, use these panels to inspect the mechanism visually, check source support, practice the idea, and attach a grounded research question.

Mechanism Storyboard

See the idea move before the page explains it

A norm is a notion of vector length; different norms change geometry, distances, and what 'small' means in optimization.

Demo notes open01 / Intuition
Prediction lens

Start with the picture, metaphor, or geometric mechanism.

Commit first

Before reading further, choose the kind of change Norms should make visible.

Visual Inquiry

Make the image answer a mathematical question

A norm is a notion of vector length; different norms change geometry, distances, and what 'small' means in optimization.

3/4 stages readyDemo notes connected
Prediction

Which visible object should carry the first intuition?

Commit first

Pick the cue that should make Norms easier to reason about before the page gives the answer.

Claim Review

A norm is a notion of vector length; different norms change geometry, distances, and what 'small' means in optimization.

StatusSubstantive claim review pending

Source IDs and witness objects are attached for review; they are not proof by themselves.

SourcesNo references

Add source metadata before claiming support.

Witnesses3 local objects

Use equation, code, and demo objects to check whether the source support is operational.

Practice Loop

Try the idea before it explains itself

A norm is a notion of vector length; different norms change geometry, distances, and what 'small' means in optimization.

Readiness0/3 checks ready
Predict

Before touching the demo, predict one visible change that should happen in Norms.

Hint 1

Reveal when your model needs a nudge.

Hint 2

Reveal when your model needs a nudge.

Hint 3

Reveal when your model needs a nudge.

Object research drawerClose
ConceptNormsLinear Algebra
Code witness comparisonNorms code witness 1x = np.array([3.0, -1.0, 2.0])Prediction before revealNorms predictionUse the demo notes to predict the mechanism before moving on.
Grounded room questionWhat is the smallest example that makes Norms click without losing the math?Local snapshot ready

Research Room

Attach the question to an exact object

Pick the concept, equation, source, code witness, claim, misconception, or demo state before asking for help. The handoff stays grounded to that object.
Next local actionNo local draft saved yet

Open the draft below to save one note and next action in this browser.

conceptLinear Algebra

Norms

Anchored question

What is the smallest example that makes Norms click without losing the math?

Local action draftNo local draft saved yetExpand only when ready to capture one local next action
Local action draft

This draft stays locally in this browser for concept:linear-algebra/norms.

No local draft saved.
Evidence to inspect
  • Definition, prerequisite, and contrast concept links
  • The equation or code witness that makes the concept operational
  • One demo state that shows the invariant instead of a slogan
What would resolve this
  • The learner can state the mechanism in their own words
  • The learner can name the prerequisite that would repair confusion
  • The learner can predict how the mechanism changes under one perturbation
Grounded AI handoff

I am working in Continuous Function's research reading room. Object: concept - Norms Object key: concept:linear-algebra/norms Context: Linear Algebra Anchor id: concept/concept-notebook/linear-algebra/norms Open question: What is the smallest example that makes Norms click without losing the math? Evidence to inspect: - Definition, prerequisite, and contrast concept links - The equation or code witness that makes the concept operational - One demo state that shows the invariant instead of a slogan What would resolve this: - The learner can state the mechanism in their own words - The learner can name the prerequisite that would repair confusion - The learner can predict how the mechanism changes under one perturbation Answer as a careful research tutor: stay source-grounded, separate verified evidence from assumptions, name the relevant math objects, and end with one next action.

Open source object
concept/concept-notebook/linear-algebra/norms concept:linear-algebra/norms