Some matrices can be transformed to diagonal matrices, that is, a matrix where the terms not on the leading diagonal are zero.

For a symmetrical matrix we can rotate it to get a diagonal matrix, do some operation, then rotate it back to its original coordinates. This rotation matrix is the eigen matrix or the orthonormal basis of [A], in other words:

[D] = [Q]^{-1} [A] [Q]

where:

- [D] = Diagonal matrix, diagonal terms are eigenvectors of A
- [A] = Symmetrical Matrix
- [Q] = Orthogonal matrix, columns are eigenvectors of A
- [Q]
^{-1}= inverse of [Q]

## Derivation

The length of a vector squared is given by:

|V|² = V^{t} * V

where

- V = vector
- V
^{t}= transpose of vector - |V| = length of vector

This length will be unchanged if the coordinates are rotated by a matrix [R]. In this case the vector V is replaced by [R]V and the transposed vector V^{t} is replaced by V^{t}[R]^{t} (transposing both operands reverses the order) and the unchanged length is therefore:

|V|² = V^{t} * V = V^{t}[R]^{t}[R]V

therefore:

[R]^{t}[R] = [1]

where

- [1] = identity matrix
- [R]
^{t}= transpose of rotation matrix

See quadratic form.

## Inertia Tensor

An example of diagonalisation is an inertia tensor.

- Find the eigenvalues a by solving 0 = det{[A] - a[1]) for a. The values of a are the principal moments of inertia.
- Find the eigenvectors v of A by solving A v = a v for v.
- Normalize the eigenvectors.
- Form the matrix C whose whose columns consist of the normalized
- D = C
^{t}A C is the diagonal matrix of principal moments of inertia.

In principle, you can write down D directly after (1), however, completing (1) to (5) gives a check on your work.

Note: C^{t} is the transpose of C.

For this case where the only off diagonal terms are 12 and 21, you

know it only needs a rotation about axis 3 to diagonalize it. Use a

similarity transformation:

A'JA where A is the 3x3 rotation matrix about z.

Solve to find

j12 = 0 = j11cos²(a) -j22sin²(a) solve for a

j22 = j22cos²(a) - j11sin²(a)

j11 = j11cos²2(a) - j22sin²(a)

I don't know if that's easier.