Diagonal Matrix: Definition, Example, and Properties

Diagonal Matrix: Definition, Example, and Properties

3 mins readComment
Vikram
Vikram Singh
Assistant Manager - Content
Updated on Aug 2, 2024 14:07 IST

In this article, we will explore diagonal matrices, their examples and their properties with the help of examples.

diagonal matrix

A diagonal matrix is a special type of square matrix in which all non-diagonal entries are equal to zero, but all diagonal entries can either be zero or non-zero. This article will explore diagonal matrices, examples, and their properties in more detail.

Later in the article, we will also explore how to calculate the determinant and inverse of diagonal matrices. So, without further delay, let's explore the formal definition of the Diagonal Matrix.

Table of Content

What is a Diagonal Matrix?

A square matrix A = [aij]nxn is called a diagonal matrix if it satisfies:

aij = 0, if i ≠ j

aij = 0 or aij ≠ 0 if i = j

In simple terms, a square matrix whose elements on the principal diagonal can either be zero or non-zero, but the elements outside the principal diagonal must be zero.

Here is an example of what a diagonal matrix looks like.

example of diagonal matrix

Here, in the above example,

  • a,b, and c are the elements on the principal diagonal.
    • The value of a, b, and c can be any real number.
  • All other elements (those not on the line from the top left to the bottom right) are zero.

Now, let's have some examples of a diagonal matrix.

Recommended online courses

Best-suited Maths for Data Science courses for you

Learn Maths for Data Science with these high-rated online courses

Free
12 weeks
– / –
12 weeks
– / –
12 weeks
1 K
4 weeks
– / –
12 weeks
– / –
12 weeks
Free
12 weeks
Free
8 weeks
– / –
12 weeks

Example of Diagonal Matrix

Example-1: 5x5 Diagonal Matrix

5x5 diagonal matrix
Example 2: Identity Matrix - A special case of a diagonal matrix where all the principal diagonal elements are equal to 1, and the remaining elements are equal to 0.
identity matrix - a special case of the diagonal matrix

Example-3: Zero Matrix/Null Matrix- A special case of a diagonal matrix, where all the elements are equal to zero.

null matrix-a special case of a diagonal matrix
 

Properties of Diagonal Matrix

Addition and Multiplication are Element-wise

While adding and multiplying the diagonal matrix, the operation is performed element-wise.

addition and multiplication of diagonal element

Commutative in Multiplication

Diagonal matrices commute under multiplication, i.e., if A and B are two diagonal elements, then A*B = B*A.

 

Determinant is the Product of Diagonal Elements

The determinant of the diagonal matrix is the product of the diagonal elements.

diagonal matrix are commutative under mutiplication

Inverse is the Reciprocal of Diagonal Elements (if Non-Zero)

If a diagonal matrix is non-singular (determinant is not zero), its inverse is another diagonal matrix where each diagonal element is the reciprocal of the corresponding elements in the original matrix.

determinant of diagonal matrix

Eigenvalues are the Diagonal Elements

If A is any diagonal matrix, then the eigenvalues are simply the diagonal elements.

eigen value of a diagonal matrix

Special Cases of Diagonal Matrix

Anti-Diagonal Matrix

An Anti-diagonal matrix is a square matrix where all the entries are zero except those on the diagonal going from the lower left corner to the upper right corner. This diagonal is also known as the anti-diagonal or counter-diagonal.
Example of Anti-Diagonal Matrix

anti diagonal matrix

The above matrix is referred to as an anti-diagonal matrix as it is opposite to the standard diagonal matrix, where the non-zero elements are on the principal diagonal (from top left to bottom right).

Block Diagonal Matrix

A special type of square matrix that is composed of at least two smaller square matrices along the diagonal and zero elements everywhere else. These smaller square matrices are known as "blocks", and these blocks can be of different or the same sizes. 
One of the important features of these block diagonal matrices is that operations like addition, multiplication, and determinant can be performed independently on these blocks.
Example of Block Diagonal Matrix

Example of Block Diagonal Matrix

Conclusion

In this article, we briefly discussed what diagonal matrices are, their examples, and their properties with the help of examples. The article also discusses some of the special diagonal matrices, like anti-diagonal matrix and block diagonal matrix.

Hope you will like the article.

Keep Learning!!

Keep Sharing!!

All About Skew Symmetric Matrix

All about Symmetric Matrix

Matrix Multiplication in C

Types of Matrix

Adjacency Matrix For Graphs

Lower Triangular Matrix: Definition, Example, and Properties

Transpose of a Matrix

Confusion Matrix in Machine Learning

Diagonal Matrix: Definition, Example, and Properties

Identity Matrix: Definition, Examples, and Properties

Why, How, and When to Adopt a Matrix Organizational Structure

Matrix Multiplication: A Beginner’s Guide to Understand and Implement

Upper Triangular Matrix: Definition, Example, and Properties

How to Calculate the Determinant of a Matrix?
About the Author
author-image
Vikram Singh
Assistant Manager - Content

Vikram has a Postgraduate degree in Applied Mathematics, with a keen interest in Data Science and Machine Learning. He has experience of 2+ years in content creation in Mathematics, Statistics, Data Science, and Mac... Read Full Bio