Skip to content
Glacius
Linear algebraConcept reference

L1 norm

The L1 norm of a vector is the sum of the absolute values of its coordinates.

On this page 7 sections
  1. Overview
  2. The L1 norm adds the size of each coordinate
  3. Do not add signed coordinates first
  4. Check your understanding
  5. Key takeaway
  6. Sources & further reading
  7. Concept connections

01The L1 norm adds the size of each coordinate#

The L1 norm adds the size of each coordinate. For v=(3,2)v=(-3,2), the horizontal contribution is 33 and the vertical contribution is 22.

The coordinate path goes from(0,0) left3 units, then up2 units to(-3,2). The L1 total is3+2=5. The negative x coordinate contributes its absolute value3. Axis unit scales are equal.The coordinate path goes from(0,0) left3 units, then up2 units to(-3,2). The L1 total is3+2=5. The negative x coordinate contributes its absolute value3. Axis unit scales are equal.
Figure 1Total coordinate travel: 3+2=5.
Link to this figure ↗Download SVGDownload PNG

For v=(3,2)v=(-3,2), take each absolute value before adding. The negative coordinate contributes 3=3|-3|=3.

Add the coordinate magnitudes.

v1=3+2=5\|v\|_1=3+2=5

The subscript 11 names this rule. Every entry contributes its absolute value, including entries after the first two.

For a vector with n coordinates.

v1=i=1nvi\|v\|_1=\sum_{i=1}^{n}|v_i|
Check your reasoning

Compute the L1 norm of v=(4,1,2)v=(-4,1,-2).

Show answer and explanation
7

The contributions are 4+1+2=74+1+2=7.

02Do not add signed coordinates first#

Do not add signed coordinates first. For (3,3)(3,-3), the signed sum is 00, but the L1 norm is 3+3=63+3=6. Only the all-zero vector has L1 norm zero.

A zero entry adds nothing.

(0,5,0)1=5\|(0,-5,0)\|_1=5
Check your reasoning

Three controls change by −2, 5 and −1. What is the total unsigned adjustment?

Show answer and explanation
8

Add the magnitudes of the three changes: 2+5+1=82+5+1=8.

03Check your understanding#

Check your reasoning

For v=(2,5)v=(-2,5), repair the L1 rule 2+5|-2+5|.

  1. AKeep the signs.
  2. BTake each absolute value.
  3. CUse the larger entry.
Show answer and explanation
Take each absolute value.

Add 2+5=72+5=7.

Key takeaway

Take each absolute value first, then add every contribution.

  • Compute the L1 norm of a vector

Sources & further reading

  1. [1]

Reference this concept

Link to this page, a section, or an individual figure.

Glacius. “L1 norm.” Math behind ML. /learn/la-lone