Determinant Formulas and Cofactors¶
Now that we know the properties of the determinant, it's time to learn some(rather messy) formulas for computing it.
Formula for the Determinant¶
We know that the determinant has the following three properties:
- Exchanging rows reverses the sign of the determinant.
- The determinant is linear in each row separately.
Last class we listed seven consequences of these properties. We can use these ten properties to find a formula for the determinant of a 2 by 2 matrix:
By applying property 3 to separate the individual entries of each row we could get a formula for any other square matrix. However, for a 3 by 3 matrix we'll have to add the determinants of 27 different matrices! Many of those determinants are zero. The none-zero pieces are:
Each of the non-zero pieces has one entry form each row in each column, as in a permutation matrix, Since the determinant of a permutation matrix is either 1 or -1, we can again use the property 3 to find the determinants of each of these summands and obtain our formula.
One way to remember this formula is that the positive terms are products of entries going down and to the right in our original matrix, and the negtive terms are products going down and to the left. This rule of thumb doesn't work for matrices larger than 3 by 3.
The number of parts with non-zero determinants was
- 2(
), in 2 by 2 case, - 6(
), in 3 by 3 case, - 24(
), in 4 by 4 case.
This is because there are n ways to choose an element from the first row(i.e. a value for
The big formula for computing the determinant of any square matrix is:
where
Applying the method of elimination and multiplying the diagonal entries of the result (the pivots) is another good way to find the determinant of a matrix.
Example¶
In a matrix with many zero entries, many terms in the formula are zero. We can compute the determinant of:
by choosing a non-zero entry from each row and column, multiplying those entries, giving the product the appropriate sign, then adding the results.
The permutation corresponding to the diagonal running from
Another non-zero term of of
These are the only two non-zero terms in the sum, so the determinant is 0. We can confirm this by noting that row 1 minus row 2 plus row 3 minus row 4 equals zero.
Cofactor formula¶
The cofactor formula rewrites the big formula for the determinant of an n by n matrix in terms of the determinants of smaller matrices.
In the 3 by 3 case, the formula looks like:
This comes from grouping all the multiples of cofactors
in the parentheses following it. Note that each cofactor is (plus or minus) the determinant of a 2 by 2 matrix. That determinant is made up of products of elements in the rows and columns NOT containing
In general, the cofactor
For n by n matrices, the cofactor formula is:
Applying this to a 2 by 2 matrix gives us:
Tridiagonal Matrix¶
A tridiagonal matrix
is one for which the only non-zero entries lie on or adjacent to the diagonal. For example, the 4 by 4 triagonal matrix of 1's is:
What is the determinant of an n by n triagonal matrix of 1's?
In fact,