Mahalanobis distance-like function and Normalized Mahalanobis distance-like function

Input: data points x,y ∈ (ℝ^n), symmetric positive definite matrix ∑ ∈ (ℝ^(n×n)); 
Output dm: Mahalanobis distance between the points x,y ∈ (ℝ^n);
Output dM: normalized Mahalanobis distance between the points x,y ∈ (ℝ^n);
Submodules: none needed

dm[x_,y_,S_]:=(x-y).Inverse[S].(x-y);
dM[x_,y_,S_]:=(Det[S]^(1/n))(x-y).Inverse[S].(x-y);