- Code: Select all
`D =`

5 0 0

0 3 0

0 0 1

As you can see in the diagonal we have 5 3 1 and zero everywhere.

finding the inverse of diagonal matrix

To find the inverse of the matrix, invert each entry of the diagonal . Here inverting 5 which is `5/1` becomes `1/5` and 3 becomes `1/3` and 1 becomes `1/1=1`

- Code: Select all
`1/5 0 0`

0 1/3 0

0 0 1

`D*D^-1=D^(-1)*D=I`

It says if we multiply a diagonal matrix to its inverse the product equals identity matrix.

To prove this, let's look. If we multiply D by `D^(-1)` , we are actually multiplying all diagonal entries. If you look at the diagonal of the inverse matrix, we see we have `1/5`, `1/3` and 1.

and in our D matrix we have 5, 3, 1. Multiplying `5*1/5=1` and `3*1/3=1` and 1*1=1 so we get Identity matrix :

- Code: Select all
`I=`

1 0 0

0 1 0

0 0 1