# Diagonal Matrix – Determinant, Inverse, Eigenvalues

-

A diagonal matrix is a square matrix where all the entries off the diagonal are zero. The entries on the diagonal itself can be equal to any number – zero or nonzero. More formally, a square matrix A = [a_{ij}]_{n \times n} is said to be a diagonal matrix if a_{ij} = 0 whenever i\neq j. For example, the matrix shown below is an example of a 3 x 3 diagonal matrix. A = \begin{bmatrix} 3 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & -5 \end{bmatrix}.

#### Is the zero matrix a diagonal matrix?

The zero matrix is indeed a diagonal matrix. Notice that the definition of a diagonal matrix only requires that the off-diagonal entries be zero. There is no restriction on the values taken by the diagonal entries. So it is entirely possible for all the diagonal entries to be zero in which case we obtain the zero matrix shown below. A = \begin{bmatrix} 0 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{bmatrix}.

#### Determinant of a Diagonal Matrix:

The determinant of a diagonal matrix is nothing but the product of the diagonal entries. We can verify this to be true for the case of a 3 x 3 diagonal matrix. Consider the matrix, A = \begin{bmatrix} a & 0 & 0 \\ 0 & b & 0 \\ 0 & 0 & c \end{bmatrix}.

det(A) = a \times \begin{vmatrix} b & 0 \\ 0 & c \end{vmatrix} - 0 \times \begin{vmatrix} 0 & 0 \\ 0 & c \end{vmatrix} + 0 \times \begin{vmatrix} 0 & b \\ 0 & 0 \end{vmatrix} . det(A) = a \times \begin{vmatrix} b & 0 \\ 0 & c \end{vmatrix} - 0 + 0 = a \times b \times c .

For example, the determinant of the matrix, A = \begin{bmatrix} 3 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & -5 \end{bmatrix}. is equal to det(A) = 3 \times 2 \times -5 = -30 .

#### Inverse of a diagonal matrix:

The inverse of a square diagonal matrix is also a diagonal matrix with reciprocal diagonal entries. Note that the inverse exists if and only if the matrix does not have zero on the diagonal. The inverse does not exist if there is a zero on the diagonal because we cannot take the reciprocal of zero. The inverse of a matrix A is denoted as A-1.

For example given the matrix, A = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 3 \end{bmatrix} the inverse of the matrix is equal to A^{-1} = \begin{bmatrix} 1 & 0 & 0 \\ 0 & \frac{1}{2} & 0 \\ 0 & 0 & \frac{1}{3} \end{bmatrix}. This can be verified by checking that A multiplied by A-1 is equal to the identity matrix. AA^{-1} = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 3 \end{bmatrix} \begin{bmatrix} 1 & 0 & 0 \\ 0 & \frac{1}{2} & 0 \\ 0 & 0 & \frac{1}{3} \end{bmatrix} = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}.

#### Eigenvalues and Eigenvectors of a diagonal matrix:

The eigenvalues of the diagonal matrix are equal to the entries on the diagonal. The corresponding eigenvectors are nothing but the standard basis vectors e_1, e_2 \text{ and } e_3. Recall that we say that a matrix A has eigenvalue \lambda, if there exists a nonzero vector v such that, Av = \lambda v.

For example the matrix, A = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 3 \end{bmatrix} has eigenvalues equal to 1, 2 and 3 with the corresponding eigenvectors equal to e_1 =(1, 0, 0), e_2=(0, 1, 0) \text{ and } e_3=(0, 0, 1). To see that this is true we can verify that for the eigenvalue 2 we have that,

Ae_2 = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 3\end{bmatrix} \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix}= \begin{bmatrix} 0 \\ 2 \\ 0 \end{bmatrix}= 2 e_2. Similarly, we can verify for the other eigenvalues.

#### Transpose of a Diagonal Matrix:

The transpose of a matrix can be obtained by interchanging the rows and columns of a square matrix. For a diagonal matrix that has nonzero entries only on the diagonal, it is obvious that when we flip the rows and the columns we get back the original matrix. Therefore the transpose of a diagonal matrix is equal to the original matrix.

### Block Diagonal Matrices:

A block diagonal matrix is defined as a matrix where all blocks other than the diagonal block consist of zero matrices. For example, a block diagonal matrix looks like,

\left[ \begin{array}{cc|cc} 8 & 11 & 0 & 0 \\ 13 & 2 & 0 & 0 \\ \hline 0 & 0 & 9 & 6 \\ 0 & 0 & 4 & 15 \end{array} \right].

The determinant of a block diagonal matrix is equal to the product of the determinants of each of the diagonal “blocks”. Similarly, the inverse of a block diagonal matrix is simply another block diagonal matrix with blocks equal to the inverse of the original blocks.

Hey 👋

I'm currently pursuing a Ph.D. in Maths. Prior to this, I completed my master's in Maths & bachelors in Statistics.

I created this website for explaining maths and statistics concepts in the simplest possible manner.

If you've found value from reading my content, feel free to support me in even the smallest way you can.