A vector norm, sometimes represented with a double bar as ∥x∥, is a function that assigns a non-negative length or size to a vector x in n-dimensional space. Norms are essential in mathematics and machine learning for measuring vector magnitudes and calculating distances.
A vector norm satisfies three properties:
- Non-negativity: ∣x∣ > 0| if x ≠ 0, and ∣x∣=0 if and only if x = 0.
- Scalar Multiplication: ∣kx∣ = ∣k∣ ⋅ ∣x∣ for any scalar k.
- Triangle Inequality: ∣x + y∣ ≤ ∣x∣ + ∣y∣.
Types of Vector Norms
The vector norm ∣x∣p, also known as the p-norm, for p = 1, 2,… is defined as:
| \mathbf{x} |_p = \left( \sum_{i=1}^{n} | x_i |^p \right)^{\frac{1}{p}}
This general formula encompasses several specific norms that are commonly used.
Commonly used norms are:
Let's discuss these in detail.
L1 Norm
The L1 norm, also known as the Manhattan norm or Taxicab norm, is a way to measure the "length" or "magnitude" of a vector by summing the absolute values of its components.
Mathematically, for a vector x = [x1, x2, . . ., xn], the L1 norm ∣x∣1 is defined as:
∣x∣1 = ∣x1∣ + ∣x2∣ + ∣x3∣ + ... + ∣xn∣
Example: If x = [3, −4, 2], then the L1 norm is:
∣x∣1 = ∣3∣ + ∣−4∣ + ∣2∣ = 3 + 4 + 2 = 9
L2 Norm
The L2 norm, also known as the Euclidean norm, is a measure of the "length" or "magnitude" of a vector, calculated as the square root of the sum of the squares of its components.
For a vector x = [x1, x2, . . ., xn], the L2 norm ∣x∣2 is defined as:
| \mathbf{x} |_2 = \sqrt{x_1^2 + x_2^2 + \dots + x_n^2}
Example: If x = [3, −4, 2], then the L2 norm is:
| \mathbf{x} |_2 = \sqrt{3^2 + (-4)^2 + 2^2}
= \sqrt{9 + 16 + 4}
=√29 ≈ 5.39
L∞ norm
The L∞ norm, also known as the Infinity norm or Max norm, measures the "size" of a vector by taking the largest absolute value among its components. Unlike the L1 and L2 norms, which consider the combined contribution of all components, the L∞ norm focuses solely on the component with the maximum magnitude.
For a vector x = [x1, x2, . . ., xn], the L∞ norm ∣x∣∞ is defined as:
∣x∣∞ = max∣xi∣ where 1 ≤ i ≤ n
Example: If x = [3, −4, 2], then the L∞ norm is:
∣x∣∞= max(∣3∣, ∣−4∣, ∣2∣) = 4
Read More,
Practice Problem Based on Vector Norm
Question 1. Given the vector x = [4, -3, 7, 1], calculate the L1 norm (Manhattan norm) of the vector.
Question 2. Given the vector x = [1, -2, 2], calculate the L2 norm (Euclidean norm) of the vector.
Question 3. For the vector x = [7, −1, −4, 6], calculate the L∞ norm (Infinity norm) of the vector.
Question 4. If the L2 norm (Euclidean norm) of a vector x = [x1, x2, x3] is 10, and the components of the vector are x1 = 6 and x2 = 8, find the value of x3.
Answer:-
1. 15
2. 3
3. 7
4. 0
Explore
Maths
4 min read
Basic Arithmetic
Algebra
Geometry
Trigonometry & Vector Algebra
Calculus
Probability and Statistics
Practice