Diagonal Matrix: Definition, Example, and Properties

# Diagonal Matrix: Definition, Example, and Properties

Vikram Singh
Assistant Manager - Content
Updated on Apr 12, 2024 10:58 IST

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?

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.

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

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.

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

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

A skew-symmetric matrix is a square matrix whose transpose is equal to its negative. In other words, it is a matrix that satisfies the condition A^T = -A. This type...read more

A matrix is a rectangular arrangement of numbers (real or complex) or symbols arranged in rows and columns. The number in the matrix are called the elements, and if the...read more

Matrix Multiplication in C
A matrix is a collection of numbers organized in rows and columns. Matrices can be manipulated using operations like Addition, Subtraction, and Multiplication. Multiplying two matrices is only possible when...read more

Types of Matrix
In Linear Algebra, Matrices are one of the most important topics of mathematics. The application of matrix is not just limited to mathematical solving problems; it has its applications across...read more

An Adjacency Matrix is a method of representing graphs in matrix form. The adjacency matrix plays a vital role in describing finite graphs, making them easier to understand and compact...read more

Lower Triangular Matrix: Definition, Example, and Properties
Discover the essentials of lower triangular matrices in linear algebra. Explore their unique properties, practical applications in solving linear systems, and their significance in mathematical computations. Perfect for students and...read more

Transpose of a Matrix
Transpose of a matrix is a matrix flipped over its main diagonal, switching the matrix’s rows and column indices. In this article, we will briefly discuss what transpose of a...read more

Confusion Matrix in Machine Learning
Are you tired of your AI models getting confused? Untangle their mysteries with the Confusion Matrix, your secret weapon for accuracy! Decode True Positives, False Negatives, and more to uncover...read more

Diagonal Matrix: Definition, Example, and Properties
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...read more

Identity Matrix: Definition, Examples, and Properties
A square matrix of order n x n with ones on the main diagonal and zeros elsewhere is known as an Identity Matrix. From solving a system of linear equations...read more

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

Matrix Multiplication: A Beginner’s Guide to Understand and Implement
Matrix multiplication is a binary operation whose output is also a binary operation. If A and B are two matrices of order m x n and n x p, then the order of the output matrix will...read more

Upper Triangular Matrix: Definition, Example, and Properties
Explore the world of upper triangular matrices in our comprehensive guide. Understand their definition, properties, and practical applications in solving linear equations and beyond. Dive into the role of these...read more

How to Calculate the Determinant of a Matrix?
The determinant of a matrix is a scalar value that is calculated from the elements of the Square matrix. It is used to determine whether a given matrix is invertible...read more