Can I rely on eigenvectors_sym returning orthogonal eigenvectors?
Nobody has claimed this yet.
- Dominant language
- TeX
- Stars
- 43
- Forks
- 133
- Avg merge
- 11h 32m
- Merged PRs (30d)
- 4
Description
Summary:
The function eigenvectors_sym returns the factorisation QDQ’ for a real symmetric matrix. The documentation describes it as a generic eigendecomposition without specifying that the eigenvectors are orthogonal. This factorisation also coincides with the SVD. This is useful information that I think could be added to the manual.
Description:
Copy-pasting from this post on discourse:
I need to factorise 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 factorisation 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?
I have opened a corresponding issue for Eigen.
Current Version:
v2.18.0
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the eigenvectors_sym entry in the Stan manual and the linked Eigen SelfAdjointEigenSolver documentation, then review the linked Eigen issue about orthogonality. Done means the manual clearly states whether the returned eigenvectors can be relied on as orthogonal and explains the SVD relationship, if confirmed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- tex
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100