1

In this question, there's an informal answer that gives an intuition to the Mahalanobis distance. From my understanding, the Mahalanobis distance first transforms the vector, using the inverse of the covariance matrix $\Sigma^{-1}$, to map it into "uncorrelated" space (denoted by the circle in the linked question). If we wanted to measure the distance of two points within the "uncorrelated" space, would we not have to use the formula:

$$ (\Sigma^{-1}(x - y))^T\Sigma^{-1}(x-y)$$

in order to map the left-hand vector from the original space to the "uncorrelated" space as well? Sorry if I didn't formulate my understanding very well, I'm not a mathematician.

  • Wouldn't the covariance matrix be the transformation matrix times its transpose? – anon Dec 28 '22 at 00:53
  • 1
    Think of it as a squared distance $|\mathbf{v}|^2 = \mathbf{v}^T \mathbf{v}$ where $\mathbf{v} = W \left(x - y \right)$. The matrix $\Sigma^{-1}$ can be split or decomposed as $\Sigma^{-1} = W^T W$. See this page. – Paul Aljabar Dec 28 '22 at 01:25
  • @null Yes, it "uses" the inverse of the covariance matrix $\Sigma^{-1}$, but the important detail is how that covariance matrix is being used. – Ben Grossmann Dec 28 '22 at 02:58
  • @PaulAljabar thank you! A little bit of search led me to this, and it explains it pretty well (for anyone that stumbles on this later). – nullexception Dec 28 '22 at 04:53
  • I find it very strange to think of M.dist. as "first it maps the vector into uncorrelated space". I visualize the $\Sigma^{-1}$ as scaling, and not mapping.... I always visualize it as a calculation that is sort-of like Euclidean distance, only scaling/normalizing the calculations to compensate for the various scales of different coordinates and cross-correlations. Also, I always very emphatically think of M.dist. as distance between a point and a distribution (and not distance between two points). – Cal-linux Apr 03 '23 at 12:55

0 Answers0