Mahalanobis distance is a measure of distance between a point and distribution. So if we want to check if a point belongs to a particular distribution or not, we can use Hotelling's T-test, which is squared Mahalanobis distance. But if we have two sample distribution and we want to check if they belong to the same group or not, we can use two sample Hotelling's T-test, that is,
$ T^2$ = $n(X-Y)^T$$(X-Y)$ /$S$
(assuming same number of samples), where $S$=$Sx$+$Sy$ is the pooled covariance. Now my question is this, Is there any relation between Two Sample Hotelling's T-test and Mahalanobis Distance (similar to 1 sample H T-test and MD)? How are they mathematically related?
My thinking is that, there is some relation (equality) between them but I can't get my head around it. Any guidance would be greatly appreciated. Thanks