Diagonal matrix (original) (raw)

In linear algebra, a diagonal matrix is a square matrix in which only the entries in the main diagonal are non-zero. The diagonal entries themselves may or may not be zero. Thus, the matrix D = (di,j) is diagonal if:

For example, the following matrix is diagonal:

Any diagonal matrix is also a symmetric matrix, a triangular matrix, and (if the entries come from the field R or C) also a normal matrix. The identity matrix I n is diagonal.

Matrix operations

The operations of matrix addition and matrix multiplication are especially simple for diagonal matrices. Write diag(_a_1,...,a n) for a diagonal matrix whose diagonal entries starting in the upper left corner are _a_1,...,a n. Then, for addition, we have

diag(_a_1,...,a n) + diag(_b_1,...,b n) = diag(_a_1+_b_1,...,a n+b n)

and for matrix multiplication,

diag(_a_1,...,a n) ยท diag(_b_1,...,b n) = diag(_a_1_b_1,...,a n b n).

The diagonal matrix diag(_a_1,...,a n) is invertible if and only if the entries _a_1,...,a n are all non-zero. In this case, we have

diag(_a_1,...,a n)-1 = diag(_a_1-1,...,a _n_-1).

In particular, the diagonal matrices form a subring of the ring of all _n_-by-n matrices.

Multiplying the matrix A from the left with diag(_a_1,...,a n) amounts to multiplying the _i_-th row of A by a i for all i; multiplying the matrix A from the right with diag(_a_1,...,a n) amounts to multiplying the _i_-th column of A by a i for all i.

Eigenvectors, eigenvalues, determinant

The eigenvalues of diag(_a_1,...,a n) are _a_1,...,a n. The unit vectors e1,...,en form a basis of eigenvectors. The determinant of diag(_a_1,...,a n) is the product _a_1...a n.

Uses

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 always desirable to represent a given matrix or linear map by a diagonal matrix.

In fact, a given _n_-by-n matrix is similar to a diagonal matrix if and only if it has n linearly independent eigenvectors. These matrices are called diagonalizable.

Over the field of real or complex numbers, more is true: every normal matrix is unitarily similar to a diagonal matrix (the spectral theorem), and every matrix is unitarily equivalent to a diagonal matrix with nonnegative entries (the singular value decomposition).