I need to facotrise a real symmetric matrix A as QDQ’. Since A is symmetric, the eigendecomposition *can* return such factorisation (but it may in principle return a different one TDT⁻¹ such that TT’≠I). Neither the Stan manual for eigenvectors_sym nor the corresponding eigen function mention that the eigenvectors returned are orthogonal (or, equivalently, that the operation coincides with the SVD).

I looked into the eigen documentation and it looks like they use the *symmetric QR algorithm* that, as far as I know, does return the facotrisation I want. Testing Stan with a few random matrices seems to confirm that the eigenvectors returned are indeed orthogonal.

Since this is not documented in Stan, can I rely on this behaviour or not? If so, should it be also written in the documentation?

Thank you in advance.