Modal matrix
In linear algebra, the modal matrix is used in the diagonalization process involving eigenvalues and eigenvectors. Specifically the modal matrix formula_1 for the matrix formula_2 is the "n" × "n" matrix formed with the eigenvectors of formula_2 as columns in formula_1. It is utilized in the similarity transformation where formula_6 is an "n" × "n" diagonal matrix with the eigenvalues of formula_2 on the main diagonal of formula_6 and zeros elsewhere. The matrix formula_6 is called the spectral matrix for formula_2. The eigenvalues must appear left to right, top to bottom in the same order as their corresponding  eigenvectors are arranged left to right in formula_1. Example. The matrix has eigenvalues and corresponding eigenvectors A diagonal matrix formula_6, similar to formula_2 is One possible choice for an invertible matrix formula_1 such that formula_5 is Note that since eigenvectors themselves are not unique, and since the columns of both formula_1 and formula_6 may be interchanged, it follows that both formula_1 and formula_6 are not unique. Generalized modal matrix. Let formula_2 be an "n" × "n" matrix. A generalized modal matrix formula_1 for formula_2 is an "n" × "n" matrix whose columns, considered as vectors, form a canonical basis for  formula_2 and appear in formula_1 according to the following rules: One can show that where formula_34 is a matrix in Jordan normal form. By premultiplying by formula_35, we obtain Note that when computing these matrices, equation () is the easiest of the two equations to verify, since it does not require inverting a matrix. Example. This example illustrates a generalized modal matrix with four Jordan chains. Unfortunately, it is a little difficult to construct an interesting example of low order. The matrix has a single eigenvalue formula_37 with algebraic multiplicity formula_38. A canonical basis for formula_2 will consist of one linearly  independent generalized eigenvector of rank 3 (generalized eigenvector rank; see generalized eigenvector), two of rank 2 and four of rank 1; or equivalently, one chain of three vectors formula_40, one chain of two vectors formula_41, and two chains of one vector formula_42, formula_43. An "almost diagonal" matrix formula_34 in "Jordan normal form", similar to formula_2 is obtained as follows: where formula_1 is a generalized modal matrix for formula_2, the columns of formula_1 are a canonical basis for formula_2, and formula_52. Note that since generalized eigenvectors themselves are not unique, and since some of the columns of both formula_1 and formula_34  may be interchanged, it follows that both formula_1 and formula_34 are not unique.