- Home
- >
- Diagonal matrix – Explanation & Examples
JUMP TO TOPIC [show]
Diagonal Matrix – Explanation & Examples
A diagonal matrix is a square matrix whose elements, other than the diagonal, are zero. There are certain conditions that must be met for a matrix to be called a diagonal matrix. Firstly, let’s check the formal definition of a diagonal matrix.
A square matrix in which all the elements except the principal diagonal are zero is known as a diagonal matrix.
In this article, we are going to take a close look at what makes a matrix diagonal, how to find diagonal matrices, properties of diagonal matrices, and the determinant of a diagonal matrix. Let’s start!
What is a Diagonal Matrix?
A matrix to be classified as a diagonal matrix, it has to meet the following conditions:
- square matrix
- all elements (entries) of the matrix, other than the principal diagonal, has to be
A square matrix is said to be:
- lower triangular if its elements above the principal diagonal are all
- upper triangular if its elements below the principal diagonal are all
Lower Triangular Matrix
Upper Triangular Matrix
A diagonal matrix is a special square matrix that is BOTH upper and lower triangular since all elements, whether above or below the principal diagonal, are
How to find Diagonal Matrix
To find, or identify, a diagonal matrix, we need to see if it is a square matrix and all the elements besides the principal diagonal (diagonal that runs from top left to bottom right) are
Note the following observations about each of the
- Matrix
is a square matrix because its has the same number of rows and columns ( matrix). The principal diagonal has entries and , respectively. All other entries are . Thus, this is a diagonal matrix. - Matrix
is a square matrix because its has the same number of rows and columns ( matrix). The principal diagonal has entries , , and , respectively. All other entries are . Thus, this is a diagonal matrix. - A false glance at Matrix
will make us think that it is a diagonal matrix. But, first and foremost, it is not a square matrix. Hence, it cannot be a diagonal matrix. - This one’s a bit tricky. First of all, it is in fact a square matrix (
). You will think that it is not a diagonal matrix.But why? Is it because there’s a in the middle?If you take a closer look at the definition of a diagonal matrix, you will see that nowhere does it say that the entries in the diagonal cannot be
! The condition is that the elements other than the diagonal has to be . So, even if there are elements that are in the diagonal, it won’t matter. As long as the elements besides the diagonal are , it will be a diagonal matrix.Thus, Matrix
is in fact a diagonal matrix!
This brings us to
- Identity Matrix
- Zero Matrix
Identity Matrix
This is a square matrix in which all the entries in the principal diagonal are
You can read more about identity matrices here.
Zero Matrix
A matrix in which all the elements are
Now, let’s look at some properties of diagonal matrices.
Properties of Diagonal Matrices
There are several properties of diagonal matrices but for the purpose of this article, we will look at
Property 1:
When
Consider the matrices shown below:
Now, we add both the
Thus, we see that the resultant matrix,
Let’s check matrix multiplication with the same matrices. We multiply Matrix
Thus, we see that the resultant matrix,
To learn more about how we did matrix multiplication, please have a look at the article here.
Property 2:
The transpose of a diagonal matrix is the matrix itself.
If we have a matrix
Interchanging the rows and columns produces the same matrix because of the entries besides the diagonal being
Property 3:
Under multiplication, diagonal matrices are commutative.
If we have
Now,
Thus, we have seen that
Determinant of Diagonal Matrix
First, let’s look at the determinant of a
Consider Matrix
The determinant of this matrix is:
One property of a diagonal matrix is that the determinant of a diagonal matrix is equal to the product of the elements in its principal diagonal.
Let’s see if it’s true by finding the determinant of the diagonal matrix shown below.
This is in fact the product of the elements in its diagonal,
Example 1
For the matrices shown below, identify whether they are diagonal matrix or not.
Solution
- Matrix A is a
matrix with the elements being 0 other than the diagonal. So, this is a diagonal matrix. - Matrix B is a
matrix. It’s not square, so immediately we can say that it is not a diagonal matrix. - Matrix C is a square matrix (
). Also all the elements besides the diagonal are . So, it is a diagonal matrix. Moreover, an entry of the diagonal is also , it doesn’t matter as long as all the entries except the diagonal are zeros. - Matrix D is a special type of diagonal matrix. It is a zero matrix. Therefore, it is a diagonal matrix.
Example 2
Will multiplying Matrix A and Matrix B result in a diagonal matrix?
Solution
Matrix A is a diagonal matrix but Matrix B is not. So, multiplying Matrix A and B will not result in a diagonal matrix.
Example 3
Find the determinant of the matrix shown below:
Solution
Matrix B is a
Practice Questions
- Identify which of the following matrices are diagonal matrices.
- Calculate the determinant of the matrix shown below:
- Given
Is
?
Answers
- Matrix J is a square matrix. All the elements other than the principal diagonal are zeros. This is a diagonal matrix.
Matrix K is a square matrix but not all the elements, except the diagonal, are zero. Thus, this is not a diagonal matrix.
Matrix L is a square matrix (3\times3). The elements other than the diagonal entries are zero. So, this is a diagonal matrix. - This is a diagonal matrix. We can find the determinant of this matrix by taking the product of all the 3 entries of the diagonal. Thus, the determinant is:
- If two matrices are diagonal, the multiplication of those two matrices are commutative. Looking at Matrix A and B, we can see that Matrix A is diagonal but Matrix B is not. Hence, their multiplication will not be commutative.
Thus,
.