Is L2-Norm = Euclidean Distance?

Saurav Gupta
4 min readFeb 19, 2022

--

One of the concepts that can be a little confusing is the difference between Norms and Distances in Machine Learning. When do you call it an L2 Norm or euclidean distance? Today let’s clarify this forever.

Photo by frank mckenna on Unsplash

Defining Vector Norm:

Let’s say we have a 2D vector A.
The distance of vector A from the origin is called the norm of the vector A.

Norm of Vector A

As you can see, this is how we represent a vector in 2D and the distance from the origin to vector A is called the Norm of Vector A.

This distance can be calculated using various methods such as Euclidean distance, Manhattan distance, etc.

Let’s calculate the distance of Vector A from the origin using Euclidean distance, this is how it will look like for 2D.

Assume that the coordinates of Vector A are (x2, y2) and coordinates of the origin are (x1, y1)=(0, 0), therefore, we get the following:

Vector Norm using Euclidean distance is also called L2-Norm.
Similarly, if we calculate the Vector Norm using Manhattan distance then it is called L1-Norm.
And to calculate the norm of a vector, we only need the coordinates of that vector (as you can see in the distance equation).

In short: The Vector norm is the distance of the vector from the origin. 😉

Defining Vector Distance:

Distance is a measure that can exist between any two points or vectors. For example, we can calculate the distance between the origin and the vector A, or we can also calculate the distance between two vectors A and B.

As you can see in the above diagram, the distance between Vector A and Vector B is equal to a new Vector C.

Now we can say that the length of Vector C is* the distance between Vector A and Vector B. And how do we calculate the length of Vector C? By using Euclidean distance, Manhattan distance, etc.

This time, the coordinate (x1, y1) may not be zero unlike the scenario for Vector Norm which we saw earlier.

Therefore, vector distance is the distance calculated between two vectors using Euclidean, Manhattan distances which results in another vector (Vector C in our case). Lovely! 😇

What are the differences and similarities between Norms and Distances?

Now that we know the meaning of Vector Norm and Vector Distance, let’s see how these two are similar or different.

Well, whenever you see the norm of a vector such as L1-norm, L2-norm, etc then it is simply the distance of that vector from the origin in the vector space, and the distance is calculated using Euclidean, Manhattan, etc.

And whenever you see things like Euclidean distance, Manhattan distance, or other forms of distances then it means the distance between two vectors or data points.

Ok, this is important:
Because the distance between two vectors A and B gives birth to a new vector C, we can also calculate the norm of this vector C. Make sense? 👻

Great job! I hope this was useful! 🙌

CONCLUSION:

  1. Norm is for a Vector alone, i.e, its distance from the origin.
  2. Things like Euclidean distance is just a technique to calculate the distance between two vectors.
  3. For Vector Norms, when the distance calculating technique is Euclidean then it is called L2-Norm and when the technique is Manhattan then it is called L1-Norm.
  4. Stay healthy and keep learning! 😎

CONNECT WITH ME:

Email: saurav@guptasaurav.com
LinkedIn: https://www.linkedin.com/in/sauravgupta20

🔵 Become a Writer

--

--

Saurav Gupta

Writes about Software | Design | Big Data | Platform Engineering