# Orthogonal matrix decomposition of symmetric matrix?

If matrix mat is symmetric, we should be able to decompose it into eigenvalue matrix matJ and orthogonal matrix matS so that

mat==matS.matJ.Transpose[matS]


True

Consider an example

mat = {{a,b},{b,c}};


The routine in Mathematica that does such a decomposition is JordanDecomposition, so that

{matS, matJ} = JordanDecomposition[mat];
mat == matS.matJ.Inverse[matS] // Simplify


True

However, this routine does not seem to take into account that mat is symmetric, and so returns a not orthogonal matrix for matS. Is there a way to get an orthogonal matrix matS from mathematica (so that Inverse[matS]==Transpose[matS]) in cases when mat is symmetric? (It seems for numerical matrices mat the routine HessenbergDecomposition gives orthogonal matrix matS, but what about the analytical case?)

• Have a look at Eigensystem. Moreover eigenvectors are usually not normalized for symbolic input matrices (in order to reduce the complexity of the output). – Henrik Schumacher Mar 18 '19 at 17:59
• I would have done it with: {vals, vecs} = Eigensystem[mat]; Inverse[vecs].DiagonalMatrix[vals].vecs // FullSimplify (You might need an extra transpose if the matrix isn't symmetric.) – bill s Mar 18 '19 at 18:06
• Thank you for the suggestions! – Kagaratsch Mar 18 '19 at 19:59
• If the matrix is numeric, and has distinct eigenvalues (no multiplicity) then normalizing the eigenvectors will give the desired matS. – Daniel Lichtblau Mar 19 '19 at 13:30