# Euclidean Distance

The **Euclidean Distance** is a Distance Metric used in machine learning. This distance is used to compare how similar two vectors of uniform length are. A lower length indicates that the two vectors are more similar than two vectors with a larger length.

## Mathematical Basis

The Euclidean distance is based off of real two-dimensional distance. That is, if you drew two points on a paper, and measured with a ruler. This two dimensional distance is based on the pythagorean theorem. Specifically, if you had two points (x1,y1) and (x2,y2) this distence would be given as follows.

This would work fine for comparing two vectors of length two. However, most vectors are longer than two numbers. To calculate the Euclidean distance for any sized vector, use the general form of the Euclidean distance equation.