Norm

Norms help us quantify the size of a vector or the distance between two. Whether you’re navigating city blocks (L1) or flying straight to your destination (L2), norms are the compass that keep our linear algebra adventures grounded. 📏

L1-norm

The L1-norm (also known as the Manhattan distance) measures the total absolute difference between two vectors— or from the origin if one vector is zero.

\[ \| \mathbf{u} - \mathbf{v} \|_1 = \sum_{i=1}^n |u_i - v_i| \]

L2-norm

The L2-norm (also known as the Euclidean distance) measures the straight-line distance between two vectors— or from the origin if one vector is zero.

\[ \| \mathbf{u} - \mathbf{v} \|_2 = \sqrt{ \sum_{i=1}^n (u_i - v_i)^2 } \]