# Unit of the mahalalanobis distance between two individuals

I'm calculating the mahalanobis distance between two individuals/vectors of the same pool as it is described in mahalanobis distance between individuals by using https://stats.stackexchange.com/a/48576/163146 as code for R. Now I wonder the following: Is the resulting distance then really between the two individuals or is it in both cases relative to the center? In case of this assumption the distance between two individuals could also be calculated in the following way:

1. Calculate distance of the one individual relative to the center
2. Calculate distance of the other individual relative to the center
3. Sum these distances (in which way ever.. I just recognize that's probably a hint that this can't be true :)

However, just ignoring my thoughts: What's the unit of the distance between two individuals then? Typically it is measured in standard deviations but standard deviations between two individuals? Does that make sense? Can you please shine a bit light on me?

• I believe all your questions may be answered at stats.stackexchange.com/questions/62092/…. In particular, the explanation there should make it obvious that the Mahalanobis distance is unitless.
– whuber
Nov 21, 2017 at 14:53
• If you orthonormalize the variables (aka perform data whitening) by PCA or another linear approach, so that the data cloud is now round with radius (st. dev.) 1, then Euclidean distance between two points or between a point and the general centroid will be equal to the corresponding Mahalanobis distance. Nov 22, 2017 at 8:56

The Mahalanobis distance between random vectors $x,y$ is given by $$D_M(x,y)= \sqrt{(x-y)^T S^{-1}(x-y)}$$ (refer to Bottom to top explanation of the Mahalanobis distance? for more information). Here $S$ is the (sample) covariance matrix. For the scalar case this reduces to $$D_M(x,y)= \sqrt{\frac{(x-y)^2}{S^2}}$$ and this makes it pretty obvious that the Mahalanobis distance is unitless. The units is canceling out.