Artificial intelligent assistant

Map an ellipsoid to a sphere If I have a ellipsoid described by: $(\boldsymbol{x} - c)^T \boldsymbol{A} (\boldsymbol{x} - c) = 1$ How do I get the transformation to an unit sphere centered at the origin? From the principal axis theorem, I know that $\boldsymbol{A}$ must be diagonalized by: $ \boldsymbol{A} = \boldsymbol{R}^T \boldsymbol{D} \boldsymbol{R}$ Where $\boldsymbol{R}$ is an orthonormal matrix, which columns are the orthonormal eigenbasis, and $\boldsymbol{D}$ is the diagonal matrix. However I don't get how to proceed in order to get $\boldsymbol{M}$ in: $\boldsymbol{y} = \boldsymbol{M}(\boldsymbol{x} - c)$ where $\boldsymbol{y}$ is a point in the unit sphere. Context: What I'm really trying to do is calibrate a magnetometer sensor, which due to distortions instead of displaying a spherical locus, it is an ellipsoid. Knowing the center and the transformation between both should be enough to allow me to calibrate it for the application in hands.

**Hint:** $$ (x-c)^TA(x-c) = (x-c)^TR^TD^{1/2}D^{1/2}R(x-c) = \\\ [D^{1/2}R(x-c)]^T [D^{1/2}R(x-c)] $$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 5413c33f2e4a42bb25f0dea369bf1506