We have a quadratic form (in physics it is called a Lagrangian)
$$L=\frac{1}{2}\sum_{i,j}m_{ij}\dot{x}_i\dot{x}_j-\frac{1}{2}\sum_{i,j}k_{ij}x_ix_j=\frac{1}{2}\big(\dot{\vec{x}}|M\dot{\vec{x}}\big)-\frac{1}{2}\big(\vec{x}|K\vec{x}\big)$$
where $M$ and $K$ are positive definite symmetric matrices. We wish to find a change of basis such that both matrices $M$ and $K$ are diagonal (because then the equations of motion are separated, which is important in physics)
We can diagonalise $M$ with and orthogonal matrix $U$ because $M$ is real and symmetries, so:
$$M=S^TD_MS$$
now since $M$ positive definite it has positive eigenvalues so there exist a matrix $S_{ij}=\frac{\delta_{ij}}{\sqrt{\mu_i}}$ (where $\mu_i$ are eigenvalues of the matrix $D_M$)
we can see that the matrix $US$ transform the matrix $M$ in to an unit matrix
$$(US)^TM(US)=I$$
The matrix $(US)^TK(US)$ is still symmetric because
$$k'_{ij}=\sum_{k,l}(US)_{ik}^Tk_{kl}(US)_{lj}=\sum_{k,l}(US)_{ki}k_{kl}(US)_{jl}^T=\sum_{k,l}(US)_{jl}^Tk_{lk}(US)_{ki}=k'_{ji}$$
and since $K'$ is symmetric there exist a orthogonal matrix $V$ such that $V^TK'V=(USV)^TK(USV)$ and since $(US)^TM(US)=I$ then changing the basis of a unitary matrix does nothing, that is $V^T(US)^TM(US)V=V^TIV=V^TV=I$. This proves that the matrix $(USV)$ diagonalises $M$ and $K$ simultaneously.
my problem is the following: first there is a change of basis that diagonalises $M$ so we rewrite it in a new basis and it is $D_M$ this part is standard diagonalisation, but now we ''shorten'' or ''lengthen'' each eigenvector so that our matrix becomes the unit matrix $I$. I am really confused about this part, this means that every diagonalisable (and positive definite) matrix is a unitary matrix in some coordinatisation, but since $I$ in unchanged by the change of basis any further transformation will leave it unchanged so that means any other coordinatisation also diagonalises $M$ which is the thing we use to prove that the transformation $V^TKV$ that diagonalises $K$ will not un-diagonalise $M$ (that is $(US)^TM(US)$ )
this would mean that all vectors are eigenvectors of $M$ since any transformation that changes it's basis ($V^TV$) after we have reduced it to $I$ will not change it
This is obviously wrong, but I don't understand what is wrong with it.
and the second and third part of the question is
Are the eigenvector of $M$ and $K$ the same vectors or does just the transformation $USV$ change them, but not to the same basis (but I don't see how it would be possible)
and finally is the new basis orthogonal? (it seems to me it should be based on the principal axis theorem bit it makes no sense given this kind of transformation)