Diagonal Matrices

Page Content

Definition of a Diagonal Matrix

A diagonal matrix is a square matrix in which all entries off the main diagonal are zero.
These are examples of diagonal matrices.
\[ A = \begin{bmatrix} -6 & 0 \\ 0 & 9 \end{bmatrix} \qquad B = \begin{bmatrix} 9 & 0 & 0 \\ 0 & 7 & 0 \\ 0 & 0 & -1 \end{bmatrix} \] \[ C = \begin{bmatrix} -1 & 0 & 0 & 0 \\ 0 & 7 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & -5 \end{bmatrix} \qquad D = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix} \]


Properties of the Diagonal Matrices

Some of the most important properties of the diagonal matrices are given below.

  1.    The determinant of a diagonal matrix is equal to the product of all entries in the main diagonal.
  2.    A diagonal matrix is a symmetric matrix.
  3.    A diagonal matrix is invertible (it has an inverse) if and only if none of its entries in the main diagonal is zero.


Addition and Multiplication of Diagonal Matrices

Let A and B be two diagonal matrices of the same size \( n \times n \) given by \[ A = \begin{bmatrix} a_{11} & 0 & 0 & \cdots \\ 0 & a_{22} & 0 & \cdots \\ \vdots & \vdots & \vdots & \ddots \\ 0 & 0 & \cdots & a_{nn} \end{bmatrix} \] and \[ B = \begin{bmatrix} b_{11} & 0 & 0 & \cdots \\ 0 & b_{22} & 0 & \cdots \\ \vdots & \vdots & \vdots & \ddots \\ 0 & 0 & \cdots & b_{nn} \end{bmatrix} \]
Addition: \[ A + B = \begin{bmatrix} a_{11} + b_{11} & 0 & 0 & \cdots \\ 0 & a_{22} + b_{22} & 0 & \cdots \\ \vdots & \vdots & \vdots & \ddots \\ 0 & 0 & \cdots & a_{nn} + b_{nn} \end{bmatrix} \] Multiplication: \[ AB = \begin{bmatrix} a_{11} b_{11} & 0 & 0 & \cdots \\ 0 & a_{22} b_{22} & 0 & \cdots \\ \vdots & \vdots & \vdots & \ddots \\ 0 & 0 & \cdots & a_{nn} b_{nn} \end{bmatrix} \]


Inverse of Diagonal Matrices

Let \( A \) be a diagonal matrix given by \( A = \begin{bmatrix} a_{11} & 0 & 0 & ... \\ 0 & a_{22} & 0 & ... \\ . & & & \\ . & & & \\ . & & & \\ 0 & 0 & ... & a_{nn} \end{bmatrix} \)
If none of the entries \( a_{ii} \) in the main diagonal is equal to zero, then \( A \) is invertible and its inverse is given by \[ A^{-1} = \begin{bmatrix} \dfrac{1}{a_{11}} & 0 & 0 & ... \\ 0 & \dfrac{1}{a_{22}} & 0 & ... \\ . & & & \\ . & & & \\ . & & & \\ 0 & 0 & ... & \dfrac{1}{a_{nn}} \end{bmatrix} \]


Power of Diagonal Matrices

Let \( A \) be a diagonal matrix given by \( A = \begin{bmatrix} a_{11} & 0 & 0 & ... \\ 0 & a_{22} & 0 & ... \\ . & & & \\ . & & & \\ . & & & \\ 0 & 0 & ... & a_{nn} \end{bmatrix} \)
\[ A^p = \begin{bmatrix} a_{11}^p & 0 & 0 & ... \\ 0 & a_{22}^p & 0 & ... \\ . & & & \\ . & & & \\ . & & & \\ 0 & 0 & ... & a_{nn}^p \end{bmatrix} \] where \( p \) is a positive integer.


<

Eigenvalues and Eigenvectors of Diagonal Matrices

Let \( A \) be a diagonal matrix given by \[ A = \begin{bmatrix} a_{11} & 0 & 0 & ... \\ 0 & a_{22} & 0 & ... \\ . & & & \\ . & & & \\ . & & & \\ 0 & 0 & ... & a_{nn} \end{bmatrix} \] The eigenvalues \( \lambda_i \) and corresponding eigenvectors \( e_i \) are given by \[ \lambda_1 = a_{11} \; , \quad e_1 = \begin{bmatrix} 1 \\ 0 \\ 0 \\ . \\ . \\ 0 \end{bmatrix} \] \[ \lambda_2 = a_{22} \; , \quad e_2 = \begin{bmatrix} 0 \\ 1 \\ 0 \\ . \\ . \\ 0 \end{bmatrix} \] ... etc ... \[ \lambda_n = a_{nn} \; , \quad e_{n} = \begin{bmatrix} 0 \\ 0 \\ 0 \\ . \\ . \\ 1 \end{bmatrix} \]


Examples with Solutions

Example 1


Which of the following are diagonal matrices?
a) \( A = \begin{bmatrix} 0 & 0 \\ 1 & 2 \end{bmatrix} \)      b) \( B = \begin{bmatrix} -2 & 0 & 0 \\ 0 & 4 & 0 \\ 0 & 0 & 1 \end{bmatrix} \)      c) \( C = \begin{bmatrix} 5 & 0 & 0 & 0\\ 0 & 0 & 0 & 0\\ 0 & 0 & 3 & 0\\ 5 & 0 & 0 & 4 \end{bmatrix} \)      d) \( D = \begin{bmatrix} 5 & 0 & 0 & 0\\ 0 & -1 & 0 & 0\\ 0 & 0 & 9 & 0\\ 0 & 0 & 0 & -1 \end{bmatrix} \)
Solution
Matrices \( B \) and \( D \) are diagonal matrices.


Example 2


Matrices \( A \) and \( B \) are given by \( A = \begin{bmatrix} -1 & 0 & 0\\ 0 & -\dfrac{2}{3} & 0 \\ 0 & 0 & \dfrac{1}{4} \end{bmatrix} \) , \( B = \begin{bmatrix} -1 & 0 & 0\\ 0 & -6 & 0 \\ 0 & 0 & 8 \end{bmatrix} \).
Calculate \( A B \)
Solution
\( A B = \begin{bmatrix} -1 & 0 & 0\\ 0 & -\dfrac{2}{3} & 0 \\ 0 & 0 & \dfrac{1}{4} \end{bmatrix} \begin{bmatrix} -1 & 0 & 0\\ 0 & -6 & 0 \\ 0 & 0 & 8 \end{bmatrix} \)
\( \quad \quad = \begin{bmatrix} (-1)(-1) & 0 & 0\\ 0 & (-\dfrac{2}{3})(-6) & 0 \\ 0 & 0 & (\dfrac{1}{4})(8) \end{bmatrix} \)
\( \quad \quad = \begin{bmatrix} 1 & 0 & 0\\ 0 & 4 & 0 \\ 0 & 0 & 2 \end{bmatrix} \)


Example 3


Let matrix \( A = \begin{bmatrix} -1 & 0 & 0 & 0 \\ 0 & 2 & 0 & 0 \\ 0 & 0 & -1 & 0 \\ 0 & 0 & 0 & - 2 \end{bmatrix} \)
Calculate \( A^5 \).
Solution
\( A^5 = \begin{bmatrix} (-1)^5 & 0 & 0 & 0 \\ 0 & (2)^5 & 0 & 0 \\ 0 & 0 & (-1)^5 & 0 \\ 0 & 0 & 0 & (-2)^5 \end{bmatrix} \)
Simplify
\( \quad \quad = \begin{bmatrix} -1 & 0 & 0 & 0 \\ 0 & 32 & 0 & 0 \\ 0 & 0 & -1 & 0 \\ 0 & 0 & 0 & -32 \end{bmatrix} \)


Example 4


Find the eigenvalues and eigenvectors of the matrix
\( A = \begin{bmatrix} 1 & 0\\ 0 & -3 \end{bmatrix} \)
Solution
Eigenvalue: \( \lambda_1 = 1 \)   ,   Eigenvector: \( e_1 = \begin{bmatrix} 1 \\ 0 \end{bmatrix} \)
Eigenvalue: \( \lambda_2 = -3 \)   ,   Eigenvector: \( e_2 = \begin{bmatrix} 0 \\ 1 \end{bmatrix} \)


Example 5


Find the eigenvalues and eigenvectors of the matrix
\( A = \begin{bmatrix} -6 & 0 & 0\\ 0 & \dfrac{1}{5} & 0 \\ 0 & 0 & - \dfrac{2}{3} \end{bmatrix} \)
Solution
Eigenvalue: \( \lambda_1 = -6 \)   ,   Eigenvector: \( e_1 = \begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix} \)
Eigenvalue: \( \lambda_2 = \dfrac{1}{5} \)   ,   Eigenvector: \( e_2 = \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix} \)
Eigenvalue: \( \lambda_3 = - \dfrac{2}{3} \)   ,   Eigenvector: \( e_3 = \begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix} \)


Example 6


Find the eigenvalues and eigenvectors of the matrix
\( A = \begin{bmatrix} 1 & 0 & 0 & 0\\ 0 & -1 & 0 & 0\\ 0 & 0 & 9 & 0\\ 0 & 0 & 0 & 1 \end{bmatrix} \)
Solution
Eigenvalue: \( \lambda_1 = 1 \)   ,   Eigenvector: \( e_1 = \begin{bmatrix} 1 \\ 0 \\ 0 \\ 0 \end{bmatrix} \)
Eigenvalue: \( \lambda_2 = -1 \)   ,   Eigenvector: \( e_2 = \begin{bmatrix} 0 \\ 1 \\ 0 \\ 0 \end{bmatrix} \)
Eigenvalue: \( \lambda_3 = 9 \)   ,   Eigenvector: \( e_3 = \begin{bmatrix} 0 \\ 0 \\ 1 \\ 0 \end{bmatrix} \)
Eigenvalue: \( \lambda_4 = 1 \)   ,   Eigenvector: \( e_4 = \begin{bmatrix} 0 \\ 0 \\ 0 \\ 1 \end{bmatrix} \)


Questions (with solutions given below)


Solutions to the Above Questions


More References and links