I hope I can get some help to understand step by step calculations for formulas below.
If I have a weighted distance formula like below:
$d(O, P) = \sqrt{\frac{\hat{x_1^2}}{\hat{s_{11}}} + \frac{\hat{x_2^2}}{\hat{s_{22}}}}$ ---- eq 1.
And I have rotated my axes by $\theta$s and got new axes like below:
$\hat{x_1} = x_1cos(\theta) + x_2sin(\theta)$
$\hat{x_2} = -x_1sin(\theta) + x_2cos(\theta)$
Then, I get a distance formula like below by sustituting $\hat{x_1}$ and $\hat{x_2}$ in eq 1.:
$d(O, P) = \sqrt{a_{11}x_1^2 + 2a_{12}x_1x_2 + a_{22}x_2^2}$
And in my book, $a_{11}$ is calculated like below: $a_{11} = \frac{cos^2(\theta)}{cos^2(\theta)s_{11} + 2sin(\theta)cos(\theta)s_{12}+sin^2(\theta)s_{22}} + \frac{sin^2(\theta)}{cos^2(\theta)s_{22} - 2sin(\theta)cos(\theta)s_{12}+sin^2(\theta)s_{11}} $
In the book, it says that $a_{11}, a_{12}$ and $a_{22}$ are determined by the angle $\theta$ and $s_{11}, s_{12}$, and $s_{22}$ calculated from the original data. Additionally, $s_{11}, s_{12}$, and $s_{22}$ are variances and co-variance($s_{12}$).
My question here is to understand how the calculations are done. Can you please tell me how all the calculations done here.