Does computing distance in $N$ dimensions have any application beyond $N=3$? So I had to implement the distance formula earlier in programming, and had a thought that I should make it work for $N$ dimensions. I then smacked myself and realized that I'm programming for a maximum of three dimensions, but that got me thinking. Back in Math classes my professors alluded to the idea that the distance formula was scalable to $N$ dimensions.
Having gone into programming, unless explicitly given an $N$-dimensional problem, I tend to default to $2$ to $3$ dimensions. So my question, is there an application for distance in $N$ dimensions beyond $N=3$?
 A: Lots of applications!
An obvious one is error-correcting codes -- which, incidentally, are what brings my post via the Internet to you. These come down to finding ways to pack high-dimensional spheres as close to each other as possible without overlapping. The center of each sphere is the particular piece of data being encoded. As an example, let's say it's the first letter of this post transmitted as 8 bits in 12-dimensional space. If you can find a way to pack all 2^8 possible characters into 12-dimensional space $\{0,1\}^{12}$ surrounded by balls of radius $r$, then you can decode those points into their original meaning as long as you make $r$ or fewer mistakes (flipped bits) in the transmission.
In statistics it is extremely common to work in more than three dimensions. Suppose you are a researcher looking at patients with height, weight, age, sex, and arterial wall thickness and you want to predict the last from the other four. The problem lives in the five-dimensional space $\mathbb{R}^4\times\{\text{male},\text{female}\}$.
In fact the dimensions get so high in statistics that there is a well-known problem called the curse of dimensionality which deals with how hard it is to work with data in high dimensions, say 100 or more. It turns out that choosing the correct distance function is very important here, and that the 'usual' Euclidean distance is rarely the right one!
