# Diagonal Matrix: Definition, Example, and Properties

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

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?
- Diagonal Matrix Example
- Properties of Diagonal Matrix
- Special Cases of Diagonal Matrix

**What is a Diagonal Matrix?**

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

**a _{ij} = 0, if i ≠ j**

**a _{ij} = 0 or a_{ij} ≠ 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.

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.

**Example of Diagonal Matrix**

**Example-1: 5x5 Diagonal Matrix**

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

**Properties of Diagonal Matrix**

**Addition and Multiplication are Element-wise**

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

**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.

**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.

**Eigenvalues are the Diagonal Elements**

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

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**

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**

**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!!

**About the Author**

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