Last time
- If $A$ is an $n\times n$ matrix, $\det(A)$ is a number
- Key property: $A$ is invertible if and only if $\det(A)\ne0$
- If $A$ is a $3\times 3$ matrix, \[\det(A)=a_{11}C_{11}+a_{12}C_{12}+a_{13}C_{13}\]
- $[a_{11}\ a_{12}\ a_{13}]$ is first row of $A$
- $C_{ij}$ is $(i,j)$ cofactor of $A$
- $C_{ij}=\pm M_{ij}$, choose $\pm$ in matrix of signs
- $M_{ij}$ is $(i,j)$ minor of $A$: delete row/col containing $(i,j)$ entry, then take determinant of what remains
Example
Short version: sum along first row of (entries $\times$ cofactors)
- $\def\mat#1{\left[\begin{smallmatrix}#1\end{smallmatrix}\right]}\det\mat{1&2&3\\7&8&9\\11&12&13}$
- = $1\cdot C_{11} + 2 C_{12} + 3 C_{13}$
- = $M_{11} - 2 M_{12} + 3 M_{13}$
- = $\det\mat{8&9\\12&13} -2\det\mat{7&9\\11&13} + 3\det\mat{7&8\\11&12}$
- = $-4 -2(-8)+3(-4)$
- = $-4 + 16 - 12$
- = $0$.
- (So this matrix isn't invertible!)
Notation
To save having to write $\det$ all the time, we sometimes write the entries of a matrix inside vertical bars $|\ |$ to mean the determinant of that matrix. Using this notation (and doing a few steps in our heads), we can rewrite the previous example as:
\begin{align*}\def\vm#1{\begin{vmatrix}#1\end{vmatrix}}\vm{1&2&3\\7&8&9\\11&12&13} &= 1\vm{8&9\\12&13} -2\vm{7&9\\11&13} + 3\vm{7&8\\11&12}\\ &=-4 -2(-8)+3(-4)\\ &=0.\end{align*}
Step 4: the determinant of an $n\times n$ matrix
If $\def\mat#1{\left[\begin{smallmatrix}#1\end{smallmatrix}\right]}A=\mat{a_{11}&a_{12}&\dots&a_{1n}\\\vdots&&&\vdots\\a_{n1}&a_{n2}&\dots&a_{nn}}$ is an $n\times n$ matrix, then \[\det A=a_{11}C_{11}+a_{12}C_{12}+\dots+a_{1n}C_{1n}.\]
- Here $C_{ij}$ are the cofactors of $A$.
- Formula is called Laplace expansion of $\det A$ along its first row
- Short version: sum along first row of (entries $\times $ cofactors)
Example
\begin{align*} \def\vm#1{\left|\begin{smallmatrix}#1\end{smallmatrix}\right|} \vm{\color{red}1&\color{red}0&\color{red}2&\color{red}3\\0&2&1&-1\\2&0&0&1\\3&0&4&2} &= \color{red}1\vm{\color{blue}2&\color{blue}1&\color{blue}{-1}\\0&0&1\\0&4&2}-\color{red}0\vm{0&1&-1\\2&0&1\\3&4&2}+\color{red}2\vm{\color{orange}0&\color{orange}2&\color{orange}{-1}\\2&0&1\\3&0&2}-\color{red}3\vm{\color{purple}0&\color{purple}2&\color{purple}1\\2&0&0\\3&0&4} \\&= 1\left(\color{blue}2\vm{0&1\\4&2}-\color{blue}1\vm{0&1\\0&2}\color{blue}{-1}\vm{0&0\\0&4}\right) \\&\quad -0+2\left(\color{orange}0-\color{orange}{2}\vm{2&1\\3&2}\color{orange}{-1}\vm{2&0\\3&0}\right) \\&\quad -3\left(\color{purple}0-\color{purple}2\vm{2&0\\3&4}+\color{purple}1\vm{2&0\\3&0}\right) \\&=1(2(-4)-0-0)+2(-2(1)-0)-3(-2(8)+0) \\&=-8-4+48\\ &=36. \end{align*}
Theorem: Laplace expansion along any row or column gives the determinant
- For any fixed $i$: $\det(A)=a_{i1}C_{i1}+a_{i2}C_{i2}+\dots+a_{in}C_{in}$ (Laplace expansion along row $i$)
- For any fixed $j$: $\det(A)=a_{1j}C_{1j}+a_{2j}C_{2j}+\dots+a_{nj}C_{nj}$ (Laplace expansion along column $j$)
- We can simplify the calculation of $\det(A)$ by carefully choosing a row/col to expand along
- For example, It's simpler to compute $\det(A)$ if we can Laplace expansion along a row or column with lots of zeros
Example
\begin{align*} \vm{1&\color{red}0&2&3\\0&\color{red}2&1&-1\\2&\color{red}0&0&1\\3&\color{red}0&4&2} &= -\color{red}0+\color{red}2\vm{1&2&3\\\color{purple}2&\color{purple}0&\color{purple}1\\3&4&2}-\color{red}0+\color{red}0\\ &=2\left(-\color{purple}2\vm{2&3\\4&2}+\color{purple}0-\color{purple}1\vm{1&2\\3&4}\right)\\ &=2(-2(-8)-(-2))\\ &=36. \end{align*}
Corollary: a matrix with a zero row or column isn't invertible
If an $n\times n$ matrix $A$ has a zero row or a zero column, then $\det(A)=0$ and $A$ isn't invertible.
Proof
Expand $\det(A)$ along the zero row or column
- get a sum of terms $0\times C_{ij}$
- so $\det(A)=0$
- so $A$ isn't invertible.■
Definition: "upper triangular" and "diagonal"
An $n\times n$ matrix is upper triangular if all the entries below the main diagonal are zero.
An $n\times n$ matrix is diagonal if the only non-zero entries are on its main diagonal.
Corollary: the determinant of an upper triangular matrix
If $A$ is an upper triangular matrix or a diagonal matrix, then the determinant of $A$ is the product of its diagonal entries: \[\det(A)=a_{11}a_{22}\dots a_{nn}.\]
- Every diagonal matrix is upper triangular!
- So it suffices just to prove it for upper triangular matrices.
Proof by induction on $n$
- This is true for $n=1$, trivially.
- For $n>1$, assume inductively that it is true for $n-1$
- Let $A$ be $n\times n$. Expand $\det(A)$ along column 1:
- $\det(A)=a_{11}C_{11}+0+\dots+0=a_{11}C_{11}$.
- $C_{11}=\det(B)$ for $B=(A$ without row 1 and column 1$)$
- $B$ is $(n-1)\times (n-1)$, upper triangular, diagonal entries $a_{22},a_{33},\dots,a_{nn}$.
- By assumption, $C_{11}=\det(B)=a_{22}a_{33}\dots a_{nn}$.
- So $\det(A)=a_{11}C_{11}=a_{11}a_{22}a_{33}\dots a_{nn}$.■
Examples
- For any $n$, we have $\det(I_n)=1\cdot 1\cdots 1 = 1$.
- For any $n$, we have $\det(5I_n)=5^n$.
- Careful: $\det(5A)\ne 5\det(A)$!
- Actually, $\det(5A)=5^n\det(A)$ for any $n\times n$ A (exercise)
- $\vm{1&9&43&23434&4&132\\0&3&43&2&-1423&-12\\0&0&7&19&23&132\\0&0&0&2&0&0\\0&0&0&0&-1&-903\\0&0&0&0&0&6}=1\cdot3\cdot7\cdot2\cdot(-1)\cdot6 = 252$.
Theorem: important properties of the determinant
Let $A$ be an $n\times n$ matrix.
- $A$ is invertible if and only if $\det(A)\ne0$.
- $\det(A^T)=\det(A)$
- If $B$ is another $n\times n$ matrix, then $\det(AB)=\det(A)\det(B)$.
Corollary on invertibility
- $A^T$ is invertible if and only if $A$ is invertible
- $AB$ is invertible if and only if both $A$ and $B$ are invertible
- Warning: it's not true that $A+B$ is invertible if and only if $A$ and $B$ are invertible!
Theorem: row/column operations and determinants
Let $A$ be an $n\times n$ matrix, let $c$ be a scalar and let $i\ne j$.
$A_{Ri\to x}$ means $A$ but with row $i$ replaced by $x$.
- If $i\ne j$, then $\det(A_{Ri\leftrightarrow Rj})=-\det(A)$ (swapping two rows changes the sign of det).
- $\det(A_{Ri\to c Ri}) = c\det(A)$ (scaling one row scales $\det(A)$ in the same way)
- $\det(A_{Ri\to Ri + c Rj}) = \det(A)$ (adding a multiple of one row to another row doesn't change $\det(A)$)
- Also, these properties all hold if you change “row” into “column” throughout.
Corollary
If an $n\times n$ matrix $A$ has two equal rows (or columns), then $\det(A)=0$, and $A$ is not invertible.
Proof
- Suppose $A$ has two equal rows, row $i$ and row $j$.
- Then $A=A_{Ri\leftrightarrow Rj}$
- So $\det(A)=\det(A_{Ri\leftrightarrow Rj}) = -\det(A)$
- So $\det(A)=0$.
- If $A$ has two equal columns, then $A^T$ has two equal rows
- So $\det(A)=\det(A^T)=0$.
- In either case, $\det(A)=0$. So $A$ is not invertible.■
Examples
- $\det(A_{Ri\leftrightarrow Rj})=-\det(A)$, so $\vm{0&0&2\\0&3&0\\4&0&0} = -\vm{4&0&0\\0&3&0\\0&0&2}=-4\cdot 3\cdot 2 = -24$.
- $\det(A_{Ri\to c Ri})=c\det(A)$, and the same for columns. So \begin{align*}\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\vm{ 2&4&6&10\\5&0&0&-10\\9&0&81&99\\1&2&3&4} &= 2\vm{ 1&2&3&5\\5&0&0&-10\\9&0&81&99\\1&2&3&4} = 2\cdot 5\vm{ 1&2&3&5\\1&0&0&-2\\9&0&81&99\\1&2&3&4}\\&= 2\cdot 5\cdot 9 \vm{ 1&2&3&5\\1&0&0&-2\\1&0&9&11\\1&2&3&4}=2\cdot 5\cdot 9\cdot 2 \vm{ 1&1&3&5\\1&0&0&-2\\1&0&9&11\\1&1&3&4}\\&=2\cdot 5\cdot 9\cdot 2\cdot 3 \vm{ 1&1&1&5\\1&0&0&-2\\1&0&3&11\\1&1&1&4}.\end{align*}
- $\det(A_{R1\to R1-R4})=\det(A)$, so \begin{align*}\vm{ 1&1&1&5\\1&0&0&-2\\1&0&3&11\\1&1&1&4} &=\vm{ 0&0&0&1\\1&0&0&-2\\1&0&3&11\\1&1&1&4}=-1\vm{1&0&0\\1&0&3\\1&1&1}+0\\&=-\vm{0&3\\1&1} = -(-3)=3.\end{align*}
- Hence \begin{align*}\vm{ 2&4&6&10\\5&0&0&-10\\9&0&81&99\\1&2&3&4} &= 2\cdot 5\cdot 9\cdot 2\cdot 3 \vm{ 1&1&1&5\\1&0&0&-2\\1&0&3&11\\1&1&1&4} \\&= 2\cdot 5\cdot 9\cdot 2\cdot 3 \cdot 3 = 1620.\end{align*}
Corollary
If $\def\row{\text{row}}\row_i(A)=c\cdot \row_j(A)$ for some $i\ne j$ and some $c\in \mathbb{R}$, then $\det(A)=0$ (and so $A$ isn't invertible).
Proof
- $\row_i(A)-c \cdot\row_j(A)=0$
- So $A_{Ri\to Ri-c\,Rj}$ has a zero row
- So $\det(A_{Ri\to Ri-c\,Rj})=0$
- So $\det(A)=\det(A_{Ri\to Ri-c\,Rj})=0$.■
Effect of EROs on the determinant
We've seen that:
- swapping two rows of the matrix multiplies the determinant by $-1$;
- scaling one of the rows of the matrix by $c$ scales the determinant by $c$; and
- replacing row $j$ by “row $j$ ${}+{}$ $c\times {}$ (row $i$)”, where $c$ is a scalar and $i\ne j$ does not change the determinant.
- Since $\det(A)=\det(A^T)$, this all applies equally to columns instead of rows.
Using EROs to find the determinant
- Can use EROs to put a matrix into upper triangular form
- Then finding the determinant is easy: just multiply the diagonal entries together.
- Just have to keep track of how the determinant is changed by any row swaps and row scalings.
Example: using EROs to find the determinant
\begin{align*}\vm{1&3&1&3\\\color{red}4&\color{red}8&\color{red}0&\color{red}{12}\\0&1&3&6\\2&2&1&6}&= \color{red}{4}\vm{1&3&1&\color{blue}3\\1&2&0&\color{blue}3\\0&1&3&\color{blue}6\\2&2&1&\color{blue}6}=4\cdot \color{blue}3\vm{\color{green}1&3&1&1\\\color{red}1&2&0&1\\\color{red}0&1&3&2\\\color{red}2&2&1&2} \\&=12\vm{1&3&1&1\\\color{blue}0&\color{blue}{-1}&\color{blue}{-1}&\color{blue}{0}\\\color{blue}0&\color{blue}1&\color{blue}3&\color{blue}2\\0&-4&-1&-0} =\color{blue}{-}12\vm{1&3&1&1\\0&\color{green}1&3&2\\0&\color{red}{-1}&{-1}&{0}\\0&\color{red}{-4}&-1&0} \\&=-12\vm{1&3&1&1\\0&1&3&2\\0&0&\color{green}2&2\\0&0&\color{red}{11}&8} =-12\vm{1&3&1&1\\0&1&3&2\\0&0&2&2\\0&0&0&-3} \\&=-12(1)(1)(2)(-3)=72. \end{align*}

