search
Search
Login
Unlock 100+ guides
menu
menu
web
search toc
close
Comments
Log in or sign up
Cancel
Post
account_circle
Profile
exit_to_app
Sign out
What does this mean?
Why is this true?
Give me some examples!
search
keyboard_voice
close
Searching Tips
Search for a recipe:
"Creating a table in MySQL"
Search for an API documentation: "@append"
Search for code: "!dataframe"
Apply a tag filter: "#python"
Useful Shortcuts
/ to open search panel
Esc to close search panel
to navigate between search results
d to clear all current filters
Enter to expand content preview
icon_star
Doc Search
icon_star
Code Search Beta
SORRY NOTHING FOUND!
mic
Start speaking...
Voice search is only supported in Safari and Chrome.
Navigate to
check_circle
Mark as learned
thumb_up
0
thumb_down
0
chat_bubble_outline
0
Comment
auto_stories Bi-column layout
settings

Comprehensive Guide on Diagonal Matrices and their Basic Properties

schedule Aug 11, 2023
Last updated
local_offer
Linear Algebra
Tags
mode_heat
Master the mathematics behind data science with 100+ top-tier guides
Start your free 7-days trial now!
Definition.

Diagonal matrix

A diagonal matrix is a square matrix whose non-diagonal entries are all zero. For instance, here is a 3×3 diagonal matrix:

D=(200060004)

Diagonal matrices are usually denoted by a bold uppercase letter D.

Example.

Identity matrix

The identity matrix In is a classic example of a diagonal matrix. Here's the 3×3 identity matrix:

I3=(100010001)
Theorem.

Transpose of a diagonal matrix equals itself

If D is a diagonal matrix, then:

DT=D

Proof. By theoremlink, taking the transpose of a square matrix does not change the diagonal entries. Since diagonal matrices are square matrices whose non-diagonal entries are all zero by definitionlink, we conclude that the transpose of a diagonal matrix is itself. This completes the proof.

Theorem.

Product of a matrix and a diagonal matrix

Consider an m×n matrix A and an n×n diagonal matrix D below:

A=(|||a1a2an|||),D=(d11000d22000dnn)

Where the columns of matrix A are represented by vectors a1, a2, , an.

The product AD is:

AD=(|||d11a1d22a2dnnan|||)

Proof. Let matrix A be represented as:

A=(|||a1a2an|||)=(a11a12a1na21a22a2nam1am2amn)

The product AD is:

AD=(a11a12a1na21a22a2nam1am2amn)(d11000d22000dnn)=(a11d11a12d22a1ndnna21d11a22d22a2ndnnam1d11am2d22amndnn)=(|||d11a1d22a2dnnan|||)

This completes the proof.

Example.

Computing the product of a matrix and a diagonal matrix

Compute the following matrix product:

(1456)(2003)

Solution. Let A denote the left matrix. We multiply the first column of A by 2 and the second column by 3 to get:

(1456)(2003)=(2121018)
Theorem.

Product of a diagonal matrix and a matrix

Consider an n×m matrix A and an n×n diagonal matrix D below:

A=(a11a12a1ma21a22a2man1an2anm)=(a1a2an),D=(d11000d22000dnn)

Where A is represented as a collection of row vectors.

The product DA is:

DA=(d11a1d22a2dnnan)

Proof. Let A be an m×n matrix represented as row vectors and D be a diagonal matrix:

DA=(d11000d22000dnn)(a11a12a1ma21a22a2man1an2anm)=(d11a11d11a12d11a1md22a21d22a22d22a2mdnnan1dnnan2dnnanm)=(d11a1d22a2dnnan)

This completes the proof.

Example.

Finding the product of a diagonal matrix and a matrix

Compute the following matrix product:

(300020001)(524631102)

Proof. The matrix product is:

(300020001)(524631102)=((3)5(3)2(3)4(2)6(2)3(2)1(1)1(1)0(1)2)=(156121262102)
Theorem.

Taking the power of diagonal matrices

Consider the following n×n diagonal matrix:

D=(d11000d22000dnn)

Raising D to the power of some positive integer k involves raising the diagonal entries to the power of k, that is:

Dk=(d11k000d22k000dnnk)

Proof. We prove this by induction. Consider the base case when k=1, which is trivially true:

D1=D=(d11000d22000dnn)=(d111000d221000dnn1)

We now assume the theorem holds when the power is raised to k1, that is:

(1)Dk1=(d11k1000d22k1000dnnk1)

Our goal is to show that the theorem holds when the power is raised to k. This is quite easy because:

Dk=Dk1D

We now use the inductive assumption (1) to get:

Dk=Dk1D=(d11k1000d22k1000dnnk1)(d11000d22000dnn)=(d11k000d22k000dnnk)

By the principle of mathematical induction, the theorem holds for the general case. This completes the proof.

Example.

Computing the power of an 2x2 matrix

Consider the following diagonal matrix:

D=(2001)

Compute D3.

Solution. D3 can easily be computed by raising each diagonal entry to the power of 3 like so:

D3=(230013)=(8001)

This is a very neat property of diagonal matrices because taking powers of numbers is computationally much cheaper than matrix multiplication!

Theorem.

Diagonal matrix is a triangular matrix

If D is a diagonal matrix, then D is both a lower and upper triangular matrix.

Proof. Diagonal matrix D is a lower triangular matrix because all the values above the diagonal entries are zero. Similarly, D is also an upper triangular matrix because all the values below the diagonal entries are zero. This completes the proof.

Theorem.

Determinant of a diagonal matrix is equal to the product of its diagonal entries

If D is a diagonal matrix, then the determinant of D is equal to the product of its diagonal entries.

Proof. Since a diagonal matrix is triangular, theoremlink applies. This completes the proof.

Theorem.

Diagonal matrix is invertible if and only if every diagonal entry is non-zero

Let D be a diagonal matrix. D is invertiblelink if and only if every diagonal entry of D is non-zero.

Proof. Since a diagonal matrix is triangular, theoremlink applies. This completes the proof.

Theorem.

Product of two diagonal matrices is also diagonal

If D1 and D2 are n×n diagonal matrices, then their product D1D2 is a diagonal matrix whose diagonal entry contains pairwise products of the diagonal entries of D1 and D2.

Proof. Let D1 and D2 be the following diagonal matrices:

D1=(a11000a22000ann),D2=(b11000b22000bnn)

The product D1D2 is:

D1D2=(a11000a22000ann)(b11000b22000bnn)=(a11b11000a22b22000annbnn)

This completes the proof.

Theorem.

Product of a triangular matrix and a diagonal matrix

Let A be a triangular matrix and D be a diagonal matrix:

  • if A is upper triangular, then AD and DA are upper triangular matrices.

  • if A is lower triangular, then AD and DA are lower triangular matrix.

Note that the diagonals of AD and DA are equal to the pairwise products of the diagonal entries of A and D.

Proof. Let A be an upper triangular matrix and D be a diagonal matrix. D is also an upper triangular matrix by theoremlink, which means that the product AD is upper triangular by theoremlink. We can also apply the same theoremlink to conclude that DA is upper triangular. Finally, by theoremlink, the diagonal entries of AD and DA will be the pairwise products of the diagonal entries of A and D. The proof for the lower triangular case is analogous. This completes the proof.

Theorem.

Inverse of a diagonal matrix

Let D be a diagonal matrix:

D=(d11000d22000dnn)

If every diagonal entry of D is non-zero, then D1 is computed by:

D1=(1d110001d220001dnn)

This also means that the inverse of a diagonal matrix is also diagonal.

Proof. Suppose we have an n×n diagonal matrix D and another matrix A below:

D=(d11000d22000dnn),A=(1d110001d220001dnn)

Our goal is to show that A=D1. The product DA is:

DA=(d11000d22000dnn)(1d110001d220001dnn)

By theoremlink, taking the product of two diagonal matrices involves multiplying the corresponding diagonal entries:

DA=(d11d11000d22d22000dnndnn)=(100010001)=In

Because DA=In, we have that D1=A by definitionlink of inverse matrices. This completes the proof.

Example.

Finding the inverse of a diagonal matrix

Find the inverse of the following diagonal matrix:

D=(300020001)

Solution. The inverse of D is a diagonal matrix whose diagonal entries are the reciprocal:

D1=(1/30001/20001)
robocat
Published by Isshin Inada
Edited by 0 others
Did you find this page useful?
thumb_up
thumb_down
Comment
Citation
Ask a question or leave a feedback...
Cookie Policy
close
By using our site, you acknowledge that you agree to our Privacy Policy and Terms and Conditions.