next up previous
Next: About this document ... Up: Determinants. Previous: Determinants.

How to Compute Determinants:

Some of this is review for us. We're including it all here for completeness.

We define the determinant of a $ 2 \times 2$ matrix this way:

$\displaystyle det
\left(\begin{array}{cc} a & b \\  c & d \\
\end{array}\righ...
...left\vert\begin{array}{cc} a & b \\  c & d \\
\end{array}\right\vert = ad-bc.$

Then we use our definition of the determinant of a $ 2 \times 2$ matrix to define the determinant of a $ 3 \times 3$ matrix:

$\displaystyle det(A) = det
\left(\begin{array}{ccc} a & b & c \cr d & e & f \cr...
...t + c
\left\vert\begin{array}{cc} d & e \cr g & h \cr
\end{array}\right\vert .$

In other words, we go across the first row of the matrix $ A$, $ (a \, b \, c)$. We multiply each entry by the determinant of the $ 2 \times 2$ matrix we get from $ A$ by crossing out the row and column containing that entry. (Try this. If you take $ A$ and cross out the row and column containing $ b$ (the first row and the second column) you get the matrix $ \left(\begin{array}{cc} d & f \cr g & k \cr
\end{array}\right) $; this was the matrix whose determinant we multiplied $ b$ by in computing the determinant of $ A$.) Then we add and subtract the resulting terms, alternating signs (add the $ a$-term, subtract the $ b$-term, add the $ c$-term.)

Example 1  

$\displaystyle \left\vert\begin{array}{ccc} 1 &2 &1 \cr 3 &0 & 4\cr 8 &4 &10 \cr...
...t + (1)\left\vert\begin{array}{cc} 3 & 0\cr 8 & 4\cr
\end{array}\right\vert =0.$

We can use this same method to compute the determinant of a $ 4 \times 4$ matrix.

Example 2  

$\displaystyle \left\vert\begin{array}{cccc} 1 & 2 & 2 & 1 \cr 0 & 2 & 0 & 0 \cr -1 & -4 & -2 & -1
\cr 1 & 4 & 4 & 1 \cr
\end{array}\right\vert = $

$\displaystyle (1)
\left\vert\begin{array}{ccc} 2 &0 & 0\cr -4 &-2 & -1\cr 4 &4...
...gin{array}{ccc} 0 &0 &0 \cr -1 &-2 & -1\cr 1 &4 & 1\cr
\end{array}\right\vert+
$

$\displaystyle (2)
\left\vert\begin{array}{ccc} 0 &2 &0 \cr -1 &-4 & -1\cr 1 &4 ...
...egin{array}{ccc} 0 &2 & 0\cr -1 &-4 & -2\cr 1 &4 &4 \cr
\end{array}\right\vert
$

$\displaystyle =0.$

The same method works for any square matrix of any size. And you don't have to use the first row; you can use any row or any column, as long as you know where to put the plus and minus signs. Here's how you know: Use this checkerboard pattern:

$\displaystyle \left(\begin{matrix}+ & - & + & \cdots \cr
- & + & - & \cdots \cr
+ & - & + & \cdots \cr
\vdots & \vdots & \vdots & \ddots \cr \end{matrix}\right).$

Example: Find the determinant of the matrix

$\displaystyle A = \left(\begin{matrix}
1 & 0 & 2 & -1 \cr
3 & 0 & 0 & 5 \cr
2 & 1 & 4 & -3 \cr
1 & 0 & 5 & 0 \cr\end{matrix}\right).$

Solution: The second column of this matrix has lots of zeroes, so that's a good one to use for computing the determinant. From our checkerboard matrix, we see that we should start with a minus sign going down the second column. So we compute the determinant of $ A$ as

$\displaystyle -0\left\vert\begin{matrix}
3 & 0 & 5 \cr
2 & 4 & -3 \cr
1 & 5 & 0...
...{matrix}
1 & 2 & -1 \cr
3 & 0 & 5 \cr
2 & 4 & -3 \cr
\end{matrix} \right\vert =$

$\displaystyle -\left\vert\begin{matrix}
1 & 2 & -1 \cr
3 & 0 & 5 \cr
1 & 5 & 0 \cr\end{matrix} \right\vert = 30. $

Finally, here's one more trick you can use for computing determinants: The elementary row operations change the determinant of a matrix in specific ways:

1.
Multiplying a row of matrix by a number $ c$ multiplies its determinant by the same number.

2.
Adding a multiple of one row of a matrix to another row does not change the determinant.

3.
Interchanging two rows of a matrix changes the sign of the determinant.

Example: Find the determinant of the matrix

$\displaystyle A = \left(\begin{matrix}
1 & 0 & 2 & -1 \cr
3 & 0 & 0 & 5 \cr
2 & 1 & 4 & -3 \cr
1 & 0 & 5 & 0 \cr\end{matrix}\right).$

Solution: First we add $ -1$ times row 4 to row 1. This does not change the determinant, but it makes it easier to compute, because it gives us a matrix with more zero entries,

$\displaystyle \left(\begin{matrix}
0 & 0 & -3 & -1 \cr
3 & 0 & 0 & 5 \cr
2 & 1 & 4 & -3 \cr
1 & 0 & 5 & 0 \cr\end{matrix}\right).$

Now we again expand along the second column. All terms but the third are zero, and the third term gives

$\displaystyle -1\left\vert\begin{matrix}
0 & -3 & -1 \cr
3 & 0 & 5 \cr
1 & 5 & 0 \cr\end{matrix}\right\vert = 30.$

Example: Find the determinant of the matrix

$\displaystyle A = \left(\begin{matrix}
1 & 0 & 2 & -1 \cr
3 & 0 & 0 & 5 \cr
2 & 1 & 4 & -3 \cr
1 & 0 & 5 & 0 \cr\end{matrix}\right).$

We row-reduce the matrix to ``upper triangular'' form; that is, a form in which all the entries below the main diagonal are zero. First we add multiples of row 1 to the other rows to make all but the first entry in the first column equal to zero. This does not change the determinant.

$\displaystyle \left(\begin{matrix}
1 & 0 & 2 & -1 \cr
0 & 0 & -6 &8 \cr
0 & 1 & 0 & -1 \cr
0 & 0 & 3 & 1 \cr\end{matrix}\right).$

Now we interchange rows 2 and 3. This changes the sign of the determinant and we need to remember this.

$\displaystyle \left(\begin{matrix}
1 & 0 & 2 & -1 \cr
0 & 1 & 0 & -1 \cr
0 & 0 & -6 &8 \cr
0 & 0 & 3 & 1 \cr\end{matrix}\right).$

The second column now has all zeroes below the main diagonal, so we add a multiple of row 3 to row 4 to take care of the third column.

$\displaystyle \left(\begin{matrix}
1 & 0 & 2 & -1 \cr
0 & 1 & 0 & -1 \cr
0 & 0 & -6 &8 \cr
0 & 0 & 0 & 5 \cr\end{matrix}\right).$

Now it is easy to compute the determinant of an upper triangular matrix; we just keep expanding along the first column, so all the terms but the first are zero:

$\displaystyle \left\vert\begin{matrix}
1 & 0 & 2 & -1 \cr
0 & 1 & 0 & -1 \cr
0 ...
...rt =
\left\vert\begin{matrix}
-6 &8 \cr
0 & 5 \cr\end{matrix}\right\vert = -30.$

But remember we interchanged two rows, which changes the sign of the determinant, so

$\displaystyle det(A) = 30.$

Exercise 1   For each of the following matrix products, state whether the product is defined, and if it is, what the dimensions of the product will be. You do not have to do the multiplication.

$\displaystyle \left(\begin{array}{cc} 3 & 2 \\  1 & 4
\end{array}\right)
\left(\begin{array}{ccc} 5 & -1 & 0 \\  2 & 5 & 1
\end{array}\right)
$

$\displaystyle \left(\begin{array}{ccc} 5 & -1 & 0 \\  2 & 5 & 1
\end{array}\right)
\left(\begin{array}{cc} 3 & 2 \\  1 & 4 \\  5 & -2
\end{array}\right)
$

$\displaystyle \left(\begin{array}{cc} 2 & 4 \\  1 & 3 \\  5 & 1
\end{array}\right)
\left(\begin{array}{ccc} 1 & 0 & 2 \\  5 & 3 & 6
\end{array}\right)
$

$\displaystyle \left(\begin{array}{ccc} 9 & 5 & 2 \\  4 & -4 & 1
\end{array}\rig...
...ft(\begin{array}{ccc} 5 & 6 & 5 \\  3 & 6 & 1 \\  0 & 0 & 0
\end{array}\right)
$

$\displaystyle \left(\begin{array}{cc} a & b \\  c & d \\
\end{array}\right)
\left(\begin{array}{c} x \\  y
\end{array}\right)
$

Exercise 2   Carry out the following matrix multiplications.

$\displaystyle \left(\begin{array}{cc} 1 & 2 \\  -2 & -4
\end{array}\right)
\left(\begin{array}{cc} 3 & -2 \\  1 & 1
\end{array}\right)
$

$\displaystyle \left(\begin{array}{cc} 1 & 2 \\  -2 & -4
\end{array}\right)
\left(\begin{array}{cc} 9 & 4 \\  -2 & -2
\end{array}\right)
$

$\displaystyle \left(\begin{array}{cc} 3 & 1 \\  5 & 4
\end{array}\right)
\left(\begin{array}{cc} 8 & 9 \\  1 & 2
\end{array}\right)
$

$\displaystyle \left(\begin{array}{cc} 8 & 9 \\  1 & 2
\end{array}\right)
\left(\begin{array}{cc} 3 & 1 \\  5 & 4
\end{array}\right)
$

$\displaystyle \left(\begin{array}{ccc} 3 & 2 & 1 \\  4 & 9 & 8
\end{array}\righ...
...ray}{ccc} x & y & z \\  x^2 & y^2 & z^2 \\  x^3 & y^3 & z^3
\end{array}\right)
$

Exercise 3   Find inverses for all of the following matrices that are invertible.

$\displaystyle \left(\begin{array}{ccc} 1 & 2 & 1 \\  2 & 3 & 3 \\  4 & 9 & 6
\end{array}\right)$

$\displaystyle \left(\begin{array}{ccc} 1 & 2 & 1 \\  2 & 3 & 3 \\  4 & 7 & 5
\end{array}\right)$

$\displaystyle \left(\begin{array}{ccc} 9 & 3 & -3 \\  0 & -2 & 1 \\  -2 & 1 & 1
\end{array}\right)$

$\displaystyle \left(\begin{array}{cccc} 2 & 0 & 0 & 0 \\  0 & 0 & 1 & 0 \\  0 & 1 & 0 & 0 \\  0 & 1
& 1 & 1
\end{array}\right)$

$\displaystyle \left(\begin{array}{cccc} 3 & 5 & 2 & 7 \\  3 & 5 & 2 & 7 \\  11 & 4 & 3 & 15 \\  -4
& 5 & 19 & 3
\end{array}\right)$

Exercise 4   Solve each of these systems of simultaneous linear equations. (Hint: Convert to a matrix equation $ AX=B$, and check for the matrix $ A$ in the preceding exercise.)

$\displaystyle x + 2y + z = 3$

$\displaystyle 2x + 3y + 3z = 3$

$\displaystyle 4x + 9y + 6z = 3$

$\displaystyle $

$\displaystyle x + 2y + z = 1$

$\displaystyle 2x + 3y + 3z = 3$

$\displaystyle 4x + 9y + 6z = 9$

$\displaystyle $

$\displaystyle x + 2y + z = 6$

$\displaystyle 2x + 3y + 3z = 12$

$\displaystyle 4x + 9y + 6z = -3$

$\displaystyle $

$\displaystyle x + 2y + z = 0$

$\displaystyle 2x + 3y + 3z = 0$

$\displaystyle 4x + 7y + 5z = 0$

Exercise 5   Does the system of simultaneous linear equations

$\displaystyle x + 2y + z = 0$

$\displaystyle 3x + 4z = 0 $

$\displaystyle 8x + 4y + 10z = 0$

have no solutions, one solution, or infinitely many solutions? How do you know?

Exercise 6   Put the matrix

$\displaystyle \left(\begin{array}{cccc} 1 & 2 & 2 & 1 \cr 0 & 2 & 0 & 0 \cr -1 & -4 & -2 & -1
\cr 1 & 4 & 4 & 1 \cr
\end{array}\right)
$

into row echelon form. Then say whether or not the determinant of this matrix is zero.

Exercise 7   Find the determinant of the matrix

$\displaystyle \left(\begin{array}{cccc} 2 &1 & 4& 8 \cr 0 & 2 & 5 &19 \cr 0 & 0 & 3 & -1
\cr 2 & 1 & 4 & 0 \cr
\end{array}\right).
$


next up previous
Next: About this document ... Up: Determinants. Previous: Determinants.
Peter Kostelec
2000-05-08