What is a vector norm, how do the ℓ1 (Manhattan) norm and the ℓ2 (Euclidean) norm differ geometrically, and what are both norms for v=(3,−4)⊤?

Linear algebra and optimisation, Matrix norms and condition number
Level L1 Beginner. Length Short. Nature Th+Mat Both.

What's being asked

Whether you know how vector length is measured in machine learning (ML), which underlies distances in k-nearest neighbours (k-NN) and regularisation penalties like L1 and L2.

Key idea

A vector norm measures the length (size) of a vector from the origin and is always non-negative. The ℓ1 norm ∥v∥1=∑i∣vi∣ adds absolute steps along each axis like walking on a city street grid, whereas the ℓ2 norm ∥v∥2=∑ivi2 is the straight-line crow-flies distance.

Steps

  1. Explain what a norm is in plain words: a single non-negative number saying how big a vector is, equal to 0 only for the zero vector, and scaling linearly when you stretch the vector.
  2. Contrast the geometry using a city grid analogy: to reach (3,−4) from (0,0) along streets, you walk 3 blocks east and 4 blocks south (ℓ1); flying straight across the diagonal gives the shorter Euclidean path (ℓ2).
  3. Compute the ℓ1 norm for v=(3,−4)⊤: ∥v∥1=∣3∣+∣−4∣=3+4=7.
  4. Compute the ℓ2 norm for v=(3,−4)⊤: ∥v∥2=32+(−4)2=9+16=25=5, noting that ∥v∥2≤∥v∥1 always holds.

Common mistakes

How long your answer should be

About 2 minutes: city-grid vs straight-line analogy, plus the 3-4-5 calculation.

Read this

Previous in Linear algebra and optimisation: What does the dot product of two vectors measure, and what does it mean when the dot product is zero? What is a⋅b for a=(2,1) and b=(1,−2)?
Next in Linear algebra and optimisation: What is the gradient of a function of two variables, and what does it tell you? What is the gradient of f(x,y)=x2+y2 at the point (3,4)?