Welcome to our exploration of the L2 norm, also known as the Euclidean norm. This is one of the most important concepts in linear algebra and vector analysis. The L2 norm measures the magnitude or length of a vector in Euclidean space. For a vector x with components x1, x2, up to xn, the L2 norm is calculated as the square root of the sum of squares of all components. Let's see this with a simple example using the vector (3, 4), which has an L2 norm of 5.
Now let's explore the key properties of the L2 norm. First, the L2 norm is always non-negative, meaning it can never be less than zero. Second, only the zero vector has a norm of zero. Third, the norm satisfies homogeneity - scaling a vector by a factor alpha scales its norm by the absolute value of alpha. Most importantly, the L2 norm satisfies the triangle inequality, which states that the norm of the sum of two vectors is less than or equal to the sum of their individual norms. This visualization shows how the direct path from origin to the sum vector is shorter than the combined path along the individual vectors.
For matrices, the L2 norm takes on a different meaning. It's called the spectral norm or operator norm, and it's defined as the largest singular value of the matrix. Alternatively, it can be computed as the square root of the largest eigenvalue of A transpose A. The geometric interpretation is powerful: the L2 norm of a matrix represents the maximum factor by which the matrix can stretch a unit vector. In our visualization, we see how a matrix transforms the unit circle into an ellipse, and the L2 norm corresponds to the maximum stretch, which is the length of the longest axis of the ellipse.
The L2 norm has numerous practical applications across many fields. In machine learning, it's used for ridge regression regularization to prevent overfitting, and as a weight decay term in neural networks. In signal processing, the L2 norm measures signal energy and is crucial for noise reduction algorithms. For optimization problems, it appears in gradient descent and least squares solutions. In computer graphics, it's essential for vector normalization and distance calculations. Our visualization shows how L2 distances are used in clustering, regression with L2 regularization, and how L2 norm contours form perfect circles around the origin.