I recently asked about the Mahalanobis distance and I got pretty good answers in this post:
Bottom to top explanation of the Mahalanobis distance?
I think I got the idea, but what I still felt missing was the derivation of the formula for the Mahalanobis distance. So my question is: "How does one derive the formula for Mahalanobis distance?"
Why does the formula have the form:
$$D(\textbf{x},\textbf{y})=\sqrt{ (\textbf{x}-\textbf{y})^TC^{-1}(\textbf{x}-\textbf{y})} $$
Could perhaps someone give analogous derivation as user @sjm.majewski gave on Principal component analysis on the link below:
Making sense of principal component analysis, eigenvectors & eigenvalues
UPDATE:
From Wikipedia intuitive explanation was:
"The Mahalanobis distance is simply the distance of the test point from the center of mass divided by the width of the ellipsoid in the direction of the test point."
So is $C^{-1}$ the width of the ellipsoid in the direction of the test point? I mean this distance I can understand: $$\displaystyle\frac{\textbf{x}-\textbf{u}}{\sigma}$$
But this distance confuses me...:/
$$\sqrt{ (\textbf{x}-\textbf{y})^TC^{-1}(\textbf{x}-\textbf{y})} $$