Skip to main content

Section 3.8 Some special matrices

There are several matrices that repeatedly show up in many different mathematical investigations. These matrices are given particular names. We gather the most important ones and present them here.

Subsection 3.8.1 Square matrices

Definition 3.8.1. Square matrices.

A square matrix has the same number of rows and columns, this is, it is \(n\times n\text{.}\) The number \(n\) is called the order of the matrix.

Here are some square matrices of order \(3\text{:}\)

\begin{equation*} A= \begin{bmatrix} 1\amp2\amp3\\ 6\amp2\amp-1\\ 3\amp4\amp4 \end{bmatrix} \qquad I_3= \begin{bmatrix} 1\amp0\amp0\\ 0\amp1\amp0\\ 0\amp0\amp1 \end{bmatrix} \qquad 0_3= \begin{bmatrix} 0\amp0\amp0\\ 0\amp0\amp0\\ 0\amp0\amp0 \end{bmatrix}\text{.} \end{equation*}
Definition 3.8.2. Zero matrix.

The zero matrix \(0_n\) is the square matrix of order \(n\) with every entry equal to \(0\text{.}\)

Definition 3.8.3. Identity matrix.

The identity matrix \(I_n\) is a square matrix of order \(n\) that looks like

\begin{equation*} I_n= \begin{bmatrix} 1\amp0\amp0\amp\cdots\amp0\amp0\\ 0\amp1\amp0\amp\cdots\amp0\amp0\\ 0\amp0\amp1\amp\cdots\amp0\amp0\\ \amp\amp\amp\ddots\amp\amp\\ 0\amp0\amp0\amp\cdots\amp1\amp0\\ 0\amp0\amp0\amp\cdots\amp0\amp1 \end{bmatrix} \end{equation*}

More specifically, if \(I_n=[a_{i,j}]\text{,}\) then

\begin{equation*} a_{i,j} = \begin{cases} 1 \amp \textrm{ if } i=j\\ 0 \amp \textrm{otherwise} \end{cases} \end{equation*}

When it is not necessary to emphasize the order of the matrix, the identity matrix is simply written as \(I\text{.}\)

Subsection 3.8.2 Diagonal matrices

For any square matrix \(A\) of order \(n\text{,}\) the diagonal entries are \(a_{1,1},a_{2,2},a_{3,3},\ldots, a_{n,n}\text{:}\)

\begin{equation*} A= \begin{bmatrix} \color{red}{a_{1,1}} \amp a_{1,2}\amp\cdots \amp a_{1,n-1}\amp a_{1,n}\\ a_{2,1} \amp \color{red}{a_{2,2}}\amp\cdots \amp a_{2,n-1}\amp a_{2,n}\\ \amp\amp\ddots\amp\\ a_{n-1,1} \amp a_{n-1,2}\amp\cdots \amp \color{red}{a_{n-1,n-1}} \amp a_{n-1,n}\\ a_{n,1} \amp a_{n,2}\amp\cdots \amp a_{n,n-1}\amp\color{red}{a_{n,n}} \end{bmatrix} \end{equation*}

So these are the entries that start at the upper-left corner of the matrix and go down the diagonal to the lower-right one. This is also called the main diagonal of the matrix. Clearly we can describe an identity matrix as one whose diagonal entries are \(1\) and whose remaining entries are \(0\text{.}\)

Definition 3.8.4. Diagonal matrices.

A diagonal matrix is one for which nonzero entries may only occur on the main diagonal.

This means that the matrix is of the form

\begin{equation*} A= \begin{bmatrix} a_{1,1} \amp 0 \amp 0 \amp 0 \amp \cdots \amp 0 \\ 0 \amp a_{2,2} \amp 0 \amp 0 \amp \cdots \amp 0 \\ 0 \amp 0 \amp a_{3,3} \amp 0 \amp \cdots \amp 0 \\ 0 \amp 0 \amp 0 \amp a_{4,4} \amp \cdots \amp 0 \\ \amp\amp\amp\amp\ddots\\ 0 \amp 0 \amp 0 \amp 0 \amp \cdots \amp a_{n,n} \end{bmatrix}. \end{equation*}

Once we know the diagonal entries, we know the whole matrix. Sometimes we abbreviate this as

\begin{equation*} A=\diag (a_{1,1},\ldots,a_{n,n}). \end{equation*}

An example of a diagonal matrix is the identity matrix \(I\text{:}\)

\begin{equation*} I= \begin{bmatrix} 1\amp0\amp\cdots\amp0\amp0\\ 0\amp1\amp\cdots\amp0\amp0\\ \amp\amp\ddots\\ 0\amp0\amp\cdots\amp1\amp0\\ 0\amp0\amp\cdots\amp0\amp1 \end{bmatrix} =\diag (1,\ldots,1) \end{equation*}

An alternative way of describing a diagonal matrix \(A=[a_{i,j}]\) is by the condition that \(a_{i,j}=0\) whenever \(i\not=j\text{.}\)

Multiplication of diagonal matrices is particularly easy.

Subsection 3.8.3 Symmetric matrices

Definition 3.8.6. Symmetric matrix.

A matrix \(A=[a_{i,j}]\) is symmetric if \(a_{i,j}=a_{j,i}\) for all \(i,j=1,2,\ldots,n\text{.}\) Alternatively, we may write this as \(A=A^T\text{.}\)

The following matrix is symmetric:

\begin{equation*} \begin{bmatrix} 0\amp1\amp2\amp3\amp4\\ 1\amp5\amp6\amp7\amp8\\ 2\amp6\amp9\amp10\amp11\\ 3\amp7\amp10\amp12\amp13\\ 4\amp8\amp11\amp13\amp14\\ \end{bmatrix}\text{.} \end{equation*}

Notice that the rows \(R_1, R_2, R_3, R_4, R_5\) and columns \(C_1, C_2, C_3, C_4, C_5\) satisfy

\begin{align*} R_1\amp =C_1\\ R_2\amp =C_2\\ R_3\amp =C_3\\ R_4\amp =C_4\\ R_5\amp =C_5 \end{align*}

In addition, there is a geometric property. The entry \(a_{j,i}\) can be derived from \(a_{i,j}\) by reflection across the diagonal.

\begin{equation*} \begin{bmatrix} *\amp\amp\amp\cdots \amp\amp a_{i,j}\amp\\ \amp*\amp\amp\cdots \amp\amp\amp\\ \amp\amp*\amp\cdots \amp\amp\amp\\ \amp\amp\amp\ddots\amp\amp\amp\\ \amp\amp\amp\cdots \amp*\amp\\ \amp\amp\amp\cdots \amp\amp*\amp\\ \amp a_{j,i}\amp\amp\cdots \amp\amp\amp* \end{bmatrix} \qquad a_{i,j}=a_{j,i} \end{equation*}

Subsection 3.8.4 Triangular matrices

Definition 3.8.7. Upper triangular matrices.

A matrix is upper triangular if every nonzero entry is on or above the main diagonal. This means that an upper triangular matrix \(A=[a_{i,j}]\) satisfies

\begin{equation*} a_{i,j}=0 \textrm{ if } i\gt j. \end{equation*}

Notice what we use here. An entry is below the main diagonal if the row number of the entry is greater than the column number. In other words, \(a_{i,j}\) is below the main diagonal if and only if \(i \gt j\text{.}\) An upper triangular matrix \(A\) has the following pattern (\(*\) may be zero or nonzero):

\begin{equation*} A= \begin{bmatrix} *\amp*\amp*\amp*\\ 0\amp*\amp*\amp*\\ 0\amp0\amp*\amp*\\ 0\amp0\amp0\amp* \end{bmatrix} \end{equation*}

This matrix is upper triangular:

\begin{equation*} A= \begin{bmatrix} 1\amp2\amp3\amp4\\ 0\amp5\amp6\amp7\\ 0\amp0\amp8\amp9\\ 0\amp0\amp0\amp10 \end{bmatrix} \end{equation*}

A lower triangular matrix may be thought of at the transpose of an upper triangular matrix.

Definition 3.8.8. Lower triangular matrices.

A matrix is lower triangular if every nonzero entry is on or below the main diagonal. This means that an lower triangular matrix \(A=[a_{i,j}]\) satisfies

\begin{equation*} a_{i,j}=0 \textrm{ if } i\lt j. \end{equation*}

The following matrix is lower triangular:

\begin{equation*} B= \begin{bmatrix} 1\amp0\amp0\amp0\\ 2\amp3\amp0\amp0\\ 4\amp5\amp6\amp0\\ 6\amp7\amp8\amp9 \end{bmatrix} \end{equation*}
Definition 3.8.9. Triangular matrix.

A matrix is triangular if it is either upper triangular or lower triangular

We compute the \((i,j)\) entry of \(AB\) by considering row \(i\) of \(A\) and column \(j\) of \(B\text{:}\)

\begin{equation*} (AB)_{i,j} =a_{i,1}b_{1,j}+ a_{i,2}b_{2,j}+\cdots+ a_{i,n}b_{n,j} \end{equation*}

Now \(A\) and \(B\) being upper triangular implies \(a_{i,1}=a_{i,2}=\cdots=a_{i,i-1}=0\) and \(b_{j,j+1}=b_{j,j+2}=\cdots=b_{j,n}=0\text{.}\) This means that

\begin{equation*} (AB)_{i,j}=a_{i,i}b_{i,j}+ a_{i,i+1}b_{i+1,j} +\cdots+ a_{i,j-1}b_{j,j-1}+a_{i,j}b_{j,j} \end{equation*}

Hence we see that \((AB)_{i,j}\not=0\) only if \(i\leq j\text{,}\) or, \((AB)_{i,j}=0\) whenever \(i \gt j\text{.}\) This, by definition, makes \(AB\) upper triangular. The argument for lower triangular matrices \(A\) and \(B\) is essentially identical.

We consider the \((i,j)\) entry of \(AB\) by considering row \(i\) of \(A\) and column \(j\) of \(B\text{:}\)

\begin{equation*} (AB)_{i,j} =a_{i,1}b_{1,j}+ a_{i,2}b_{2,j}+\cdots+ a_{i,n}b_{n,j}. \end{equation*}

If \((AB)_{i,j} \not= 0\text{,}\) then there is some \(k\) so that \(a_{i,k}b_{k,j}\not=0\text{.}\) This means that \(a_{i,k}\not=0\text{,}\) and, since \(A\) is upper triangular, we have \(k \geq i \text{.}\) Similarly \(b_{k,j}\not=0\) implies \(j \geq k \text{.}\) Hence, if \((AB)_{i,j} \not= 0\text{,}\) then \(j \geq k \geq i\text{,}\) which makes \(AB\) upper triangular.

Suppose all diagonal entries of \(A\) are nonzero, and \(A\) is of size \(n\text{.}\) If we carry out the elementary operations \(R_i\gets\frac1{a_{i,i}}R_i\) for \(i=1,\dots,n\text{,}\) then the diagonal elements are all \(1\text{.}\) Suppose \(a_{i,j}\) is some entry above the diagonal (so \(i \lt j\)). Then we use the elementary row operation \(R_j\gets R_j-a_{ij}R_i\) to change that entry to \(0\text{.}\) We may proceed by columns from left to right deleting every \(a_{i,j}\neq0\) By this process we reduce \(A\) to the matrix \(I\text{,}\) and so \(A\) is invertible.

On the other hand, if some diagonal element is zero, then it stays zero as we row reduce an upper triangular matrix (since \(R_i\gets R_i+\lambda R_j\) only occurs when \(i \lt j\)). That implies that the variable corresponding to that column is free, and that the matrix in not invertible.

When \(A\) is row reduced to \(I\text{,}\) each row operation corresponds to an elementary matrix that is diagonal or upper triangular. Since \(A^{-1}\) is the product of these elementary matrices, it is also upper triangular.

Subsection 3.8.5 Permutation matrices

Definition 3.8.13. Permutation matrix.

A permutation matrix is a square matrix with two properties:

  1. Each entry of the matrix is either \(0\) or \(1\text{.}\)

  2. Every row and every column contains exactly one \(1\text{.}\)

The only permutation of order \(1\) is \(\begin{bmatrix}1\end{bmatrix}\text{.}\)

There are two permutation matrices of order \(2\text{:}\)

\begin{equation*} \begin{bmatrix}1\amp0\\ 0\amp1\end{bmatrix}\qquad \begin{bmatrix}0\amp1\\1\amp0\end{bmatrix} \end{equation*}

There are six permutation matrices of order \(3\text{:}\)

\begin{equation*} \begin{bmatrix} 1\amp0\amp0\\ 0\amp1\amp0\\ 0\amp0\amp1 \end{bmatrix} \qquad \begin{bmatrix} 1\amp0\amp0\\ 0\amp0\amp1\\ 0\amp1\amp0 \end{bmatrix} \qquad \begin{bmatrix} 0\amp1\amp0\\ 1\amp0\amp0\\ 0\amp0\amp1 \end{bmatrix} \end{equation*}
\begin{equation*} \begin{bmatrix} 0\amp0\amp1\\ 1\amp0\amp0\\ 0\amp1\amp0 \end{bmatrix} \qquad \begin{bmatrix} 0\amp0\amp1\\ 0\amp1\amp0\\ 1\amp0\amp0 \end{bmatrix}\qquad \begin{bmatrix} 0\amp1\amp0\\ 0\amp0\amp1\\ 1\amp0\amp0 \end{bmatrix} \end{equation*}