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: 14mlive demo

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

Learner Contract

What this page should let you do.

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

This Linear Algebra concept is the current object: keep the same invariant visible across Intuition, Math, Code, Interactive Demo.

Before thisDot Product

1 prerequisite listed; refresh them before leaning on the math or code.

By the end4/4 sections ready | code witness expected | live demo

Explain the mechanism, trace the main notation, and test one prediction in the live demo.

Do this firstIntuition

Read the intuition before the notation; the math should name a mechanism you already felt.

Test the linkManipulate one control and predict the visible change.Then continue to Gradient Clipping & Explosion Prevention (review)

Claim/source review status

Claim review not recorded

No structured claim checks yet; source metadata is not enough to establish support.Metadata-derived; review may be AI-assisted. Not a human certification.
Claims0/0 reviewed
Sources0 cited
Codeattached
Demolive
Reviewednot recorded
Updatedpage 2026-06-29

Object flow

4/4 sections readyAsk about thisResearch room
ConceptNormsLinear Algebra
Local snapshot ready
concept:linear-algebra/norms
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

Prediction check: start from a baseline vector, spike one coordinate, then predict which norm has the largest absolute amount of change. The reveal compares 1\ell_1, 2\ell_2, and \ell_\infty lengths, shows the ray hit order against the diamond/circle/square unit balls, and uses radial clipping to show how the same vector lands on different boundaries.

The point is not that one norm is always “stricter.” The metric you ask for matters: absolute change, relative change, clipping radius, and modeling goal can point to different answers.

Live Concept Demo

Explore Norms

The stage is code-native and interactive. Use it to test the explanation against the mechanism.

difficulty 2/5undergraduatecode-aligned
Demo Prediction Checkpoint

Manipulate one control and predict the visible change.

Commit to what Norms should make visible before reading the result.

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.

Prediction 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.

4/4 stages readyLive demo 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.

Source Grounding

Canonical references for the mechanism on this page.

Source gapNo canonical references are listed yet.

Add source metadata before treating this page as source-grounded.

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.

Witnesses4 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 interactive demoManipulate one control and predict the visible change.
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