maths.freeLinear Algebra › Geometry and spectra › Diagonalizable matrix

Diagonalizable matrix

In linear algebra, a square matrix is called diagonalizable or non-defective if it is similar to a diagonal matrix. That is, if there exists an invertible matrix and a diagonal matrix such that . This is equivalent to .

Diagonalizable matrix

In linear algebra, a square matrix \(A\) is called diagonalizable or non-defective if it is similar to a diagonal matrix. That is, if there exists an invertible matrix \(P\) and a diagonal matrix \(D\) such that \(P^{-1}AP=D\). This is equivalent to \(A = PDP^{-1}\). (Such \(P\), \(D\) are not unique.) This property exists for any linear map: for a finite-dimensional vector space \(V\), a linear map \(T:V\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 \(A = PDP^{-1}\) as above, then the column vectors of \(P\) form a basis consisting of eigenvectors of \(T\), and the diagonal entries of \(D\) are the corresponding eigenvalues of \(T\); with respect to this eigenvector basis, \(T\) is represented by \(D\).

Diagonalization is the process of finding the above \(P\) and \(D\) and makes many subsequent computations easier. One can raise a diagonal matrix \(D\) to a power by simply raising the diagonal entries to that power. The determinant of a diagonal matrix is simply the product of all diagonal entries. Such computations generalize easily to \(A=PDP^{-1}\).

The geometric transformation represented by a diagonalizable matrix is an inhomogeneous dilation (or anisotropic scaling). That is, it can scale the space by a different amount in different directions. The direction of each eigenvector is scaled by a 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^{-1}\) 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-Chevalley decomposition 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 \times n\) matrix \(A\) with entries in a field \(F\) is called diagonalizable or nondefective if there exists an \(n \times n\) invertible matrix (i.e. an element of the general linear group \(\operatorname{GL}(n,\mathbb{F})\)), \(P\), such that \(P^{-1}AP\) is a diagonal matrix.

Characterization

The fundamental fact about diagonalizable maps and matrices is expressed by the following:

  • An \(n \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^n\) 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^{-1}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 \to V\) is diagonalizable if and only if the sum of the dimensions of its eigenspaces is equal to \(\dim(V)\), 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 \(T\).

The following sufficient (but not necessary) condition is often useful.

  • An \(n \times n\) matrix \(A\) is diagonalizable over the field \(F\) if it has \(n\) distinct eigenvalues in \(F\), i.e. if its characteristic polynomial has \(n\) distinct roots in \(F\); however, the converse may be false. Consider \[\begin{bmatrix} -1 & 3 & -1 \\ -3 & 5 & -1 \\ -3 & 3 & 1 \end{bmatrix},\] which has eigenvalues 1, 2, 2 (not all distinct) and is diagonalizable with diagonal form (similar to \(A\)) \[\begin{bmatrix} 1 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 2 \end{bmatrix}\] and change of basis matrix \(P\): \[\begin{bmatrix} 1 & 1 & -1 \\ 1 & 1 & 0 \\ 1 & 0 & 3 \end{bmatrix}.\] 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 \to V\) with \(n = \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 \(F\). 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 \(F\), then \(A\) is diagonalizable. Proof: If \(A^n\) is diagonalizable, then \(A\) is annihilated by some polynomial \(\left(x^n - \lambda_1\right) \cdots \left(x^n - \lambda_k\right)\), which has no multiple root (since \(\lambda_j \ne 0\)) and is divided by the minimal polynomial of \(A\).

Over the complex numbers \(\Complex\), almost every matrix is diagonalizable. More precisely: the set of complex \(n \times n\) matrices that are not diagonalizable over \(\Complex\), considered as a subset of \(\Complex^{n \times n}\), has Lebesgue measure 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 \(\R\).

Condensed: the full section is in Wikipedia.

Diagonalization

Consider the two following arbitrary bases \(E = \{{ \boldsymbol{e}_i | \forall i \in [n] } \}\) and \(F = \{ {\boldsymbol{\alpha}_i | \forall i \in [n] } \}\). Suppose that there exists a linear transformation represented by a matrix \(A_E\) which is written with respect to basis E. Suppose also that there exists the following eigen-equation:

\(A_E \boldsymbol{\alpha}_{E,i} = \lambda_i \boldsymbol{\alpha}_{E,i}\)

The alpha eigenvectors are written also with respect to the E basis. Since the set F is both a set of eigenvectors for matrix A and it spans some arbitrary vector space, then we say that there exists a matrix \(D_F\) which is a diagonal matrix that is similar to \(A_E\). In other words, \(A_E\) is a diagonalizable matrix if the matrix is written in the basis F. We perform the change of basis calculation using the transition matrix \(S\), which changes basis from E to F as follows:

\(D_F = S_{E}^F \ A_E \ S_{E}^{-1F}\),

where \(S_{E}^F\) is the transition matrix from E-basis to F-basis. The inverse can then be equated to a new transition matrix \(P\) which changes basis from F to E instead and so we have the following relationship :

\(S_{E}^{-1 F} = P_{F}^{E}\)

Both \(S\) and \(P\) transition matrices are invertible. Thus we can manipulate the matrices in the following fashion:\[\begin{aligned} D = S \ A_{E} \ S^{-1} \\ D = P^{-1} \ A_{E} \ P \end{aligned}\]The matrix \(A_{E}\) will be denoted as \(A\), which is still in the E-basis. Similarly, the diagonal matrix is in the F-basis.

\(P^{-1}AP = \begin{bmatrix} \lambda_1 & 0 & \cdots & 0 \\ 0 & \lambda_2 & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & \lambda_n \end{bmatrix} = D,\)

\(AP = P\begin{bmatrix} \lambda_1 & 0 & \cdots & 0 \\ 0 & \lambda_2 & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & \lambda_n \end{bmatrix}.\)

\(P = \begin{bmatrix} \boldsymbol{\alpha}_{E,1} & \boldsymbol{\alpha}_{E,2} & \cdots & \boldsymbol{\alpha}_{E,n} \end{bmatrix},\)

\(A\boldsymbol{\alpha}_i = \lambda_i \boldsymbol{\alpha}_i \qquad (i=1,2,\dots,n).\)

Condensed: the full section is in Wikipedia.

Simultaneous diagonalization

A set of matrices is said to be simultaneously diagonalizable if there exists a single invertible matrix \(P\) such that \(P^{-1}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 \times n\) diagonalizable matrices (over \(\Complex\)) with \(n > 1\) is not simultaneously diagonalizable. For instance, the matrices

\(\begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix} \quad\text{and}\quad \begin{bmatrix} 1 & 1 \\ 0 & 0 \end{bmatrix}\)

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 generates a toral Lie algebra.

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 \(\mathbb{C}\) (or any algebraically closed field where the characteristic of the field does not divide the order of the endomorphism) with roots of unity 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 \(A\), \(Q^{\mathrm T}AQ\) is diagonal for some orthogonal matrix \(Q\). 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 \(A=A^{\mathrm T}\), so clearly \(AA^{\mathrm T} = A^{\mathrm T}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.

Additional geometric visualizations of orthogonal diagonalization, including reflection and orthogonal projection matrices, are available at Wikimedia Commons.

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 = \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix}.\)

This matrix is not diagonalizable: there is no matrix \(U\) such that \(U^{-1}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 = \left[\begin{array}{rr} 0 & 1 \\ \!-1 & 0 \end{array}\right].\)

The matrix \(B\) does not have any real eigenvalues, so there is no real matrix \(Q\) such that \(Q^{-1}BQ\) is a diagonal matrix. However, we can diagonalize \(B\) if we allow complex numbers. Indeed, if we take

\(Q = \begin{bmatrix} 1 & i \\ i & 1 \end{bmatrix},\)

then \(Q^{-1}BQ\) is diagonal. It is easy to find that \(B\) is the rotation matrix which rotates counterclockwise by angle \(\theta = -\frac{\pi}{2}\)

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=\left[\begin{array}{rrr} 0 & 1 & \!\!\!-2\\ 0 & 1 & 0\\ 1 & \!\!\!-1 & 3 \end{array}\right].\)

The roots of the characteristic polynomial \(p(\lambda)=\det(\lambda I-A)\) are the eigenvalues \(\lambda_1 = 1,\lambda_2 = 1,\lambda_3 = 2\). Solving the linear system \(\left(1I-A\right) \mathbf{v} = \mathbf{0}\) gives the eigenvectors \(\mathbf{v}_1 = (1,1,0)\) and \(\mathbf{v}_2 = (0,2,1)\), while \(\left(2I-A\right)\mathbf{v} = \mathbf{0}\) gives \(\mathbf{v}_3 = (1,0,-1)\); that is, \(A \mathbf{v}_i = \lambda_i \mathbf{v}_i\) for \(i = 1,2,3\). These vectors form a basis of \(V = \mathbb{R}^3\), so we can assemble them as the column vectors of a change-of-basis matrix \(P\) to get: \[P^{-1}AP = \left[\begin{array}{rrr} 1 & 0 & 1\\ 1 & 2 & 0\\ 0 & 1 & \!\!\!\!-1 \end{array}\right]^{-1} \left[\begin{array}{rrr} 0 & 1 & \!\!\!-2\\ 0 & 1 & 0\\ 1 & \!\!\!-1 & 3 \end{array}\right] \left[\begin{array}{rrr} 1 & \,0 & 1\\ 1 & 2 & 0\\ 0 & 1 & \!\!\!\!-1 \end{array}\right] = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 2 \end{bmatrix} = D .\] We may see this equation in terms of transformations: \(P\) takes the standard basis to the eigenbasis, \(P \mathbf{e}_i = \mathbf{v}_i\), so we have: \[P^{-1} AP \mathbf{e}_i = P^{-1} A \mathbf{v}_i = P^{-1} (\lambda_i\mathbf{v}_i) = \lambda_i\mathbf{e}_i,\] so that \(P^{-1} AP\) has the standard basis as its eigenvectors, which is the defining property of \(D\).

Note that there is no preferred order of the eigenvectors in \(P\); changing the order of the eigenvectors in \(P\) just changes the order of the eigenvalues in the diagonalized form of \(A\).

Application to matrix functions

Diagonalization can be used to efficiently compute the powers of a matrix \(A = PDP^{-1}\):

\(\begin{aligned} A^k &= \left(PDP^{-1}\right)^k = \left(PDP^{-1}\right) \left(PDP^{-1}\right) \cdots \left(PDP^{-1}\right) \\ &= PD\left(P^{-1}P\right) D \left(P^{-1}P\right) \cdots \left(P^{-1}P\right) D P^{-1} = PD^kP^{-1}, \end{aligned}\)

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 \(\lambda = 1,1,2\) in the example above we compute:

\(\begin{aligned} A^k = PD^kP^{-1} &= \left[\begin{array}{rrr} 1 & \,0 & 1 \\ 1 & 2 & 0 \\ 0 & 1 & \!\!\!\!-1 \end{array}\right] \begin{bmatrix} 1^k & 0 & 0 \\ 0 & 1^k & 0 \\ 0 & 0 & 2^k \end{bmatrix} \left[\begin{array}{rrr} 1 & \,0 & 1 \\ 1 & 2 & 0 \\ 0 & 1 & \!\!\!\!-1 \end{array}\right]^{-1} \\[1em] &= \begin{bmatrix} 2 - 2^k & -1 + 2^k & 2 - 2^{k + 1} \\ 0 & 1 & 0 \\ -1 + 2^k & 1 - 2^k & -1 + 2^{k + 1} \end{bmatrix}. \end{aligned}\)

This approach can be generalized to matrix exponential and other matrix functions that can be defined as power series. For example, defining \(\exp(A) = I + A + \frac{1}{2!}A^2 + \frac{1}{3!}A^3 + \cdots\), we have:

\(\begin{aligned} \exp(A) = P \exp(D) P^{-1} &= \left[\begin{array}{rrr} 1 & \,0 & 1 \\ 1 & 2 & 0 \\ 0 & 1 & \!\!\!\!-1 \end{array}\right] \begin{bmatrix} e^1 & 0 & 0 \\ 0 & e^1 & 0 \\ 0 & 0 & e^2 \end{bmatrix} \left[\begin{array}{rrr} 1 & \,0 & 1\\ 1 & 2 & 0\\ 0 & 1 & \!\!\!\!-1 \end{array}\right]^{-1} \\[1em] &= \begin{bmatrix} 2 e - e^2 & -e + e^2 & 2 e - 2 e^2 \\ 0 & e & 0 \\ -e + e^2 & e - e^2 & -e + 2 e^2 \end{bmatrix}. \end{aligned}\)

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 = \begin{bmatrix}a & b - a\\ 0 & b\end{bmatrix}.\)

Calculating the various powers of \(M\) reveals a surprising pattern:

\(M^2 = \begin{bmatrix}a^2 & b^2-a^2 \\ 0 &b^2 \end{bmatrix},\quad M^3 = \begin{bmatrix}a^3 & b^3-a^3 \\ 0 &b^3 \end{bmatrix},\quad M^4 = \begin{bmatrix}a^4 & b^4-a^4 \\ 0 &b^4 \end{bmatrix},\quad \ldots\)

The above phenomenon can be explained by diagonalizing \(M\). To accomplish this, we need a basis of \(\R^2\) consisting of eigenvectors of \(M\). One such eigenvector basis is given by

\(\mathbf{u} = \begin{bmatrix} 1 \\ 0 \end{bmatrix} = \mathbf{e}_1,\quad \mathbf{v} = \begin{bmatrix} 1 \\ 1 \end{bmatrix} = \mathbf{e}_1 + \mathbf{e}_2,\)

where ei denotes the standard basis of R. The reverse change of basis is given by

\(\mathbf{e}_1 = \mathbf{u},\qquad \mathbf{e}_2 = \mathbf{v} - \mathbf{u}.\)

Straightforward calculations show that

\(M\mathbf{u} = a\mathbf{u},\qquad M\mathbf{v} = b\mathbf{v}.\)

Thus, a and b are the eigenvalues corresponding to u and v, respectively. By linearity of matrix multiplication, we have that

\(M^n \mathbf{u} = a^n \mathbf{u},\qquad M^n \mathbf{v} = b^n \mathbf{v}.\)

Switching back to the standard basis, we have

\(\begin{aligned} M^n \mathbf{e}_1 &= M^n \mathbf{u} = a^n \mathbf{e}_1, \\ M^n \mathbf{e}_2 &= M^n \left(\mathbf{v} - \mathbf{u}\right) = b^n \mathbf{v} - a^n\mathbf{u} = \left(b^n - a^n\right) \mathbf{e}_1 + b^n\mathbf{e}_2. \end{aligned}\)

\(M^n = \begin{bmatrix} a^n & b^n - a^n \\ 0 & b^n \end{bmatrix},\)

Condensed: the full section is in Wikipedia.

Quantum 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 Hilbert space.

A very common approximation is to truncate (or project) the 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.

Operator theory

Matrices can be generalized to linear operators. A diagonal matrix can be generalized to diagonal operators on Hilbert spaces.

Let \(H\) be a Hilbert space. An operator \(D: H \to H\) is a diagonal operator iff there exists an orthonormal basis \((e_n)_n\) of \(H\), such that \(De_n = \lambda_n e_n\) for some \(\lambda_n \in \C\).

For any \(p \geq 1\), define the p-Schatten norm as follows. Let \(T: H \to H\) be an operator, then \(\|T\|_p := \operatorname{Tr}(|T|^p)^{1/p}\), where \(\operatorname{Tr}\) is the trace. The p-Schatten class is the set of all operators with finite p-Schatten norm.

Weyl, von Neumann, and Kuroda, showed the following:

In other words, any self-adjoint operator is an infinitesimal perturbation from a diagonal operator, where "infinitesimal" is in the sense of p-Schatten norm. In particular, since the Hilbert-Schmidt operator class is the 2-Schatten class, this means that any self-adjoint operator is diagonalizable after a perturbation by an infinitesimal Hilbert-Schmidt operator. In fact, the above result could be further generalized:

The result is false for \(p= 1\) (the trace class). This is a simple corollary of the Kato-Rosenblum theorem, which states that if \(T\) is self-adjoint, and \(A\) is trace class, then \(T, T+A\) have the same absolutely continuous part of the spectrum. The result is sharp, however, in the sense that if \(T\) has no absolutely continuous part, then it can be diagonalized after perturbation by an infinitesimal trace class operator.

For simultaneous diagonalization, it's known that, given a finite list of \(T_1, \dots, T_n\) self-adjoint operators that commute with each other, for any \(\epsilon > 0\), there exists a sequence of diagonal operators \(D_1, \dots, D_n\), such that \(\|T_1-D_1\|_n \leq \epsilon, \dots, \|T_n-D_n\|_n \leq \epsilon\), where \(\|\cdot\|_n\) is the n-Schatten norm. Note that \(n \ge 2\)

Now you Ոչ մի հաշվիչ չի կարող լուծել այս խնդիրը, բայց դրա մասերը հաշվարկելի են։ Փորձեք ստորեւ նշվածներից մեկը կամ գրեք ձեր սեփականը։

Ձեր սեփական աշխատանքը շարունակեք

Ազատ հաշիվը յուրաքանչյուր դասավանդման համար գրառումներ է ավելացնում, Ձեր ավարտելիք դասերի և լուծված խնդիրների ցուցակ է պահում մեկ տեղում, և ուսուցիչ, ում կարող եք հարցնել այս էջի մասին։ Մաթեմատիկան բաց է բոլորի համար, անկախ նրանից մուտքագրվել եք արդյոք կամ ոչ։

Գրանցվել Գրանցում

Օգտագործված սիմվոլներ

Տեղադրեք ցանկացած նշան՝ ամբողջական սահմանման, նկարի և դրա մեջ ամեն մի տառի իմաստը տեսնելու համար։

Հարցեր, որոնք մարդիկ տալիս են :

What does a determinant mean geometrically?

It is the factor by which the matrix scales area (2×2) or volume (3×3), with a negative sign if orientation flips. Zero means the matrix flattens space and cannot be undone.

What is an eigenvector?

A direction the matrix does not turn: it only stretches it by the eigenvalue. Along eigenvectors a complicated matrix acts like multiplication by a number.

Why is matrix multiplication not commutative?

Because a matrix is a transformation and AB means "do B, then A". Rotating then reflecting is not the same as reflecting then rotating.

Այս էջը կառուցված է հետևյալ սկզբունքով. Wikipedia (CC BY-SA 4.0). Ընդհանուր և հատուկ դասակարգումներ: Ընդհանուր դասակարգում.

Ցուցադրել Linear Algebra