On this post you will see what a diagonal matrix is and examples of diagonal matrices. Also, you will find how to operate with a diagonal matrix, and how to calculate its determinant and its inverse. In addition, we explain the properties and applications of this type of matrix. And, finally, you will find the explanations of a bidiagonal matrix and a tridiagonal matrix.
Table of Contents
What is a diagonal matrix?
The definition of diagonal matrix is as follows:
A diagonal matrix is a square matrix in which all the elements outside the main diagonal are zero (0). The entries on the main diagonal may or may not be null.
Examples of diagonal matrices
Once we know the meaning of diagonal matrix, we are going to see several examples of diagonal matrices tu fully understand the concept:
Example of 2×2 dimension diagonal matrix
Example of 3×3 dimension diagonal matrix
Example of 4×4 dimension diagonal matrix
This type of matrix is usually written indicating the numbers on the diagonal:
Properties of diagonal matrices
- Any diagonal matrix is also a symmetric matrix (see symmetric matrix definition).
- A diagonal matrix is an upper and lower triangular matrix at the same time.
- The identity matrix is a diagonal matrix:
- Similarly, the null matrix is also a diagonal matrix because all its elements that are not on the diagonal are zeros, although the numbers on the diagonal are 0.
- The eigenvalues of a diagonal matrix are the elements of its main diagonal.
- A square matrix is diagonal if and only if it is triangular and normal.
- The adjoint (or adjugate) of a diagonal matrix is another diagonal matrix.
See: formula for adjoint of a matrix
Operations with diagonal matrices
One of the reasons that diagonal matrices are so important to linear algebra is the ease with which they allow you to perform calculations. That is why they are so used in mathematics.
Addition and subtraction of diagonal matrices
The addition (and subtraction) of two diagonal matrices is very simple: you just have to add (or subtract) the numbers of the diagonals.
For example:
Multiplication of diagonal matrices
To solve a multiplication or a matrix product of two diagonal matrices we just have to multiply the elements of the diagonals with each other.
For example:
Power of a diagonal matrix
To calculate the power of a diagonal matrix we must raise each element of the diagonal to the exponent:
For example:
Determinant of a diagonal matrix
The determinant of a diagonal matrix is the product of the elements on the main diagonal.
Look at the following solved exercise in which we find the determinant of a diagonal matrix by multiplying the elements on its main diagonal:
This theorem is easy to prove: we only have to calculate the determinant of a diagonal matrix by cofactors. This demonstration is detailed below using a generic diagonal matrix:
Inverse of a diagonal matrix
A diagonal matrix is invertible if, and only if, all elements on the main diagonal are different from 0.
Also, the inverse of a diagonal matrix will always be another diagonal matrix with the reciprocals of the numbers on the main diagonal:
From the previous characteristic, it can be deduced that the determinant of the inverse of a diagonal matrix is equal to the product of the reciprocals of the entries on the main diagonal:
Applications of the diagonal matrix
As we have seen, solving calculations with diagonal matrices is very simple, since many zeros are involved in the operations. For that reason they are very useful in the field of mathematics.
For this same reason, so many studies have been made of how to diagonalize a matrix and, in fact, a method has even been reached for the diagonalization of matrices. See how to do the diagonalization of a matrix.
Thus, diagonalizable matrices are also quite relevant. Like the spectral decomposition theorem, which states the conditions for a matrix to be diagonalized.
Bidiagonal matrix
A bidiagonal matrix is a square matrix in which all elements that are not on the main diagonal or on the upper or lower diagonal are 0.
Upper bidiagonal matrix
Lower bidiagonal matrix
Tridiagonal matrix
A tridiagonal matrix is a square matrix whose only nonzero elements are those of the main diagonal and the adjacent diagonals above and below.
Therefore, all diagonal, bidiagonal, and tridiagonal matrices are examples of band matrices. Since a band matrix has all its non-zero elements around the main diagonal.