Mahalanobis distance invariant Is the Mahalanobis distance invariant with respect to arbitrary non-singular linear transformations? I mean if $C$ an arbitrary regular $(p × p)$-matrix and $b$ in $R$ arbitrary and $ \tilde{x}_n= C\,x_n +b$, is it then true that $d\left(x_n,x_m\right)=d\left(\tilde{x}_n,\tilde{x}_m\right)$. And if so, why?
 A: Yes, the Mahalanobis distance is invariant under affine transformations. Intuitively this follows from the interpretation of the Mahalanobis distance. The Mahalanobis distance measures in a unitless and scale-invariant way how far an observation lies from the mean of the distribution. Another intuitive explanation can be found here.
Here is  an explicit calculation.
Let $X$ be a random vector with expected value $\mu=E[X]$ and covariance matrix $S=E[(X-\mu)(X-\mu)^T]$. Consider the new random vector $\tilde X = C X + b$. Its expected value is
$$
 \tilde \mu = E[\tilde X] = E[CX + b] = C E[X] +b = C\mu + b.
$$
Furthermore the covariance matrix $\tilde S$ of $\tilde X$ is 
$$
 \begin{align*}
  \tilde S &= E[(\tilde X - \tilde \mu)(\tilde X - \tilde \mu)^T] \\
           &= E[(CX +b-C\mu -b)(CX + b - C\mu- b)^T] \\
           &= E[C(X-\mu)(X-\mu)^T C^T] \\
           &= C E[(X-\mu)(X-\mu)^T]C^T = C S C^T.
 \end{align*}
$$ 
Then the Mahalanobis distance between two observations $\tilde x = C x + b$ and $\tilde y = C y +b $ is the same as the Mahalanobis distance between $x$ and $y$:
$$
\begin{align*}
  \left(d(\tilde x, \tilde y)\right)^2 &= (\tilde x - \tilde y)^T \tilde S^{-1} (\tilde x - \tilde y) \\
&= (x-y)^T C^T \left((C^T)^{-1}S^{-1}C^{-1}\right)\left(C(x-y)\right)\\
&= (x-y)^T S^{-1}(x-y) = \left(d(x, y)\right)^2.
\end{align*}
$$
