Orthogonal diagonalization


In linear algebra, an orthogonal diagonalization of a normal matrix is a diagonalization by means of an orthogonal change of coordinates.
The following is an orthogonal diagonalization algorithm that diagonalizes a quadratic form q on Rn by means of an orthogonal change of coordinates X = PY.
Then is the required orthogonal change of coordinates, and the diagonal entries of PTA''P'' will be the eigenvalues λ1,..., λn that correspond to the columns of P.