Scroll back to the top

Virtual Math Learning Center Logo

Lecture 4: Determinant

Instructions

  • This section covers the concepts listed below. You can click the button to go directly to that topic.
  • After each video, there are notes for the material in the video. 
  • At the end of the page, there are exercises covering the material in the section.
  • When you have finished the material below, you can go to the next section or return to the main page.
Determinants, Linear Independence, Spanning Set



​To see the full video page and find related videos, click the following link.
Linear Algebra for Math 308: L4V1

Video Notes

In this lecture, we introduce the determinant of a matrix and use it to determine when sets of vectors are linearly independent, when they are a spanning set, how this relates to properties of matrices. 

Let's say we want to determine whether the vectors \(\begin{pmatrix}a\\c\end{pmatrix}\) and \(\begin{pmatrix}b\\d\end{pmatrix}\) are linearly independent or dependent. This means we need to determine how many solutions to: 
\begin{align*}
x_1\begin{pmatrix}a\\c\end{pmatrix}
+ x_2\begin{pmatrix}b\\d\end{pmatrix} 
= \begin{pmatrix}0\\0\end{pmatrix}.
\end{align*}
Another way to look at this is that we need to determine how many solutions there are to the system:
\begin{align*}
ax_1 + bx_2 &=0\\
cx_1 + dx_2 &=0.
\end{align*}
But this is the same as finding the nullspace of:  
\begin{align*}
    \begin{pmatrix}a & b \\c & d\end{pmatrix}.
\end{align*}
First, note that if both \(a\) and \(c\) are zero, the vectors are clearly dependent, so we assume at least one is not zero and we'll assume that \(a\neq 0\). Then if we subtract \(\frac{c}{a}\) times the first row from the second, we get: 
\begin{align*}
\begin{pmatrix}a & b \\c & d\end{pmatrix}
\sim \begin{pmatrix}a & b \\ 0 & \frac{ad - bc}{a}\end{pmatrix}.
\end{align*}
If \(ad - bc = 0\) then the matrix above has a free variable and so there is more than the zero vector in the null space (indeed, any vector of the form \(\begin{pmatrix}-\frac{b}{a}t\\t\end{pmatrix}\) is in the null space). On the other hand, if \(ad - bc\neq 0\) then the matrix can be reduced to the identity. This means that the only vector in the null space is \(\begin{pmatrix}0\\0\end{pmatrix}\).

Therefore, we can relate several concepts in the next video.



​To see the full video page and find related videos, click the following link.
Linear Algebra for Math 308: L4V2

Video Notes

Theorem. The following are equivalent (meaning: if one is true, the rest are true): 
  1. \(ad - bc\neq 0\)
  2. The vectors \(\begin{pmatrix}a\\c\end{pmatrix},\begin{pmatrix}b\\d\end{pmatrix}\) are linearly independent;
  3. There is only one solution to \begin{align*} ax_1 + bx_2 &=0\\cx_1 + dx_2 &=0\end{align*}
  4. The only vector in the null space of the  matrix \(\begin{pmatrix}a & b\\c & d\end{pmatrix}\) is the zero vector \(\begin{pmatrix}0\\0\end{pmatrix}\).

For a \(2\times 2\) matrix \(M = \begin{pmatrix}a&b\\c&d\end{pmatrix}\), the quantity \(ab-bc\) has a special name, the determinant:
\begin{align*}
\det\begin{pmatrix}a&b\\c&d\end{pmatrix} := ad - bc. 
\end{align*}
If we want to solve the system: 
\begin{align*}
\begin{pmatrix}a&b\\c&d\end{pmatrix}\begin{pmatrix}x_1\\x_2\end{pmatrix}
=\begin{pmatrix}y_1\\y_2\end{pmatrix}
\end{align*}
and \(ad - bc \neq 0\) then the row reduced matrix is: 
\begin{align*}
\left(\begin{array}{cc|c}
a & b & y_1\\c & d & y_2
\end{array}\right)
\sim 
\left(\begin{array}{cc|c}
a & b & y_1\\
0 & \frac{ad - bc}{a} & \frac{ay_2 - cy_1}{a}
\end{array}\right)
\sim \left(\begin{array}{cc|c}
a & b & y_1\\
0 & 1 & \frac{ay_2 - cy_1}{ad-bc}.
\end{array}\right)
\end{align*}
Then this gives the equivalent system:  
\begin{align*}
ax_1 + bx_2 &= y_1\\
x_2 &= \frac{ay_2 - cy_1}{ad-bc},
\end{align*}
which has a unique solution. In other words, we've shown that if \(\det M\neq 0\) then the equation \(M\boldsymbol{x} = \boldsymbol{y}\) has a unique solution for any \(\boldsymbol{y}\). On the other hand, if \(\det M = ad - bc = 0\) and \(a\neq 0\) then there is no solution to, for example: 
\begin{align*}
\begin{pmatrix}a&b\\c&d\end{pmatrix}\begin{pmatrix}x_1\\x_2\end{pmatrix}
=\begin{pmatrix}0\\1\end{pmatrix}
\end{align*}
since when row reduced, this becomes: 
\begin{align*}
\left(\begin{array}{cc|c}
a & b & 0\\c & d & 1
\end{array}\right)
\sim 
\left(\begin{array}{cc|c}
a & b & 0\\
0 & 0 & 1
\end{array}\right)
\end{align*}
which is the same as the system: 
\begin{align*}
ax_1 + bx_2 = 0\\
0x_1 + 0x_2 = 1,
\end{align*}
but there is no solution to the second equation. In other words, if \(\det M = 0\), then there is some vector that is not in the span of the columns of the matrix. So we have the following theorem: 

Theorem. The vectors \(\begin{pmatrix}a\\c\end{pmatrix}\) and \(\begin{pmatrix}b\\d\end{pmatrix}\) form a spanning set for \(\mathbb{R}^2\) if and only if \(ad - bc \neq 0\). 

Another way to say this is that we can modify the theorem above to: 

Theorem. The following are equivalent (meaning: if one is true, the rest are true): 
  1. \(ad - bc\neq 0\)
  2. The vectors \(\begin{pmatrix}a\\c\end{pmatrix},\begin{pmatrix}b\\d\end{pmatrix}\) are linearly independent;
  3. There is only one solution to \begin{align*} ax_1 + bx_2 &=0\\cx_1 + dx_2 &=0\end{align*}
  4. The only vector in the null space of the  matrix \(\begin{pmatrix}a & b\\c & d\end{pmatrix}\) is the zero vector \(\begin{pmatrix}0\\0\end{pmatrix}\).
  5. \(\begin{pmatrix}a\\c\end{pmatrix}\) and \(\begin{pmatrix}b\\d\end{pmatrix}\) form a spanning set for \(\mathbb{R}^2\).
 

Example

For which values of \(\gamma\) are the vectors \(\begin{pmatrix}2\gamma\\1\end{pmatrix}\) and \(\begin{pmatrix}3\\-1\end{pmatrix}\) linearly independent? Do the vectors form a spanning set for \(\mathbb{R}^2\)?

We compute the determinant of: 
\begin{align*}
\det\begin{pmatrix}2\gamma & 3\\ 1 &-1\end{pmatrix}
= -2\gamma + 3.
\end{align*}
The vectors are linearly independent if and only if \(-2\gamma + 3\neq 0\) and this happens if and only if \(\gamma \neq \frac{3}{2}\). So the vectors are linearly independent as long as \(\gamma \neq \frac{3}{2}.\) Similary,  the vectors form a spanning set as long as \(\gamma \neq \frac{3}{2}.\)


​To see the full video page and find related videos, click the following link.
Linear Algebra for Math 308: L4V3



​To see the full video page and find related videos, click the following link.
Linear Algebra for Math 308: L4V4

Video Notes

All of these theorems are true for \(3\times 3\) matrices as well. We just need to define the determinant: 
\begin{align*}
\det 
\begin{pmatrix}
a & b & c\\ d & e & f\\g & h & i
\end{pmatrix}
= a\det
\begin{pmatrix}
e & f\\ h & i
\end{pmatrix}
- b\det 
\begin{pmatrix}
d & f\\ g & i
\end{pmatrix}
+c\det 
\begin{pmatrix}
d & e\\ g & h
\end{pmatrix}.
\end{align*}
Recall that if \(\boldsymbol{v}_1,\boldsymbol{v}_2,\boldsymbol{v}_3 \in \mathbb{R}^3\) then the matrix \(M = \begin{pmatrix}\boldsymbol{v}_1 & \boldsymbol{v}_2 & \boldsymbol{v}_3\end{pmatrix}\) is the \(3\times 3\) matrix whose columns are the vectors \(\boldsymbol{v}_1,\boldsymbol{v}_2,\boldsymbol{v}_3\). We have the following theorem that we state with out proof: 

Theorem. Let \(\boldsymbol{v}_1,\boldsymbol{v}_2, \boldsymbol{v}_3\in \mathbb{R}^3\) and \(M = \begin{pmatrix}\boldsymbol{v}_1 & \boldsymbol{v}_2 & \boldsymbol{v}_3\end{pmatrix}\). Then the following are equivalent: 
  1. \(\det M \neq 0\)
  2. The vectors \(\boldsymbol{v}_1,\boldsymbol{v}_2,\boldsymbol{v}_3\) are linearly independent. 
  3. There is exactly one solution to \(M\boldsymbol{x} = \boldsymbol{w}\) for all \(\boldsymbol{w}\in\mathbb{R}^3\).
  4. The only vector in the null space of \(M\) is the zero vector. 
  5. \(\boldsymbol{v}_1,\boldsymbol{v}_2,\boldsymbol{v}_3\) form a spanning set for \(\mathbb{R}^3.\)
Example. For which values of \(\gamma\) are the vectors \(\begin{pmatrix}1\\1\\1\end{pmatrix}, 
\begin{pmatrix}2\\1\\3\end{pmatrix}, \begin{pmatrix}4\gamma\\1\\2\end{pmatrix}\) linearly independent?

Solution. We compute: 
\begin{align*}
\det \begin{pmatrix}
1 & 2 & 4\gamma\\ 
1 & 1 & 1\\ 
1 & 3 & 2
\end{pmatrix}
&= \det\begin{pmatrix}1&1\\3&2\end{pmatrix}
-2\det\begin{pmatrix}1&1\\1&2\end{pmatrix}
+4\gamma\begin{pmatrix}1&1\\1&3\end{pmatrix}
\\&= -1 - 2 + 8 \gamma 
\\& = -3 - 8\gamma. 
\end{align*}
So the vectors are linearly independent whenever \(\gamma\neq -\frac{3}{8}\). 
 
Exercises
 
  1. Determine whether the following are linearly independent or linearly dependent. 
    \begin{align*}
    \begin{pmatrix}1\\1\end{pmatrix},\begin{pmatrix}-1\\0\end{pmatrix}
    \end{align*}

    We put these into a matrix and row–reduce: 
    \begin{align*}
    \begin{pmatrix}
    1&-1\\1&0
    \end{pmatrix}
    \xrightarrow{R2:=R2-R1}
    \begin{pmatrix}
    1&-1\\
    0&1
    \end{pmatrix}.
    \end{align*}
    There are no free variables, so this means there is only one solution to: 
    \begin{align*}
    \begin{pmatrix}
    1&-1\\
    0&1
    \end{pmatrix}\begin{pmatrix}x_1\\x_2\end{pmatrix}
    =\begin{pmatrix}0\\0\end{pmatrix}
    \end{align*}
    so they are linearly independent. 

    Also, the determinant is \(1\) which shows they are linearly independent as well. 



    ​To see the full video page and find related videos, click the following link.
    Linear Algebra for Math 308: L4E1


  2. Determine whether the following are linearly independent or linearly dependent. 
    \begin{align*}
    \begin{pmatrix}1\\1\end{pmatrix}, \begin{pmatrix}-1\\0\end{pmatrix},\begin{pmatrix}1\\-1\end{pmatrix}
    \end{align*}

    There are several related ways to think about this. First, if we put them in a matrix we get: 
    \begin{align*}
    \begin{pmatrix}
    1 & -1 & 1\\
    1 & 0 & -1
    \end{pmatrix}
    \end{align*}
    we know (with out row reducing) that there will be free variables when put into echelon form. This is because there are only two rows so there can be a maximum of 2 pivot columns. Since there are three columns, at least one must not be a pivot column. So, the vectors are linearly dependent. 

    We can also actually do the reduction: 
    \begin{align*}
    \begin{pmatrix}
    1 & -1 & 1\\
    1 & 0 & -1
    \end{pmatrix}
    \xrightarrow{R2:=R2-R1}
    \begin{pmatrix}
    1&-1&1\\
    0&1&-2
    \end{pmatrix}.
    \end{align*}
    This is in echelon form and the third column isn't a pivot column, so they are linearly dependent. 



    ​To see the full video page and find related videos, click the following link.
    Linear Algebra for Math 308: L4E2


  3. Determine whether the following are linearly independent or linearly dependent. 
    \begin{align*}
    \begin{pmatrix}1\\0\\1\end{pmatrix},\begin{pmatrix}1\\0\\-1\end{pmatrix}, \begin{pmatrix}0\\1\\0\end{pmatrix}
    \end{align*}

    Putting them in to a matrix we compute the determinant: 
    \begin{align*}
    \det 
    \begin{pmatrix}
    1&1&0\\
    0&0&1\\
    1&-1&0
    \end{pmatrix}
    &=1\det\begin{pmatrix}0&1\\-1&0\end{pmatrix}
    -1\det\begin{pmatrix}0&1\\1&0\end{pmatrix}\\
    &=1 - (-1)\\
    &=2
    \end{align*}
    Since the determinant is not \(0\), the vectors are linearly independent. 

    Another way would be to row reduce: 
    \begin{align*}
    \begin{pmatrix}
    1&1&0\\
    0&0&1\\
    1&-1&0
    \end{pmatrix}
    \xrightarrow{R2 \leftrightarrow R3}
    \begin{pmatrix}
    1&1&0\\
    1&-1&0\\
    0&0&1
    \end{pmatrix}\\[4mm]
    \xrightarrow{R2:=(-1/2)(R2-R3)}
    \begin{pmatrix}
    1&1&0\\
    0&1&0\\
    0&0&1
    \end{pmatrix}.
    \end{align*}
    This is in echelon form and there are no free variables; so there is only one solution to 
    \begin{align*}
    \begin{pmatrix}
    1&1&0\\
    1&-1&0\\
    0&0&1
    \end{pmatrix}\begin{pmatrix}x_1\\x_2\\x_3\end{pmatrix}
    =\begin{pmatrix}0\\0\\0\end{pmatrix}. 
    \end{align*}
    So the vectors are linearly independent.



    ​To see the full video page and find related videos, click the following link.
    Linear Algebra for Math 308: L4E3


  4. Determine whether the following are linearly independent or linearly dependent. 
    \begin{align*}
    \begin{pmatrix}1\\0\\1\end{pmatrix},\begin{pmatrix}1\\0\\-1\end{pmatrix}, \begin{pmatrix}2\\0\\0\end{pmatrix}
    \end{align*}

    Putting them into a matrix and finding the determinant: 
    \begin{align*}
    \det
    \begin{pmatrix}
    1&1&2\\
    0&0&0\\
    1&-1&0
    \end{pmatrix}
    =1\det\begin{pmatrix}0&0\\-1&0\end{pmatrix}
    -1\det\begin{pmatrix}0&0\\1&0\end{pmatrix}
    +2\det\begin{pmatrix}0&0\\1&-1\end{pmatrix}
    =0.
    \end{align*}
    So they are linearly dependent.



    ​To see the full video page and find related videos, click the following link.
    Linear Algebra for Math 308: L4E4


  5. Determine whether the following are linearly independent or linearly dependent. 
    \begin{align*}
    \begin{pmatrix}1\\0\\1\\1\end{pmatrix}, \begin{pmatrix}2\\0\\1\\2\end{pmatrix} 
            \begin{pmatrix}1\\1\\-2\\-2\end{pmatrix}, \begin{pmatrix}4\\1\\0\\2\end{pmatrix}
    \end{align*}

    We put them into a matrix and row reduce (swapping the second and fourth rows): 
    \begin{align*}
    \begin{pmatrix}
    1&2&1&4\\
    1&2&-2&2\\
    1&1&-2&0\\
    0&0&1&1
    \end{pmatrix}
    \xrightarrow[R2:=R2-R1]{R3:=-(R3-R1)}
    \begin{pmatrix}
    1&2&1&4\\
    0&0&-3&-2\\
    0&1&3&4\\
    0&0&1&1
    \end{pmatrix}\\[4mm]
    \xrightarrow{R2 \leftrightarrow R3}
    \begin{pmatrix}
    1&2&1&4\\
    0&1&3&4\\
    0&0&-3&-2\\
    0&0&1&1
    \end{pmatrix}\\[4mm]
    \xrightarrow{R3 \leftrightarrow R4}
    \begin{pmatrix}
    1&2&1&4\\
    0&1&3&4\\
    0&0&1&1\\
    0&0&-3&-2
    \end{pmatrix}\\[4mm]
    \xrightarrow{R4 = R4 + 3R3}
    \begin{pmatrix}
    1&2&1&4\\
    0&1&3&4\\
    0&0&1&1\\
    0&0&0&1
    \end{pmatrix}
    \end{align*}
    This matrix is in echelon form and there are no free variables. So there is only one solution to: 
    \begin{align*}
    \begin{pmatrix}
    1&2&1&4\\
    1&2&-2&2\\
    1&1&-2&0\\
    0&0&1&1
    \end{pmatrix}\begin{pmatrix}x_1\\x_2\\x_3\\x_4\end{pmatrix}
    =\begin{pmatrix}0\\0\\0\\0\end{pmatrix}
    \end{align*}
    and so the vectors are linearly independent. 



    ​To see the full video page and find related videos, click the following link.
    Linear Algebra for Math 308: L4E5


  6. Determine whether the following are linearly independent or linearly dependent. 
    \begin{align*}
    \begin{pmatrix}1\\0\\1\\1\end{pmatrix}, \begin{pmatrix}2\\0\\1\\2\end{pmatrix} 
            \begin{pmatrix}3\\1\\3\\3\end{pmatrix}, \begin{pmatrix}4\\0\\3\\4\end{pmatrix}
    \end{align*}

    We row reduce (note: below we move the third row to the bottom): 
    \begin{align*}
    \begin{pmatrix}
    1&2&3&4\\
    1&1&3&3\\
    1&2&3&4\\
    0&0&1&0
    \end{pmatrix}
    \xrightarrow[R2 := R2 - R1]{R3 := R3 - R3}
    \begin{pmatrix}
    1&2&3&4\\
    0&-1&0&-1\\
    0&0&0&0\\
    0&0&1&0
    \end{pmatrix}\\[4mm]
    \xrightarrow{R3\leftrightarrow R4}
    \begin{pmatrix}
    1&2&3&4\\
    0&-1&0&-1\\
    0&0&1&0\\
    0&0&0&0
    \end{pmatrix}
    \end{align*}
    This is in echelon form; the fourth variable is a free variable so the vectors are linearly dependent.



    ​To see the full video page and find related videos, click the following link.
    Linear Algebra for Math 308: L4E6


  7. For which values of \(t\) are the following vectors linearly independent?
    \begin{align*}
    \left\{e^{t}\begin{pmatrix}\cos 2t\\\cos 2t + \sin 2t\end{pmatrix}, 
      e^{t}\begin{pmatrix}\sin 2t\\-\cos 2t + \sin 2t\end{pmatrix}\right\}
    \end{align*}

    We are going to put these into a matrix and find the determinant. Note that the determinant will be a function of \(t\) and so we will find the values of \(t\) that make it zero; those will be the values for which the vectors are linearly dependent and will be linearly independent for all other values of \(t\). 
    \begin{align*}
    \det
    &\begin{pmatrix}
    e^t\cos 2t & e^{t}\sin 2t\\
    e^{t}(\cos 2t + \sin 2t) & e^{t}(-\cos 2t + \sin 2t)
    \end{pmatrix}\\[4mm]
    &= e^{2t}(-\cos^2 2t + \cos 2t\sin 2t)
    -e^{2t}(\sin 2t \cos 2t - \sin^2 2t)
    \\&= e^{2t}(-\cos^2 2t - \sin^2 2t + \cos 2t\sin 2t - \sin 2t \cos 2t)
    \\&=-e^{2t}.
    \end{align*}
    Note that this is never \(0\). So the vectors are always linearly independent. 



    ​To see the full video page and find related videos, click the following link.
    Linear Algebra for Math 308: L4E7