BrightChamps Logo
Login

Summarize this article:

Live Math Learners Count Icon107 Learners

Last updated on November 14, 2025

Diagonal Matrix

Professor Greenline Explaining Math Concepts

The arrangement of numbers organized into rows and columns, forming a square or a rectangular shape, is known as a matrix. A diagonal matrix is a square matrix in which all the elements except the diagonal elements are zero. We will learn about the concept of diagonal matrices in this article.

Diagonal Matrix for US Students
Professor Greenline from BrightChamps

Diagonal Matrix

The arrangement of numbers organized into rows and columns, forming a square or a rectangular shape, is known as a matrix.

 

A diagonal matrix is a square matrix in which all the elements except the diagonal elements are zero. We will learn about the concept of diagonal matrices in this article. 

Professor Greenline from BrightChamps

What is a Diagonal Matrix?

A diagonal matrix is a square matrix in which all the elements outside the main diagonal are zero. Only the elements on the main diagonal, from the top-left to the bottom-right, may be non-zero. The example of a diagonal matrix is:

\( \begin{bmatrix} 5 & 0 & 0 \\ 0 & 8 & 0 \\ 0 & 0 & 3 \end{bmatrix} \)

Here, all the elements are 0 except the diagonal elements.

 

Lower triangular matrix: A lower triangular matrix is a square matrix in which every element above the main diagonal is 0. 
Example:

\( \begin{bmatrix} 3 & 0 & 0 \\ 5 & 4 & 0 \\ 6 & 5 & 7 \end{bmatrix} \)
 

Upper triangular matrix: The upper triangular matrix is a square matrix where every element below the diagonal is 0. 
Example:

\( \begin{bmatrix} 5 & 0 & 0 \\ 0 & 8 & 0 \\ 0 & 0 & 3 \end{bmatrix} \)
 

A diagonal matrix is considered as both an upper and a lower triangular matrix as it contains zeros in all positions except the main diagonal. 

Professor Greenline from BrightChamps

What are the Properties of Diagonal Matrix?

In this section, we will learn about the main properties of a diagonal matrix, including how they behave in addition, multiplication, and transposition. The properties of a diagonal matrix help us to solve problems and understand the applications of diagonal matrices. 

 

1. A diagonal matrix is always a square matrix

A diagonal matrix must have an equal number of rows and columns, meaning that it is always a square matrix. 

Example: 

\( \begin{bmatrix} 5 & 0 & 0 \\ 0 & 8 & 0 \\ 0 & 0 & 3 \end{bmatrix} \)
 

The above matrix has 3 rows and 3 columns, so it is called a square matrix.

 

2. Types of diagonal matrix

Diagonal matrices are of different types, such as identity matrix, scalar matrix, and null or zero matrix. In identity and scalar matrices, the diagonal elements are non-zero, while all other elements are zero. 

Example:

\( \begin{bmatrix} 2 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 2 \end{bmatrix} \)

 

3. Identity matrix

The identity matrix is a special type of matrix where all the diagonal elements are 1, and the rest of the elements are 0. 

Example:

\( \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} \)
 

4. Addition of diagonal matrices

When two diagonal matrices of the same order are added, the result is also a diagonal matrix. The corresponding diagonal elements are added together. 

Example:

\( \text{Add } A = \begin{bmatrix} 2 & 0 \\ 0 & 2 \end{bmatrix}, \quad B = \begin{bmatrix} 3 & 0 \\ 0 & 5 \end{bmatrix} \)

 

  A × B = \( \begin{bmatrix} 5 & 0 & 0 \\ 0 & 8 & 0 \\ 0 & 0 & 3 \end{bmatrix} \)

 

5. Multiplication of diagonal matricesThe result will also be a diagonal matrix if we multiply two diagonal matrices of the same size. To multiply the diagonal matrices, multiply the corresponding diagonal elements.

Example:

 \( \text{Add } A = \begin{bmatrix} 2 & 0 \\ 0 & 2 \end{bmatrix}, \quad B = \begin{bmatrix} 3 & 0 \\ 0 & 5 \end{bmatrix} \)

 

  A × B = \( \begin{bmatrix} 5 & 0 & 0 \\ 0 & 8 & 0 \\ 0 & 0 & 3 \end{bmatrix} \)

6. Transpose of a diagonal matrix

When we transpose (flip) a diagonal matrix, the result is the same diagonal matrix. This is because all the non-diagonal elements are zero. 

Example:

\( A = \begin{bmatrix} 3 & 0 \\ 0 & 5 \end{bmatrix} \)

AT =\( \begin{bmatrix} 3 & 0 \\ 0 & 5 \end{bmatrix} \)
 

7. Commutative property

Diagonal matrices satisfy the commutative property for both addition and multiplication. This means the order in which we add or multiply the diagonal matrices does not affect the result.   

A + B = B + A
A × B = B × A

 

8. Diagonal matrices are symmetric

A matrix is said to be symmetric when it looks the same after flipping it across the diagonal. Since all non-diagonal elements in a diagonal matrix are zero, transposing it does not affect the matrix. 
 

Professor Greenline from BrightChamps

What is an Anti-Diagonal Matrix?

An anti-diagonal matrix has non-zero elements only on the anti-diagonal, which is from the top-right to the bottom-left. It is a representation of a diagonal matrix where non-zero elements are on the anti-diagonal.

 

In an anti-diagonal matrix, all the elements are 0 except the diagonal elements from the upper-right edge to the lower-left edge. An anti-diagonal  diagonal. An example of an anti-diagonal matrix is,

 

\( \begin{bmatrix} 0 & 0 & 2 \\ 0 & 6 & 0 \\ 7 & 0 & 0 \end{bmatrix} \)

 

Professor Greenline from BrightChamps

Determinant of a Diagonal Matrix

The determinant of a diagonal matrix is found by multiplying its main diagonal elements. The determinant of a diagonal matrix is non-zero only when all its diagonal elements are non-zero. 

 

Consider a 3 × 3 matrix, A =

\( \begin{bmatrix} 2 & 0 & 0 \\ 0 & -4 & 0 \\ 0 & 0 & 6 \end{bmatrix} \)
 

 

The determinant of the given matrix |A| = 2 × (-4) × 6 = -48.
 

Professor Greenline from BrightChamps

The determinant of the given matrix |A| = 2 × (-4) × 6 = -48.

The inverse of a diagonal matrix is also a diagonal matrix. To find the inverse of a diagonal matrix, just take the reciprocal of each number on the diagonal. All the other numbers stay zero, but the diagonal matrix cannot be zero.

If we have a diagonal matrix of 3 × 3, A =

\( \begin{bmatrix} a_{11} & 0 & 0 \\ 0 & a_{22} & 0 \\ 0 & 0 & a_{33} \end{bmatrix} \)
 

Step 1: Find the determinant.
The determinant of a diagonal matrix is the product of all the numbers on the diagonals.

|A| = a11 × a22 × a33
 

Step 2: Find the adjoint
The adjoint of a diagonal matrix is also a diagonal matrix.
 

Step 3: Use the formula

The inverse formula for a diagonal matrix is A-1 =

\( \begin{bmatrix} \dfrac{1}{a_{11}} & 0 & 0 \\ 0 & \dfrac{1}{a_{22}} & 0 \\ 0 & 0 & \dfrac{1}{a_{33}} \end{bmatrix} \)
 

Example:

Find the inverse of a given diagonal matrix, A = 

\( \begin{bmatrix} 2 & 0 & 0 \\ 0 & 4 & 0 \\ 0 & 0 & 5 \end{bmatrix} \)

A-1 =
\( \begin{bmatrix} \dfrac{1}{2} & 0 & 0 \\ 0 & \dfrac{1}{4} & 0 \\ 0 & 0 & \dfrac{1}{5} \end{bmatrix} \)

 

Professor Greenline from BrightChamps

What is a Block Diagonal Matrix?

A block matrix is a square matrix that is split into smaller sections or blocks. It is made by dividing the matrix into smaller square blocks along the diagonals. The blocks that are not on the diagonals are filled with zeros. The simple rules of a block diagonal matrix are:
The blocks on the diagonal are square matrices like 2 × 2, 3 × 3, etc.

All the other blocks are zero matrices.

 

If we say [Aij] = 0, for i ≠ j, it means all the blocks not on the diagonal are zero.
For example,

A = 

\( \begin{bmatrix} B_{1} & 0 & 0 \\ 0 & B_{2} & 0 \\ 0 & 0 & B_{3} \end{bmatrix} \)
 

Here, B1, B2, and B3 are square matrices, and all the other parts are zero matrices.

 

Block matrices are used to break big problems into smaller ones. Each part on the diagonal works separately, which saves time and effort in big calculations like matrix multiplication or finding inverses.

Max Pointing Out Common Math Mistakes

Common Mistakes and How To Avoid Them in Diagonal Matrix

Diagonal matrices are simple in structure; only the main diagonal has non-zero elements, and all others are zero. Students often get confused about diagonal matrices with other types or make small calculation errors. Here are some of the mistakes and their solutions to avoid them. 

Mistake 1

Red Cross Icon Indicating Mistakes to Avoid in This Math Topic

Any matrix with zeros is a diagonal matrix

Green Checkmark Icon Indicating Correct Solutions in This Math Topic

Students may assume that any matrix with many zeros is a diagonal matrix. But that is not always true. In a diagonal matrix, only the diagonal elements can be non-zero, and all other elements must be zero.

 

So, it is important to carefully check the matrix before deciding it is a diagonal matrix. 

Mistake 2

Red Cross Icon Indicating Mistakes to Avoid in This Math Topic

Forgetting that a diagonal matrix is a square matrix

Green Checkmark Icon Indicating Correct Solutions in This Math Topic

A diagonal matrix must be a square matrix, which means it should have the same number of rows and columns.

 

Any matrix that has zeros and the only diagonal elements is non-zero, but which is not a square matrix, is not a diagonal matrix.

Mistake 3

Red Cross Icon Indicating Mistakes to Avoid in This Math Topic

Misplacing the diagonal element
 

Green Checkmark Icon Indicating Correct Solutions in This Math Topic

In a diagonal matrix, the non-zero elements must lie from top-left to bottom-right.

 

Changing the order of a diagonal matrix can lead to errors, and the result may no longer be a diagonal matrix. 

Mistake 4

Red Cross Icon Indicating Mistakes to Avoid in This Math Topic

Mistaking a scalar matrix for a zero matrix

Green Checkmark Icon Indicating Correct Solutions in This Math Topic

Students sometimes think that a scalar matrix means all the elements in the matrix are zero. A scalar matrix is a diagonal matrix where all the diagonal elements are equal.

 

If all the elements are zero, then it is known as a zero or null matrix.

Mistake 5

Red Cross Icon Indicating Mistakes to Avoid in This Math Topic

 Wrong inverse

Green Checkmark Icon Indicating Correct Solutions in This Math Topic

The inverse of a diagonal matrix can be found by taking the reciprocals of the diagonal elements and not their negatives. 

arrow-right
arrow-right
Professor Greenline from BrightChamps

Real Life Applications of Diagonal Matrix

Diagonal matrices are useful because they make complex problems easier, especially when working with computations, physics, computer graphics, and many other fields. Below are some real-life examples of how diagonal matrices are used in different areas.

  • Physics: Diagonal matrices are used to simplify the moment of inertia of an object when it is rotating. In physics, diagonal matrices help in calculating how an object resists rotation around an axis.
     
  • Computer Graphics: Diagonal matrices are used to scale the images in computer graphics. It is also used to resize, stretch, or shrink images or shapes easily.
     
  • Machine Learning and AI: In some machine learning algorithms, diagonal matrices help in simplifying covariance matrices. It makes it easier to analyze and reduce large datasets. 
     
  • Economics: In economic models, diagonal matrices represent systems where each sector, like farming, manufacturing, etc., affects only itself and not others. It shows how much one sector produces or consumes by itself.
Max from BrightChamps Saying "Hey"
Hey!

Solved Examples of Diagonal Matrix

Ray, the Character from BrightChamps Explaining Math Concepts
Max, the Girl Character from BrightChamps

Problem 1

Add the following diagonal matrices A = 02 50, B = 04 10

Ray, the Boy Character from BrightChamps Saying "Let’s Begin"
Okay, lets begin

\(A + B = \begin{bmatrix} 6 & 0 \\ 0 & 6 \end{bmatrix} \)

Explanation

We add diagonal elements to their diagonal elements

\(A + B = \begin{bmatrix} 2 + 4 & 0 + 0 \\ 0 + 0 & 5 + 1 \end{bmatrix} \)

\(A + B = \begin{bmatrix} 6 & 0 \\ 0 & 6 \end{bmatrix} \)

Max from BrightChamps Praising Clear Math Explanations
Well explained 👍
Max, the Girl Character from BrightChamps

Problem 2

Multiply two diagonal matrices, A = 03 20 and B = 05 40

Ray, the Boy Character from BrightChamps Saying "Let’s Begin"
Okay, lets begin

\( A \times B = \begin{bmatrix} 15 & 0 \\ 0 & 8 \end{bmatrix} \)

Explanation

We only multiply the elements on the diagonals 

\(A \times B = \begin{bmatrix} 3 \times 5 & 0 \\ 0 & 2 \times 4 \end{bmatrix} \\[6pt] \)
\(A \times B = \begin{bmatrix} 15 & 0 \\ 0 & 8 \end{bmatrix} \)

Max from BrightChamps Praising Clear Math Explanations
Well explained 👍
Max, the Girl Character from BrightChamps

Problem 3

Find the transpose of a matrix, A = 6 0 0 0 3 0 0 0 9

Ray, the Boy Character from BrightChamps Saying "Let’s Begin"
Okay, lets begin

AT =

\( \begin{bmatrix} 6 & 0 & 0 \\ 0 & 3 & 0 \\ 0 & 0 & 9 \end{bmatrix} \)

 

Explanation

When we take the transpose, rows become columns.

But in a diagonal matrix, all the elements except the diagonal are zero. So it looks the same after transposing.

Max from BrightChamps Praising Clear Math Explanations
Well explained 👍
Max, the Girl Character from BrightChamps

Problem 4

Find the inverse of a diagonal matrix, A = 2 0 0 0 5 0 0 0 10

Ray, the Boy Character from BrightChamps Saying "Let’s Begin"
Okay, lets begin

A-1 = \( \begin{bmatrix} \dfrac{1}{2} & 0 & 0 \\ 0 & \dfrac{1}{5} & 0 \\ 0 & 0 & \dfrac{1}{10} \end{bmatrix} \)

 

Explanation

To find the inverse of a diagonal matrix, simply take the reciprocal of each number on the diagonal.

The rest of the elements remain zero.

Max from BrightChamps Praising Clear Math Explanations
Well explained 👍
Max, the Girl Character from BrightChamps

Problem 5

Is the following matrix scalar, A = 7 0 0 0 7 0 0 0 7

Ray, the Boy Character from BrightChamps Saying "Let’s Begin"
Okay, lets begin

Yes, the given matrix is scalar.

Explanation

A scalar matrix is a special diagonal matrix where all the diagonal elements are equal and all the other elements are zero.

Here, all the diagonal elements are 7, and the rest are 0. So, it is a scalar matrix.
 

Max from BrightChamps Praising Clear Math Explanations
Well explained 👍
Ray Thinking Deeply About Math Problems

FAQs of Diagonal Matrix

1.What is a diagonal matrix?

A diagonal matrix is a square matrix in which only the elements on the main diagonal, from top-left to bottom-right, can be non-zero, while the other elements are zero. 

Math FAQ Answers Dropdown Arrow

2.Can a diagonal matrix have zeros on the diagonal?

Yes, a diagonal matrix can have zeros on the diagonal, but all off-diagonal elements must be zero. If the diagonal elements are also zero, then it becomes a zero matrix.

Math FAQ Answers Dropdown Arrow

3.What is the inverse of a diagonal matrix?

The inverse of a diagonal matrix is also a diagonal matrix. This is done by replacing each diagonal element with its reciprocal, as long as none of them are zero. 

Math FAQ Answers Dropdown Arrow

4. Is every diagonal matrix also a square matrix?

Yes, a diagonal matrix must be a square matrix.

Math FAQ Answers Dropdown Arrow

5. Is every square matrix a diagonal matrix?

No, a square matrix may have non-zero elements outside the diagonal.

Math FAQ Answers Dropdown Arrow
Math Teacher Background Image
Math Teacher Image

Jaskaran Singh Saluja

About the Author

Jaskaran Singh Saluja is a math wizard with nearly three years of experience as a math teacher. His expertise is in algebra, so he can make algebra classes interesting by turning tricky equations into simple puzzles.

Max, the Girl Character from BrightChamps

Fun Fact

: He loves to play the quiz with kids through algebra to make kids love it.

INDONESIA - Axa Tower 45th floor, JL prof. Dr Satrio Kav. 18, Kel. Karet Kuningan, Kec. Setiabudi, Kota Adm. Jakarta Selatan, Prov. DKI Jakarta
INDIA - H.No. 8-2-699/1, SyNo. 346, Rd No. 12, Banjara Hills, Hyderabad, Telangana - 500034
SINGAPORE - 60 Paya Lebar Road #05-16, Paya Lebar Square, Singapore (409051)
USA - 251, Little Falls Drive, Wilmington, Delaware 19808
VIETNAM (Office 1) - Hung Vuong Building, 670 Ba Thang Hai, ward 14, district 10, Ho Chi Minh City
VIETNAM (Office 2) - 143 Nguyễn Thị Thập, Khu đô thị Him Lam, Quận 7, Thành phố Hồ Chí Minh 700000, Vietnam
UAE - BrightChamps, 8W building 5th Floor, DAFZ, Dubai, United Arab Emirates
UK - Ground floor, Redwood House, Brotherswood Court, Almondsbury Business Park, Bristol, BS32 4QW, United Kingdom