In linear algebra, an orthogonal diagonalization of a normal matrix (e.g. a symmetric 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(x) on R<sup>n</sup> by means of an orthogonal change of coordinates X = PY.
Then is the required orthogonal change of coordinates, and the diagonal entries of P<sup>T</sup>A'P will be the eigenvalues û<sub>1</sub>, ..., û<sub>n</sub> that correspond to the columns of P.
Such decomposition exists by the spectral theorem.