In

_{''n''}(''F'')), $P$, such that $P^AP$ is a diagonal matrix. Formally,

_{''i''} denotes the standard basis of R^{''n''}. The reverse change of basis is given by
:$\backslash mathbf\_1\; =\; \backslash mathbf,\backslash qquad\; \backslash mathbf\_2\; =\; \backslash mathbf\; -\; \backslash mathbf.$
Straightforward calculations show that
:$M\backslash mathbf\; =\; a\backslash mathbf,\backslash qquad\; M\backslash mathbf\; =\; b\backslash mathbf.$
Thus, ''a'' and ''b'' are the eigenvalues corresponding to u and v, respectively. By linearity of matrix multiplication, we have that
:$M^n\; \backslash mathbf\; =\; a^n\; \backslash mathbf,\backslash qquad\; M^n\; \backslash mathbf\; =\; b^n\; \backslash mathbf.$
Switching back to the standard basis, we have
:$\backslash begin\; M^n\; \backslash mathbf\_1\; \&=\; M^n\; \backslash mathbf\; =\; a^n\; \backslash mathbf\_1,\; \backslash \backslash \; M^n\; \backslash mathbf\_2\; \&=\; M^n\; \backslash left(\backslash mathbf\; -\; \backslash mathbf\backslash right)\; =\; b^n\; \backslash mathbf\; -\; a^n\backslash mathbf\; =\; \backslash left(b^n\; -\; a^n\backslash right)\; \backslash mathbf\_1\; +\; b^n\backslash mathbf\_2.\; \backslash end$
The preceding relations, expressed in matrix form, are
:$M^n\; =\; \backslash begin\; a^n\; \&\; b^n\; -\; a^n\; \backslash \backslash \; 0\; \&\; b^n\; \backslash end,$
thereby explaining the above phenomenon.

linear algebra
Linear algebra is the branch of mathematics
Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities and their changes. Thes ...

, a square matrix $A$ is called diagonalizable or non-defective if it is similar to a diagonal matrix, i.e., if there exists an invertible matrix $P$ and a diagonal matrix $D$ such that or equivalently (Such $D$ are not unique.) For a finite-dimensional vector space
In mathematics and physics
Physics is the natural science that studies matter, its fundamental constituents, its motion and behavior through space and time, and the related entities of energy and force. "Physical science is th ...

a linear map
In mathematics
Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities and their changes. These topics are represented in ...

$T:V\backslash to\; V$ is called diagonalizable if there exists an ordered basis of $V$ consisting of eigenvectors of $T$. These definitions are equivalent: if $T$ has a matrix representation $T\; =\; PDP^$ as above, then the column vectors of $P$ form a basis consisting of eigenvectors of and the diagonal entries of $D$ are the corresponding eigenvalue
In linear algebra
Linear algebra is the branch of mathematics
Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities ...

s of with respect to this eigenvector basis, $A$ is represented by Diagonalization is the process of finding the above $P$ and
Diagonalizable matrices and maps are especially easy for computations, once their eigenvalues and eigenvectors are known. One can raise a diagonal matrix $D$ to a power by simply raising the diagonal entries to that power, and the determinant of a diagonal matrix is simply the product of all diagonal entries; such computations generalize easily to Geometrically, a diagonalizable matrix is an inhomogeneous dilation (or ''anisotropic scaling'') — it scales the space, as does a '' homogeneous dilation'', but by a different factor along each eigenvector axis, the factor given by the corresponding eigenvalue.
A square matrix that is not diagonalizable is called '' defective''. It can happen that a matrix $A$ with real entries is defective over the real numbers, meaning that $A\; =\; PDP^$ is impossible for any invertible $P$ and diagonal $D$ with real entries, but it is possible with complex entries, so that $A$ is diagonalizable over the complex numbers. For example, this is the case for a generic rotation matrix.
Many results for diagonalizable matrices hold only over an algebraically closed field (such as the complex numbers). In this case, diagonalizable matrices are dense in the space of all matrices, which means any defective matrix can be deformed into a diagonalizable matrix by a small perturbation; and the Jordan normal form theorem states that any matrix is uniquely the sum of a diagonalizable matrix and a nilpotent matrix. Over an algebraically closed field, diagonalizable matrices are equivalent to semi-simple matrices.
Definition

A square $n\; \backslash times\; n$ matrix, $A$, with entries in a field $F$ is called diagonalizable or nondefective if there exists an $n\; \backslash times\; n$ invertible matrix (i.e. an element of the general linear group GLCharacterization

The fundamental fact about diagonalizable maps and matrices is expressed by the following: * An $n\; \backslash times\; n$ matrix $A$ over a field $F$ is diagonalizable if and only if the sum of the dimensions of its eigenspaces is equal to $n$, which is the case if and only if there exists a basis of $F^$ consisting of eigenvectors of $A$. If such a basis has been found, one can form the matrix $P$ having these basis vectors as columns, and $P^AP$ will be a diagonal matrix whose diagonal entries are the eigenvalues of $A$. The matrix $P$ is known as a modal matrix for $A$. * A linear map $T\; :\; V\; \backslash to\; V$ is diagonalizable if and only if the sum of the dimensions of its eigenspaces is equal to which is the case if and only if there exists a basis of $V$ consisting of eigenvectors of $T$. With respect to such a basis, $T$ will be represented by a diagonal matrix. The diagonal entries of this matrix are the eigenvalues of Another characterization: A matrix or linear map is diagonalizable over the field $F$ if and only if its minimal polynomial is a product of distinct linear factors over (Put another way, a matrix is diagonalizable if and only if all of its elementary divisors are linear.) The following sufficient (but not necessary) condition is often useful. * An $n\; \backslash times\; n$ matrix $A$ is diagonalizable over the field $F$ if it has $n$ distinct eigenvalues in i.e. if its characteristic polynomial has $n$ distinct roots in however, the converse may be false. Consider $$\backslash begin\; -1\; \&\; 3\; \&\; -1\; \backslash \backslash \; -3\; \&\; 5\; \&\; -1\; \backslash \backslash \; -3\; \&\; 3\; \&\; 1\; \backslash end,$$ which has eigenvalues 1, 2, 2 (not all distinct) and is diagonalizable with diagonal form ( similar to $$\backslash begin\; 1\; \&\; 0\; \&\; 0\; \backslash \backslash \; 0\; \&\; 2\; \&\; 0\; \backslash \backslash \; 0\; \&\; 0\; \&\; 2\; \backslash end$$ and change of basis matrix $P$: $$\backslash begin\; 1\; \&\; 1\; \&\; -1\; \backslash \backslash \; 1\; \&\; 1\; \&\; 0\; \backslash \backslash \; 1\; \&\; 0\; \&\; 3\; \backslash end.$$ The converse fails when $A$ has an eigenspace of dimension higher than 1. In this example, the eigenspace of $A$ associated with the eigenvalue 2 has dimension 2. * A linear map $T\; :\; V\; \backslash to\; V$ with $n\; =\; \backslash dim(V)$ is diagonalizable if it has $n$ distinct eigenvalues, i.e. if its characteristic polynomial has $n$ distinct roots in $F$. Let $A$ be a matrix over If $A$ is diagonalizable, then so is any power of it. Conversely, if $A$ is invertible, $F$ is algebraically closed, and $A^n$ is diagonalizable for some $n$ that is not an integer multiple of the characteristic of then $A$ is diagonalizable. Proof: If $A^n$ is diagonalizable, then $A$ is annihilated by some polynomial which has no multiple root (since and is divided by the minimal polynomial of Over the complex numbers $\backslash Complex$, almost every matrix is diagonalizable. More precisely: the set of complex $n\; \backslash times\; n$ matrices that are ''not'' diagonalizable over considered as asubset
In mathematics
Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities and their changes. These topics are represented i ...

of has Lebesgue measure
In measure theory, a branch of mathematics
Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities and their changes. These ...

zero. One can also say that the diagonalizable matrices form a dense subset with respect to the Zariski topology: the non-diagonalizable matrices lie inside the vanishing set of the discriminant of the characteristic polynomial, which is a hypersurface. From that follows also density in the usual (''strong'') topology given by a norm. The same is not true over
The Jordan–Chevalley decomposition expresses an operator as the sum of its semisimple (i.e., diagonalizable) part and its nilpotent part. Hence, a matrix is diagonalizable if and only if its nilpotent part is zero. Put in another way, a matrix is diagonalizable if each block in its Jordan form has no nilpotent part; i.e., each "block" is a one-by-one matrix.
Diagonalization

If a matrix $A$ can be diagonalized, that is, : $P^AP\; =\; \backslash begin\; \backslash lambda\_1\; \&\; 0\; \&\; \backslash cdots\; \&\; 0\; \backslash \backslash \; 0\; \&\; \backslash lambda\_2\; \&\; \backslash cdots\; \&\; 0\; \backslash \backslash \; \backslash vdots\; \&\; \backslash vdots\; \&\; \backslash ddots\; \&\; \backslash vdots\; \backslash \backslash \; 0\; \&\; 0\; \&\; \backslash cdots\; \&\; \backslash lambda\_n\; \backslash end,$ then: : $AP\; =\; P\backslash begin\; \backslash lambda\_1\; \&\; 0\; \&\; \backslash cdots\; \&\; 0\; \backslash \backslash \; 0\; \&\; \backslash lambda\_2\; \&\; \backslash cdots\; \&\; 0\; \backslash \backslash \; \backslash vdots\; \&\; \backslash vdots\; \&\; \backslash ddots\; \&\; \backslash vdots\; \backslash \backslash \; 0\; \&\; 0\; \&\; \backslash cdots\; \&\; \backslash lambda\_n\; \backslash end.$ Writing $P$ as a block matrix of its column vectors $\backslash boldsymbol\_$ :$P\; =\; \backslash begin\; \backslash boldsymbol\_1\; \&\; \backslash boldsymbol\_2\; \&\; \backslash cdots\; \&\; \backslash boldsymbol\_n\; \backslash end,$ the above equation can be rewritten as :$A\backslash boldsymbol\_i\; =\; \backslash lambda\_i\; \backslash boldsymbol\_i\; \backslash qquad\; (i=1,2,\backslash dots,n).$ So the column vectors of $P$ are right eigenvectors of and the corresponding diagonal entry is the correspondingeigenvalue
In linear algebra
Linear algebra is the branch of mathematics
Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities ...

. The invertibility of $P$ also suggests that the eigenvectors are linearly independent and form a basis of This is the necessary and sufficient condition for diagonalizability and the canonical approach of diagonalization. The row vectors of $P^$ are the left eigenvectors of
When a complex matrix $A\backslash in\backslash mathbb^$ is a Hermitian matrix
In mathematics
Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities and their changes. These topics are represented in ...

(or more generally a normal matrix), eigenvectors of $A$ can be chosen to form an orthonormal basis of and $P$ can be chosen to be a unitary matrix. If in addition, $A\backslash in\backslash mathbb^$ is a real symmetric matrix, then its eigenvectors can be chosen to be an orthonormal basis of $\backslash mathbb^n$ and $P$ can be chosen to be an orthogonal matrix.
For most practical work matrices are diagonalized numerically using computer software. Many algorithms exist to accomplish this.
Simultaneous diagonalization

A set of matrices is said to be ''simultaneously diagonalizable'' if there exists a single invertible matrix $P$ such that $P^AP$ is a diagonal matrix for every $A$ in the set. The following theorem characterizes simultaneously diagonalizable matrices: A set of diagonalizable matrices commutes if and only if the set is simultaneously diagonalizable. The set of all $n\; \backslash times\; n$ diagonalizable matrices (over with $n\; >\; 1$ is not simultaneously diagonalizable. For instance, the matrices :$\backslash begin\; 1\; \&\; 0\; \backslash \backslash \; 0\; \&\; 0\; \backslash end\; \backslash quad\backslash text\backslash quad\; \backslash begin\; 1\; \&\; 1\; \backslash \backslash \; 0\; \&\; 0\; \backslash end$ are diagonalizable but not simultaneously diagonalizable because they do not commute. A set consists of commuting normal matrices if and only if it is simultaneously diagonalizable by a unitary matrix; that is, there exists a unitary matrix $U$ such that $U^\; AU$ is diagonal for every $A$ in the set. In the language of Lie theory, a set of simultaneously diagonalizable matrices generate a toral Lie algebra.Examples

Diagonalizable matrices

* Involutions are diagonalizable over the reals (and indeed any field of characteristic not 2), with ±1 on the diagonal. * Finite order endomorphisms are diagonalizable over $\backslash mathbb$ (or any algebraically closed field where the characteristic of the field does not divide the order of the endomorphism) withroots of unity
In mathematics
Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities and their changes. These topics are represented i ...

on the diagonal. This follows since the minimal polynomial is separable, because the roots of unity are distinct.
* Projections are diagonalizable, with 0s and 1s on the diagonal.
* Real symmetric matrices are diagonalizable by orthogonal matrices; i.e., given a real symmetric matrix $Q^AQ$ is diagonal for some orthogonal matrix More generally, matrices are diagonalizable by unitary matrices if and only if they are normal. In the case of the real symmetric matrix, we see that so clearly $AA^\; =\; A^A$ holds. Examples of normal matrices are real symmetric (or skew-symmetric) matrices (e.g. covariance matrices) and Hermitian matrices (or skew-Hermitian matrices). See spectral theorems for generalizations to infinite-dimensional vector spaces.
Matrices that are not diagonalizable

In general, a rotation matrix is not diagonalizable over the reals, but all rotation matrices are diagonalizable over the complex field. Even if a matrix is not diagonalizable, it is always possible to "do the best one can", and find a matrix with the same properties consisting of eigenvalues on the leading diagonal, and either ones or zeroes on the superdiagonal – known as Jordan normal form. Some matrices are not diagonalizable over any field, most notably nonzero nilpotent matrices. This happens more generally if the algebraic and geometric multiplicities of an eigenvalue do not coincide. For instance, consider :$C\; =\; \backslash begin\; 0\; \&\; 1\; \backslash \backslash \; 0\; \&\; 0\; \backslash end.$ This matrix is not diagonalizable: there is no matrix $U$ such that $U^CU$ is a diagonal matrix. Indeed, $C$ has one eigenvalue (namely zero) and this eigenvalue has algebraic multiplicity 2 and geometric multiplicity 1. Some real matrices are not diagonalizable over the reals. Consider for instance the matrix :$B\; =\; \backslash left;\; href="/html/ALL/s/begin\_0\_\_1\_\backslash \backslash \_\backslash !-1\_\_0\_\backslash end\backslash right.html"\; ;"title="begin\; 0\; 1\; \backslash \backslash \; \backslash !-1\; 0\; \backslash end\backslash right">begin\; 0\; 1\; \backslash \backslash \; \backslash !-1\; 0\; \backslash end\backslash right$ The matrix $B$ does not have any real eigenvalues, so there is no real matrix $Q$ such that $Q^BQ$ is a diagonal matrix. However, we can diagonalize $B$ if we allow complex numbers. Indeed, if we take :$Q\; =\; \backslash begin\; 1\; \&\; i\; \backslash \backslash \; i\; \&\; 1\; \backslash end,$ then $Q^BQ$ is diagonal. It is easy to find that $B$ is the rotation matrix which rotates counterclockwise by angle $\backslash theta\; =\; \backslash frac$ Note that the above examples show that the sum of diagonalizable matrices need not be diagonalizable.How to diagonalize a matrix

Diagonalizing a matrix is the same process as finding its eigenvalues and eigenvectors, in the case that the eigenvectors form a basis. For example, consider the matrix :$A=\backslash left;\; href="/html/ALL/s/begin\; 0\_\_1\_\_\backslash !\backslash !\backslash !-2\backslash \backslash \; 0\_\_1\_\_0\backslash \backslash \; 1\_\_\backslash !\backslash !\backslash !-1\_\_3\; \backslash end\backslash right.html"\; ;"title="begin\; 0\; 1\; \backslash !\backslash !\backslash !-2\backslash \backslash \; 0\; 1\; 0\backslash \backslash \; 1\; \backslash !\backslash !\backslash !-1\; 3\; \backslash end\backslash right">begin\; 0\; 1\; \backslash !\backslash !\backslash !-2\backslash \backslash \; 0\; 1\; 0\backslash \backslash \; 1\; \backslash !\backslash !\backslash !-1\; 3\; \backslash end\backslash right$ The roots of the characteristic polynomial $p(\backslash lambda)=\backslash det(\backslash lambda\; I-A)$ are the eigenvalues Solving the linear system $\backslash left(I-A\backslash right)\; \backslash mathbf\; =\; \backslash mathbf$ gives the eigenvectors $\backslash mathbf\_1\; =\; (1,1,0)$ and while $\backslash left(2I-A\backslash right)\backslash mathbf\; =\; \backslash mathbf$ gives that is, $A\; \backslash mathbf\_i\; =\; \backslash lambda\_i\; \backslash mathbf\_i$ for These vectors form a basis of so we can assemble them as the column vectors of a change-of-basis matrix $P$ to get: $$P^AP\; =\; \backslash left;\; href="/html/ALL/s/begin\; 1\_\_0\_\_1\backslash \backslash \; 1\_\_2\_\_0\backslash \backslash \; 0\_\_1\_\_\backslash !\backslash !\backslash !\backslash !-1\; \backslash end\backslash right.html"\; ;"title="begin\; 1\; 0\; 1\backslash \backslash \; 1\; 2\; 0\backslash \backslash \; 0\; 1\; \backslash !\backslash !\backslash !\backslash !-1\; \backslash end\backslash right">begin\; 1\; 0\; 1\backslash \backslash \; 1\; 2\; 0\backslash \backslash \; 0\; 1\; \backslash !\backslash !\backslash !\backslash !-1\; \backslash end\backslash right$$ We may see this equation in terms of transformations: $P$ takes the standard basis to the eigenbasis, so we have: $$P^\; AP\; \backslash mathbf\_i\; =\; P^\; A\; \backslash mathbf\_i\; =\; P^\; (\backslash lambda\_i\backslash mathbf\_i)\; =\; \backslash lambda\_i\backslash mathbf\_i,$$ so that $P^\; AP$ has the standard basis as its eigenvectors, which is the defining property of Note that there is no preferred order of the eigenvectors in changing the order of the eigenvectors in $P$ just changes the order of theeigenvalues
In linear algebra
Linear algebra is the branch of mathematics
Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities ...

in the diagonalized form of
Application to matrix functions

Diagonalization can be used to efficiently compute the powers of a matrix : $\backslash begin\; A^k\; \&=\; \backslash left(PDP^\backslash right)^k\; =\; \backslash left(PDP^\backslash right)\; \backslash left(PDP^\backslash right)\; \backslash cdots\; \backslash left(PDP^\backslash right)\; \backslash \backslash \; \&=\; PD\backslash left(P^P\backslash right)\; D\; \backslash left(P^P\backslash right)\; \backslash cdots\; \backslash left(P^P\backslash right)\; D\; P^\; =\; PD^kP^,\; \backslash end$ and the latter is easy to calculate since it only involves the powers of a diagonal matrix. For example, for the matrix $A$ with eigenvalues $\backslash lambda\; =\; 1,1,2$ in the example above we compute: : $\backslash begin\; A^k\; =\; PD^kP^\; \&=\; \backslash left;\; href="/html/ALL/s/begin\; \_\_\_\_\_\_\_1\_\_\backslash ,0\_\_\_\_\_\_\_\_\_\_\_1\_\backslash \backslash \; \_\_\_\_\_\_\_1\_\_\_\_2\_\_\_\_\_\_\_\_\_\_\_0\_\backslash \backslash \; \_\_\_\_\_\_\_0\_\_\_\_1\_\_\backslash !\backslash !\backslash !\backslash !-1\; \_\_\_\_\_\backslash end\backslash right.html"\; ;"title="begin\; 1\; \backslash ,0\; 1\; \backslash \backslash \; 1\; 2\; 0\; \backslash \backslash \; 0\; 1\; \backslash !\backslash !\backslash !\backslash !-1\; \backslash end\backslash right">begin\; 1\; \backslash ,0\; 1\; \backslash \backslash \; 1\; 2\; 0\; \backslash \backslash \; 0\; 1\; \backslash !\backslash !\backslash !\backslash !-1\; \backslash end\backslash right$ This approach can be generalized to matrix exponential and other matrix functions that can be defined as power series. For example, defining we have: : $\backslash begin\; \backslash exp(A)\; =\; P\; \backslash exp(D)\; P^\; \&=\; \backslash left;\; href="/html/ALL/s/begin\; \_\_\_\_\_\_\_1\_\_\backslash ,0\_\_\_\_\_\_\_\_\_\_\_1\_\backslash \backslash \; \_\_\_\_\_\_\_1\_\_\_\_2\_\_\_\_\_\_\_\_\_\_\_0\_\backslash \backslash \; \_\_\_\_\_\_\_0\_\_\_\_1\_\_\backslash !\backslash !\backslash !\backslash !-1\; \_\_\_\_\_\backslash end\backslash right.html"\; ;"title="begin\; 1\; \backslash ,0\; 1\; \backslash \backslash \; 1\; 2\; 0\; \backslash \backslash \; 0\; 1\; \backslash !\backslash !\backslash !\backslash !-1\; \backslash end\backslash right">begin\; 1\; \backslash ,0\; 1\; \backslash \backslash \; 1\; 2\; 0\; \backslash \backslash \; 0\; 1\; \backslash !\backslash !\backslash !\backslash !-1\; \backslash end\backslash right$ This is particularly useful in finding closed form expressions for terms of linear recursive sequences, such as the Fibonacci numbers.Particular application

For example, consider the following matrix: :$M\; =\; \backslash begina\; \&\; b\; -\; a\backslash \backslash \; 0\; \&\; b\backslash end.$ Calculating the various powers of $M$ reveals a surprising pattern: :$M^2\; =\; \backslash begina^2\; \&\; b^2-a^2\; \backslash \backslash \; 0\; \&b^2\; \backslash end,\backslash quad\; M^3\; =\; \backslash begina^3\; \&\; b^3-a^3\; \backslash \backslash \; 0\; \&b^3\; \backslash end,\backslash quad\; M^4\; =\; \backslash begina^4\; \&\; b^4-a^4\; \backslash \backslash \; 0\; \&b^4\; \backslash end,\backslash quad\; \backslash ldots$ The above phenomenon can be explained by diagonalizing To accomplish this, we need a basis of $\backslash R^2$ consisting of eigenvectors of One such eigenvector basis is given by :$\backslash mathbf\; =\; \backslash begin\; 1\; \backslash \backslash \; 0\; \backslash end\; =\; \backslash mathbf\_1,\backslash quad\; \backslash mathbf\; =\; \backslash begin\; 1\; \backslash \backslash \; 1\; \backslash end\; =\; \backslash mathbf\_1\; +\; \backslash mathbf\_2,$ where eQuantum mechanical application

In quantum mechanical and quantum chemical computations matrix diagonalization is one of the most frequently applied numerical processes. The basic reason is that the time-independent Schrödinger equation is an eigenvalue equation, albeit in most of the physical situations on an infinite dimensional space (aHilbert space
In mathematics
Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities and their changes. These topics are represented in ...

).
A very common approximation is to truncate Hilbert space to finite dimension, after which the Schrödinger equation can be formulated as an eigenvalue problem of a real symmetric, or complex Hermitian matrix. Formally this approximation is founded on the variational principle, valid for Hamiltonians that are bounded from below.
First-order perturbation theory also leads to matrix eigenvalue problem for degenerate states.
See also

* Defective matrix * Scaling (geometry) * Triangular matrix * Semisimple operator * Diagonalizable group * Jordan normal form * Weight module – associative algebra generalization * Orthogonal diagonalizationNotes

References

{{Matrix classes Matrices