First, a slight detour, as we introduce elementary matrices, which will bring us back to the beginning of the course and our old friend, row operations.

## Elementary Matrices

Elementary matrices are very simple, as you might have suspected from their name. Their purpose is to effect row operations (Definition RO) on a matrix through matrix multiplication (Definition MM). Their definitions look more complicated than they really are, so be sure to read ahead after you read the definition for some explanations and an example.

Definition ELEM (Elementary Matrices)

1. For $i\neq j$, $\elemswap{i}{j}$ is the square matrix of size $n$ with \begin{equation*} \matrixentry{\elemswap{i}{j}}{k\ell}= \begin{cases} 0 & k\neq i, k\neq j, \ell\neq k\\ 1 & k\neq i, k\neq j, \ell=k\\ 0 & k=i, \ell\neq j\\ 1 & k=i, \ell=j\\ 0 & k=j, \ell\neq i\\ 1 & k=j, \ell=i \end{cases} \end{equation*}
2. For $\alpha\neq 0$, $\elemmult{\alpha}{i}$ is the square matrix of size $n$ with \begin{equation*} \matrixentry{\elemmult{\alpha}{i}}{k\ell}= \begin{cases} 0 & k\neq i, \ell\neq k\\ 1 & k\neq i, \ell=k\\ \alpha & k=i, \ell=i \end{cases} \end{equation*}
3. For $i\neq j$, $\elemadd{\alpha}{i}{j}$ is the square matrix of size $n$ with \begin{equation*} \matrixentry{\elemadd{\alpha}{i}{j}}{k\ell}= \begin{cases} 0 & k\neq j, \ell\neq k\\ 1 & k\neq j, \ell=k\\ 0 & k=j, \ell\neq i, \ell\neq j\\ 1 & k=j, \ell=j\\ \alpha & k=j, \ell=i\\ \end{cases} \end{equation*} {$\elemswap{i}{j}$, $\elemmult{\alpha}{i}$, $\elemadd{\alpha}{i}{j}$}{elementary matrices}

Again, these matrices are not as complicated as they appear, since they are mostly perturbations of the $n\times n$ identity matrix (Definition IM). $\elemswap{i}{j}$ is the identity matrix with rows (or columns) $i$ and $j$ trading places, $\elemmult{\alpha}{i}$ is the identity matrix where the diagonal entry in row $i$ and column $i$ has been replaced by $\alpha$, and $\elemadd{\alpha}{i}{j}$ is the identity matrix where the entry in row $j$ and column $i$ has been replaced by $\alpha$. (Yes, those subscripts look backwards in the description of $\elemadd{\alpha}{i}{j}$). Notice that our notation makes no reference to the size of the elementary matrix, since this will always be apparent from the context, or unimportant.

The {\it raison d'\^{e}tre} for elementary matrices is to "do" row operations on matrices with matrix multiplication. So here is an example where we will both see some elementary matrices and see how they can accomplish row operations.

Example EMRO: Elementary matrices and row operations.

The next three theorems establish that each elementary matrix effects a row operation via matrix multiplication.

Theorem EMDRO (Elementary Matrices Do Row Operations) Suppose that $A$ is an $m\times n$ matrix, and $B$ is a matrix of the same size that is obtained from $A$ by a single row operation (Definition RO). Then there is an elementary matrix of size $m$ that will convert $A$ to $B$ via matrix multiplication on the left. More precisely,

1. If the row operation swaps rows $i$ and $j$, then $B=\elemswap{i}{j}A$.
2. If the row operation multiplies row $i$ by $\alpha$, then $B=\elemmult{\alpha}{i}A$.
3. If the row operation multiplies row $i$ by $\alpha$ and adds the result to row $j$, then $B=\elemadd{\alpha}{i}{j}A$.

Later in this section we will need two facts about elementary matrices.

Theorem EMN (Elementary Matrices are Nonsingular) If $E$ is an elementary matrix, then $E$ is nonsingular.

Notice that we have now made use of the nonzero restriction on $\alpha$ in the definition of $\elemmult{\alpha}{i}$. One more key property of elementary matrices.

Theorem NMPEM (Nonsingular Matrices are Products of Elementary Matrices) Suppose that $A$ is a nonsingular matrix. Then there exists elementary matrices $E_1,\,E_2,\,E_3,\,...,\,E_t$ so that $A=E_1 E_2 E_3... E_t$.

## Definition of the Determinant

We'll now turn to the definition of a determinant and do some sample computations. The definition of the determinant function is recursive, that is, the determinant of a large matrix is defined in terms of the determinant of smaller matrices. To this end, we will make a few definitions.

Definition SM (SubMatrix) Suppose that $A$ is an $m\times n$ matrix. Then the submatrix $\submatrix{A}{i}{j}$ is the $(m-1)\times (n-1)$ matrix obtained from $A$ by removing row $i$ and column $j$.

Example SS: Some submatrices.

Definition DM (Determinant of a Matrix) Suppose $A$ is a square matrix. Then its determinant, $\detname{A}=\detbars{A}$, is an element of $\complex{\null}$ defined recursively by:\\[6pt] If $A$ is a $1\times 1$ matrix, then $\detname{A}=\matrixentry{A}{11}$.\\[6pt] If $A$ is a matrix of size $n$ with $n\geq 2$, then

\begin{align*} \detname{A}&= \matrixentry{A}{11}\detname{\submatrix{A}{1}{1}} -\matrixentry{A}{12}\detname{\submatrix{A}{1}{2}} +\matrixentry{A}{13}\detname{\submatrix{A}{1}{3}}-\\ &    \matrixentry{A}{14}\detname{\submatrix{A}{1}{4}} +\cdots +(-1)^{n+1}\matrixentry{A}{1n}\detname{\submatrix{A}{1}{n}} \end{align*}

So to compute the determinant of a $5\times 5$ matrix we must build 5 submatrices, each of size $4$. To compute the determinants of each the $4\times 4$ matrices we need to create 4 submatrices each, these now of size $3$ and so on. To compute the determinant of a $10\times 10$ matrix would require computing the determinant of $10!=10\times 9\times 8\times 7\times 6\times 5\times 4\times 3\times 2=3,628,800$ $1\times 1$ matrices. Fortunately there are better ways. However this does suggest an excellent computer programming exercise to write a recursive procedure to compute a determinant.

Let's compute the determinant of a reasonable sized matrix by hand.

Example D33M: Determinant of a $3\times 3$ matrix.

In practice it is a bit silly to decompose a $2\times 2$ matrix down into a couple of $1\times 1$ matrices and then compute the exceedingly easy determinant of these puny matrices. So here is a simple theorem.

Theorem DMST (Determinant of Matrices of Size Two) Suppose that $A=\begin{bmatrix}a&b\\c&d\end{bmatrix}$. Then $\detname{A}=ad-bc$

Do you recall seeing the expression $ad-bc$ before? (Hint: Theorem TTMI)

## Computing Determinants

There are a variety of ways to compute the determinant. We will establish first that we can choose to mimic our definition of the determinant, but by using matrix entries and submatrices based on a row other than the first one.

Theorem DER (Determinant Expansion about Rows) Suppose that $A$ is a square matrix of size $n$. Then

\begin{align*} \detname{A}&= (-1)^{i+1}\matrixentry{A}{i1}\detname{\submatrix{A}{i}{1}}+ (-1)^{i+2}\matrixentry{A}{i2}\detname{\submatrix{A}{i}{2}}\\ &   +(-1)^{i+3}\matrixentry{A}{i3}\detname{\submatrix{A}{i}{3}}+ \cdots+ (-1)^{i+n}\matrixentry{A}{in}\detname{\submatrix{A}{i}{n}} && 1\leq i\leq n \end{align*}

which is known as expansion about row $i$.

We can also obtain a formula that computes a determinant by expansion about a column, but this will be simpler if we first prove a result about the interplay of determinants and transposes. Notice how the following proof makes use of the ability to compute a determinant by expanding about any row.

Theorem DT (Determinant of the Transpose) Suppose that $A$ is a square matrix. Then $\detname{\transpose{A}}=\detname{A}$.

Now we can easily get the result that a determinant can be computed by expansion about any column as well.

Theorem DEC (Determinant Expansion about Columns) Suppose that $A$ is a square matrix of size $n$. Then

\begin{align*} \detname{A}&= (-1)^{1+j}\matrixentry{A}{1j}\detname{\submatrix{A}{1}{j}}+ (-1)^{2+j}\matrixentry{A}{2j}\detname{\submatrix{A}{2}{j}}\\ &   +(-1)^{3+j}\matrixentry{A}{3j}\detname{\submatrix{A}{3}{j}}+ \cdots+ (-1)^{n+j}\matrixentry{A}{nj}\detname{\submatrix{A}{n}{j}} && 1\leq j\leq n \end{align*}

which is known as expansion about column $j$.

That the determinant of an $n\times n$ matrix can be computed in $2n$ different (albeit similar) ways is nothing short of remarkable. For the doubters among us, we will do an example, computing a $4\times 4$ matrix in two different ways.

Example TCSD: Two computations, same determinant.

When a matrix has all zeros above (or below) the diagonal, exploiting the zeros by expanding about the proper row or column makes computing a determinant insanely easy.

Example DUTM: Determinant of an upper triangular matrix.

If you consult other texts in your study of determinants, you may run into the terms "minor" and "cofactor," especially in a discussion centered on expansion about rows and columns. We've chosen not to make these definitions formally since we've been able to get along without them. However, informally, a minor is a determinant of a submatrix, specifically $\detname{\submatrix{A}{i}{j}}$ and is usually referenced as the minor of $\matrixentry{A}{ij}$. A cofactor is a signed minor, specifically the cofactor of $\matrixentry{A}{ij}$ is $(-1)^{i+j}\detname{\submatrix{A}{i}{j}}$.