search
Search
Login
Unlock 100+ guides
menu
menu
web
search toc
close
Comments
Log in or sign up
Cancel
Post
account_circle
Profile
exit_to_app
Sign out
What does this mean?
Why is this true?
Give me some examples!
search
keyboard_voice
close
Searching Tips
Search for a recipe:
"Creating a table in MySQL"
Search for an API documentation: "@append"
Search for code: "!dataframe"
Apply a tag filter: "#python"
Useful Shortcuts
/ to open search panel
Esc to close search panel
to navigate between search results
d to clear all current filters
Enter to expand content preview
icon_star
Doc Search
icon_star
Code Search Beta
SORRY NOTHING FOUND!
mic
Start speaking...
Voice search is only supported in Safari and Chrome.
Navigate to
check_circle
Mark as learned
thumb_up
0
thumb_down
0
chat_bubble_outline
0
Comment
auto_stories Bi-column layout
settings

Introduction to Determinants

schedule Aug 12, 2023
Last updated
local_offer
Linear Algebra
Tags
mode_heat
Master the mathematics behind data science with 100+ top-tier guides
Start your free 7-days trial now!

The ultimate goal of this chapter is to derive the relationship between matrix invertibility and determinant. Unfortunately, we cannot dive straight into their proofs just yet - we will first need to derive a series of basic properties of determinants.

Definition.

Determinant of a 2x2 matrix

Consider the 2×2 matrix A below:

A=(abcd)

The determinant of A is defined as:

det(A)=adbc

The determinant of A is sometimes also written as:

det(A)=|abcd|

Note that there exists a more general definition of determinants that applies to a square matrix of any size. We will cover this later in this guide.

Example.

Computing the determinant of a 2x2 matrix (1)

Compute the determinant of the following matrix:

A=(2143)

Solution. The determinant of A is:

det(A)=(2)(3)(1)(4)=2

Later in the chapter, we will go over what it means for det(A)=2. Specifically, we will cover:

  • the geometric interpretation behind determinants.

  • the relationship between determinant and invertibility.

Example.

Computing the determinant of a 2x2 matrix (2)

Compute the following determinant:

|1523|

Solution. The determinant is:

|1523|=(1)(3)(5)(2)=7
Definition.

Minor and cofactor of an entry

Suppose A is a square matrix. The minor Mij of an entry aij is defined as the determinant of the matrix that remains after removing the row and column that contains aij. The cofactor Cij of an entry aij is defined as (1)i+jMij.

Example.

Computing the minor and cofactor

Consider the following matrix:

A=(214431102)

Compute the minor and cofactor of the green and red entries.

Solution. To compute the minor of the green entry, we first must ignore the row and column (colored in blue below) that holds this entry:

A=(214431102)

The determinant of the remaining sub-matrix is:

M11=|3102|=(3)(2)(1)(0)=6

Therefore, the minor of the green entry is 6. Since the green entry is located at the 1st row 1st column, its cofactor is:

C11=(1)1+1M11=(1)2(6)=6

Next, let's find the minor and cofactor of the red entry. We ignore the following values in blue:

A=(214431102)

The minor of the red entry is the determinant of the sub-matrix:

M32=|2441|=(2)(1)(4)(4)=14

The cofactor of the red entry is:

C32=(1)3+2M32=(1)5(14)=14

Notice how the cofactor of an entry is identical to the minor of that entry except that their sign might be different depending on the position of the entry in the matrix. The following theorem is useful for keeping track of the sign.

Theorem.

Checkerboard pattern of signs

The relationship between the signs of the cofactor and minor of an entry is described by the checkerboard pattern of signs shown below:

(++++++++)

For instance, for the entry a22, no sign flip occurs and hence its cofactor is equal to its minor. However, for the entry a23, the cofactor and minor have opposite signs.

Proof. By definitionlink, the cofactor of the entry aij is equal to the minor of aij multiplied by (1)i+j. This means that for the top-left entry a11, the associated sign is positive because (1)1+1=1. As we move along the row or column, the value alternates between positive and negative, which gives us the checkerboard pattern of signs. This completes the proof.

Definition.

Cofactor expansion along a row or column

Suppose we have an n×n matrix A. The cofactor expansion along the i-th row is defined as:

Crow=i=ai1Ci1+ai2Ci2++ainCin

Where Ci1 is the cofactor of the entry in the i-th row 1st column.

The cofactor expansion along the j-th column is defined as:

Ccol=j=a1jC1j+a2jC2j++anjCnj
Example.

Performing the cofactor expansion along a row or column

Consider the following matrix:

A=(132130212)

Perform the following:

  • cofactor expansion along the 1st row.

  • cofactor expansion along the 1st column.

  • cofactor expansion along the 2nd row.

Solution. The cofactor expansion along the 1st row is:

Crow=1=a11C11+a12C12+a13C13=1|3012|3|1022|+2|1321|=1(60)3(20)+2(16)=10

Remember our checkerboard pattern of signs - this is why we see a negative for the second term!

The cofactor expansion along the 1st column is:

Ccol=1=a11C11+a21C21+a31C31=1|3012|1|3212|+2|3230|=1(60)1(62)+2(06)=10

The cofactor expansion along the 2nd row is:

Ccol=2=a21C21+a22C22+a23C23=1|3212|+3|1222|0|1321|=1(62)+3(24)0(16)=10

Notice how all of these cofactor expansions result in the same value! As we shall prove at the very end of this chapter, the cofactor expansion along any row or column is equal 🤯!

Definition.

General definition of determinants

If A is an n×n matrix, then the determinant of A is defined as the cofactor expansion along the first row:

det(A)=a11C11+a12C12++a1nC1n

Where:

  • a1n is the entry in the 1st row n-th column of A.

  • C1n is the cofactor of the entry a1n.

As we have demonstrated in the previous example, the determinant can actually be computed using cofactor expansion along any row or column. Again, we will prove this later in the chapter!

Example.

Computing the determinant of a 3x3 matrix

Compute the determinant of the following matrix:

A=(214431102)

Solution. The determinant of A is:

det(A)=a11C11+a12C12+a13C13=2|3102|1|4112|+4|4310|=2(60)1(81)+4(03)=7
Example.

Deriving the definition of 2x2 determinant

Suppose we have the following 2×2 matrix:

A=(abcd)

We have previously stated that the definition of the determinant of this 2×2 matrix is:

det(A)=adbc

Let's derive this definition ourselves using the general definition of determinant. The determinant is defined as the cofactor expansion along the first row:

det(A)=aC11+bC12=adet(d)bdet(c)=adbc
Theorem.

Determinant is equal to the cofactor expansion along the first column

We have originally defined the determinant to be equal to the cofactor expansion along the first row. The determinant is also equal to the co-factor expansion along the first column.

Proof. We will prove this by induction. We first must show that the proposition holds for the 2×2 case.

A=(a11a12a21a22)

The cofactor expansion along the first row is:

Crow=1=a11det(a22)a12det(a21)=a11a22a12a21

Remember, this is equal to det(A) as per the definition of determinant. The cofactor expansion along the first column is:

Ccol=1=a11det(a22)a21det(a12)=a11a22a21a12

Therefore, the cofactor expansion along the first row and that along the first column are equal! This means that we can use the cofactor expansion along the first column to compute the determinant as well.

Now, in a typical proof by induction, we will assume that the proposition holds for the n1×n1 case and show that the proposition holds also for the n×n case. However, one of the problems about working with the general case is that the notation becomes convoluted and obscures the essence of the proof - this is precisely why almost all introductory linear algebra books avoid this proof. The approach we will take here is to consider the simple 3×3 case but we will attempt to make general claims during our proof.

Consider the following 3×3 matrix:

A=(a11a12a13a21a22a23a31a32a33)

The cofactor expansion along the first row and the cofactor expansion along the first column are:

(1)det(A)=Crow=1=a11|a22a23a32a33|a12|a21a23a31a33|+a13|a21a22a31a32|Ccol=1=a11|a22a23a32a33|a21|a12a13a32a33|+a31|a12a13a22a23|

Our goal is to show the following:

det(A)=Crow=1=Ccol=1

Notice how the first terms in (1) are equal. Therefore, let's ignore the first term - our goal now is to show the equivalence between the following:

(2)Crow=1=a12|a21a23a31a33|+a13|a21a22a31a32|Ccol=1=a21|a12a13a32a33|+a31|a12a13a22a23|

We express the determinants using the following notation:

(3)Crow=1=a12det(A12)+a13det(A13)
(4)Ccol=1=a21det(A21)+a31det(A31)

Where A12 represents a sub-matrix with 1st row and 2nd column removed from the original matrix A. The inductive assumption is that the cofactor expansion along the first row is equal to the cofactor expansion along the first column for the 2×2 case. We will use this assumption in the very next step.

Let's start by focusing on Crow=1. We compute the first determinant in (3) by cofactor expansion along the first column:

(5)a12det(A12)=a12|a21a23a31a33|=a12(a21|a33|a31|a23|)=a12[a21det(A12,21)a31det(A12,31)]=a12a21det(A12,21)+a12a31det(A12,31)

Here, A12,21 represents the sub-matrix in which the following two pairs of rows and columns are removed from A:

  • the 1st row and 2nd column.

  • the 2nd row and 1st column.

Visually, the sub-matrix (the non-colored term) looks like the following:

A12,21=(a11a12a13a21a22a23a31a32a33)

Notice how if we were to perform cofactor expansion to find the other terms in (3) as we did in (5), the terms with the specific combination a12a21 and a12a31 will only appear once in (3). This also means that their corresponding determinants det(A12,21) and det(A12,31) will also appear once in (3). In general, the following form will only appear in (3) once:

(6)a1jai1det(A1j,i1)

Let's now move on to Ccol=1 in (4). Once again, let's focus on the first determinant - but this time, we perform cofactor expansion along the first row:

(7)a21|a12a13a32a33|=a21[a12det(A21,12)a13det(A21,13)]=a21a12det(A21,12)+a21a13det(A21,13)

The same idea holds here - if we were to perform cofactor expansion on the other terms in (4) as we did in (7), the terms with the combination a21a12 and a21a13 will only appear once in (4). In general, the following form will appear in (4) once:

(8)ai1a1jdet(Ai1,1j)

This is similar to (6) - except that we have det(A1j,i1) in (6) but det(Ai1,1j) in (8). We now show that these two determinants are equal.

Recall that A1j,i1 represents the sub-matrix after the following row/column removal from A:

  • removing row 1 and column j first.

  • removing row i and column 1 after.

The ordering by which we perform the above removal does not matter. This means that the above sub-matrix A1j,i1 is equal to the sub-matrix obtained by:

  • removing row i and column 1 first.

  • removing row 1 and column j after.

This sub-matrix is Ai1,1j. Therefore, we conclude that:

(9)A1j,i1=Ai1,1j

Let's now go over some examples to demonstrate (9). The sub-matrix A21,12 is equal to A21,12 as shown below:

A12,21=(a11a12a13a21a22a23a31a32a33)=(a11a12a13a21a22a23a31a32a33)=A21,12

Here's an example for the 4×4 case:

A13,21=(a11a12a13a14a21a22a23a24a31a32a33a34a41a42a43a44)=(a11a12a13a14a21a22a23a24a31a32a33a34a41a42a43a44)=A21,13

Now taking the determinant of both matrices in (9) gives:

det(A1j,i1)=det(Ai1,1j)

Therefore, we can now equate (6) and (8) to get:

(10)a1jai1det(A1j,i1)=ai1a1jdet(Ai1,1j)

Remember, the number of times the left-hand side of (10) appears in Crow=1 in (3) and the number of times the right-hand side of (10) appears in Ccol=1 in (4) are the same. Therefore, we conclude that:

Crow=1=Ccol=1

It then follows that:

det(A)=Crow=1=Ccol=1

Again, we have managed to prove our proposition for the 3×3 case but the flow of the proof for the general case is very similar. This completes the proof.

robocat
Published by Isshin Inada
Edited by 0 others
Did you find this page useful?
thumb_up
thumb_down
Comment
Citation
Ask a question or leave a feedback...
Cookie Policy
close
By using our site, you acknowledge that you agree to our Privacy Policy and Terms and Conditions.