Diagonal matrix

From Wikipedia, the free encyclopedia
(Redirected from Diagonal matrices)
Jump to navigation Jump to search

Template:Use American English Template:Short description Script error: No such module "Unsubst".

In linear algebra, a diagonal matrix is a matrix in which the entries outside the main diagonal are all zero; the term usually refers to square matrices. Elements of the main diagonal can either be zero or nonzero. An example of a 2×2 diagonal matrix is [3002], while an example of a 3×3 diagonal matrix is[600050004]. An identity matrix of any size, or any multiple of it is a diagonal matrix called a scalar matrix, for example, [0.5000.5]. In geometry, a diagonal matrix may be used as a scaling matrix, since matrix multiplication with it results in changing scale (size) and possibly also shape; only a scalar matrix results in uniform change in scale.

Definition

As stated above, a diagonal matrix is a matrix in which all off-diagonal entries are zero. That is, the matrix D = (di,j)Script error: No such module "Check for unknown parameters". with Template:Mvar columns and Template:Mvar rows is diagonal if i,j{1,2,,n},ijdi,j=0.

However, the main diagonal entries are unrestricted.

The term diagonal matrix may sometimes refer to a Template:Visible anchor, which is an Template:Mvar-by-Template:Mvar matrix with all the entries not of the form di,iScript error: No such module "Check for unknown parameters". being zero. For example: [100040003000]or[100000400000300]

More often, however, diagonal matrix refers to square matrices, which can be specified explicitly as a Template:Visible anchor. A square diagonal matrix is a symmetric matrix, so this can also be called a Template:Visible anchor.

The following matrix is square diagonal matrix: [100040002]

If the entries are real numbers or complex numbers, then it is a normal matrix as well.

In the remainder of this article we will consider only square diagonal matrices, and refer to them simply as "diagonal matrices".

Vector-to-matrix diag operator

A diagonal matrix DScript error: No such module "Check for unknown parameters". can be constructed from a vector 𝐚=[a1an]T using the diag operator: 𝐃=diag(a1,,an).

This may be written more compactly as 𝐃=diag(𝐚).

The same operator is also used to represent block diagonal matrices as 𝐀=diag(𝐀1,,𝐀n) where each argument AiScript error: No such module "Check for unknown parameters". is a matrix.

The diagScript error: No such module "Check for unknown parameters". operator may be written as diag(𝐚)=(𝐚𝟏T)𝐈, where represents the Hadamard product, and 1Script error: No such module "Check for unknown parameters". is a constant vector with elements 1.

Matrix-to-vector diag operator

The inverse matrix-to-vector diagScript error: No such module "Check for unknown parameters". operator is sometimes denoted by the identically named diag(𝐃)=[a1an]T, where the argument is now a matrix, and the result is a vector of its diagonal entries.

The following property holds: diag(𝐀𝐁)=j(𝐀𝐁T)ij=(𝐀𝐁T)𝟏.

Scalar matrix

A diagonal matrix with equal diagonal entries is a scalar matrix; that is, a scalar multiple Template:Mvar of the identity matrix IScript error: No such module "Check for unknown parameters".. Its effect on a vector is scalar multiplication by Template:Mvar. For example, a 3×3 scalar matrix has the form: [λ000λ000λ]λI3

The scalar matrices are the center of the algebra of matrices: that is, they are precisely the matrices that commute with all other square matrices of the same size.Template:Efn By contrast, over a field (like the real numbers), a diagonal matrix with all diagonal elements distinct only commutes with diagonal matrices (its centralizer is the set of diagonal matrices). That is because if a diagonal matrix 𝐃=diag(a1,,an) has aiaj, then given a matrix MScript error: No such module "Check for unknown parameters". with mij0, the (i, j)Script error: No such module "Check for unknown parameters". term of the products are: (𝐃𝐌)ij=aimij and (𝐌𝐃)ij=mijaj, and ajmijmijai (since one can divide by Template:Mvar), so they do not commute unless the off-diagonal terms are zero.Template:Efn Diagonal matrices where the diagonal entries are not all equal or all distinct have centralizers intermediate between the whole space and only diagonal matrices.[1]

For an abstract vector space Template:Mvar (rather than the concrete vector space Template:Mvar), the analog of scalar matrices are scalar transformations. This is true more generally for a module Template:Mvar over a ring Template:Mvar, with the endomorphism algebra End(M)Script error: No such module "Check for unknown parameters". (algebra of linear operators on Template:Mvar) replacing the algebra of matrices. Formally, scalar multiplication is a linear map, inducing a map REnd(M), (from a scalar Template:Mvar to its corresponding scalar transformation, multiplication by Template:Mvar) exhibiting End(M)Script error: No such module "Check for unknown parameters". as a Template:Mvar-algebra. For vector spaces, the scalar transforms are exactly the center of the endomorphism algebra, and, similarly, scalar invertible transforms are the center of the general linear group GL(V)Script error: No such module "Check for unknown parameters".. The former is more generally true free modules MRn, for which the endomorphism algebra is isomorphic to a matrix algebra.

Vector operations

Multiplying a vector by a diagonal matrix multiplies each of the terms by the corresponding diagonal entry. Given a diagonal matrix 𝐃=diag(a1,,an) and a vector 𝐯=[x1xn]T, the product is: 𝐃𝐯=diag(a1,,an)[x1xn]=[a1an][x1xn]=[a1x1anxn].

This can be expressed more compactly by using a vector instead of a diagonal matrix, 𝐝=[a1an]T, and taking the Hadamard product of the vectors (entrywise product), denoted 𝐝𝐯:

𝐃𝐯=𝐝𝐯=[a1an][x1xn]=[a1x1anxn].

This is mathematically equivalent, but avoids storing all the zero terms of this sparse matrix. This product is thus used in machine learning, such as computing products of derivatives in backpropagation or multiplying IDF weights in TF-IDF,[2] since some BLAS frameworks, which multiply matrices efficiently, do not include Hadamard product capability directly.[3]

Matrix operations

The operations of matrix addition and matrix multiplication are especially simple for diagonal matrices. Write diag(a1, ..., an)Script error: No such module "Check for unknown parameters". for a diagonal matrix whose diagonal entries starting in the upper left corner are a1, ..., anScript error: No such module "Check for unknown parameters".. Then, for addition, we have

diag(a1,,an)+diag(b1,,bn)=diag(a1+b1,,an+bn)

and for matrix multiplication,

diag(a1,,an)diag(b1,,bn)=diag(a1b1,,anbn).

The diagonal matrix diag(a1, ..., an)Script error: No such module "Check for unknown parameters". is invertible if and only if the entries a1, ..., anScript error: No such module "Check for unknown parameters". are all nonzero. In this case, we have

diag(a1,,an)1=diag(a11,,an1).

In particular, the diagonal matrices form a subring of the ring of all Template:Mvar-by-Template:Mvar matrices.

Multiplying an Template:Mvar-by-Template:Mvar matrix AScript error: No such module "Check for unknown parameters". from the left with diag(a1, ..., an)Script error: No such module "Check for unknown parameters". amounts to multiplying the Template:Mvar-th row of AScript error: No such module "Check for unknown parameters". by Template:Mvar for all Template:Mvar; multiplying the matrix AScript error: No such module "Check for unknown parameters". from the right with diag(a1, ..., an)Script error: No such module "Check for unknown parameters". amounts to multiplying the Template:Mvar-th column of AScript error: No such module "Check for unknown parameters". by Template:Mvar for all Template:Mvar.

Operator matrix in eigenbasis

Script error: No such module "Labelled list hatnote".

As explained in determining coefficients of operator matrix, there is a special basis, e1, ..., enScript error: No such module "Check for unknown parameters"., for which the matrix AScript error: No such module "Check for unknown parameters". takes the diagonal form. Hence, in the defining equation 𝐀𝐞j=iai,j𝐞i, all coefficients Template:Mvar with ijScript error: No such module "Check for unknown parameters". are zero, leaving only one term per sum. The surviving diagonal elements, Template:Mvar, are known as eigenvalues and designated with Template:Mvar in the equation, which reduces to 𝐀𝐞i=λi𝐞i. The resulting equation is known as eigenvalue equation[4] and used to derive the characteristic polynomial and, further, eigenvalues and eigenvectors.

In other words, the eigenvalues of diag(λ1, ..., λn)Script error: No such module "Check for unknown parameters". are λ1, ..., λnScript error: No such module "Check for unknown parameters". with associated eigenvectors of e1, ..., enScript error: No such module "Check for unknown parameters"..

Properties

  • The determinant of diag(a1, ..., an)Script error: No such module "Check for unknown parameters". is the product a1anScript error: No such module "Check for unknown parameters"..
  • The adjugate of a diagonal matrix is again diagonal.
  • Where all matrices are square,
  • The identity matrix InScript error: No such module "Check for unknown parameters". and zero matrix are diagonal.
  • A 1×1 matrix is always diagonal.
  • The square of a 2×2 matrix with zero trace is always diagonal.

Applications

Diagonal matrices occur in many areas of linear algebra. Because of the simple description of the matrix operation and eigenvalues/eigenvectors given above, it is typically desirable to represent a given matrix or linear map by a diagonal matrix.

In fact, a given Template:Mvar-by-Template:Mvar matrix AScript error: No such module "Check for unknown parameters". is similar to a diagonal matrix (meaning that there is a matrix XScript error: No such module "Check for unknown parameters". such that X−1AXScript error: No such module "Check for unknown parameters". is diagonal) if and only if it has Template:Mvar linearly independent eigenvectors. Such matrices are said to be diagonalizable.

Over the field of real or complex numbers, more is true. The spectral theorem says that every normal matrix is unitarily similar to a diagonal matrix (if AA = AAScript error: No such module "Check for unknown parameters". then there exists a unitary matrix UScript error: No such module "Check for unknown parameters". such that UAUScript error: No such module "Check for unknown parameters". is diagonal). Furthermore, the singular value decomposition implies that for any matrix AScript error: No such module "Check for unknown parameters"., there exist unitary matrices UScript error: No such module "Check for unknown parameters". and VScript error: No such module "Check for unknown parameters". such that UAVScript error: No such module "Check for unknown parameters". is diagonal with positive entries.

Operator theory

In operator theory, particularly the study of PDEs, operators are particularly easy to understand and PDEs easy to solve if the operator is diagonal with respect to the basis with which one is working; this corresponds to a separable partial differential equation. Therefore, a key technique to understanding operators is a change of coordinates—in the language of operators, an integral transform—which changes the basis to an eigenbasis of eigenfunctions: which makes the equation separable. An important example of this is the Fourier transform, which diagonalizes constant coefficient differentiation operators (or more generally translation invariant operators), such as the Laplacian operator, say, in the heat equation.

Especially easy are multiplication operators, which are defined as multiplication by (the values of) a fixed function–the values of the function at each point correspond to the diagonal entries of a matrix.

See also

Template:Colbegin

Template:Colend

Notes

Template:Notelist

References

<templatestyles src="Reflist/styles.css" />

  1. Script error: No such module "citation/CS1".
  2. Script error: No such module "citation/CS1".
  3. Script error: No such module "citation/CS1".
  4. Script error: No such module "citation/CS1".

Script error: No such module "Check for unknown parameters".

Sources

  • Script error: No such module "citation/CS1".

Template:Matrix classes