Source: Pixabay

Understanding the Mathematics of Higher Dimensions

A Visual Proof of Euclidean Distance for 4+ Dimensions

--

Data scientists often work with high-dimensional data — depending on the context, data scientists can be working with millions of dimensions. In a world where each new feature is another dimension, it can be easy to lose a true understanding of higher dimensions and how they work (the curse of dimensionality, for example), which can be helpful in devising algorithms and in data analytics.

Almost every algorithm in machine learning requires finding the Euclidean distance — a straight line — between two points in multidimensional space.

In this article, you’ll understand how Euclidean distance is calculated in 4+ dimensions — a core element of KNN, SVM, and others, in a visual proof.

The original Pythagorean Theorem states that in a two-dimensional right triangle with legs a and b, a² + b² = c²:

By adding another triangle whose leg is the same length as the original triangle’s hypotenuse, we can expand the Pythagorean Theorem through substitution:

--

--