I recently asked about the Mahanalobis distance and I got pretty good answers in this post: http://stats.stackexchange.com/questions/62092/bottom-to-top-explanation-of-the-mahanalobis-distance I think I got the idea, but what I still felt missing was the derivation of the formula for the Mahanalobis formula. So my question is: "How does one derive the formula for Mahanalobis 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: http://stats.stackexchange.com/questions/2691/making-sense-of-principal-component-analysis-eigenvectors-eigenvalues/33654#33654