Mahalanobis Distance

Mahalanobis distance is a distance calculated using the inverse of the covariance matrix as the metric. For two vectors $\mathbf x$ and $\mathbf y$, the Mahalanobis distance is

$$ d^2 = (x_i - \bar x) g_{ij} (y_j - \bar y), $$

where $g_{ij} = (S^{-1})_{ij}$ and $\mathbf S$ is the covariance matrix.

The covariance is a normalization that mitigates the covariances.

Planted: by ;

No backlinks identified. Reference this note using the Note ID cards/math/ in other notes to connect them.

L Ma (2020). 'Mahalanobis Distance', Datumorphism, 03 April. Available at: