Lecture 19 · Determinant formula and algebraic cofactor
Master the large formulas of determinants and algebraic cofactor expansions.
On this page
Determinant formulas and cofactors | Gilbert Strang | MIT 18.06 Linear Algebra
Lecture 19 / Total 35 Lectures |Part 2 · Orthogonality and Determinant
Video of this lecture: Bilibili p19 · Determinant formula and algebraic cofactor ↗(53:17)| MIT OCW official page ↗
Illustration: MIT OCW 18.06SC official lecture summary (CC BY-NC-SA 4.0) and Bilibili classroom video frames (time stamped), about 10 frames per lecture.
Introduction to this lecture
What was given in the previous lecture is determinant (determinant) three defining properties: the determinant of the identity matrix is ; Swapping two rows, the determinant changes sign; when the remaining rows are fixed, the determinant is linear for a certain row. Ten properties can be derived from these three, including the most unexpected with . But those ten properties never answered the most basic question: given a The number table, how to calculate this number? This lecture makes up for this formula - it doesn’t look good when written out, so it is not laid out at the beginning of the course. Determinant is just a small topic in the entire course, and the course arranges three lectures for it: the previous lecture establishes rules (three properties), this lecture teaches algorithms (two sets of formulas), and the next lecture uses this set of formulas. What this lecture aims to accomplish is to turn the determinant from “a set of abstract properties” into “a number that can really be calculated”.
This lecture presents two sets of interrelated algorithms. big formula (big formula) write the determinant as Sum of terms: Each term is multiplied by one element from each row and column, and then assigned a positive or negative sign according to whether the permutation corresponding to the term is an even permutation or an odd permutation. algebraic cofactor (cofactor) Change the formula in another direction: expand along any line, and The determinant of a The combination of determinants can be reduced level by level until . These two sets of formulas are deduced from the three properties in the previous lecture and are not new assumptions.
Used at the end of this lecture tridiagonal matrix (tridiagonal matrix) Using two sets of formulas at the same time, the results obtained are unexpected: Order tridiagonal complete The determinants of the matrix are in turn , and then use Repeat for the cycle. So far in this lecture, there are three ways to calculate the determinant: multiply the pivot components after elimination, expand the large formula, and use algebraic cofactor recursion.

MIT OCW Official Lecture Notes Summary Page 1/3 (18.06SC Lecture 19 Summary, CC BY-NC-SA 4.0).
1. Deduced from the three properties formula
determinant of Everyone remembers it, but the process of deriving it step by step from the three properties is the method that can be extended to any order.
First write down the three properties clearly. First, . Second, swap the two rows and only change the sign of the determinant. Third, fix the remaining rows, and the determinant is linear for a certain row: if the row is written as the sum of two vectors, the determinant is equal to the sum of the two determinants; if the whole row is multiplied by , the determinant is also multiplied by . This property can be broken down into two independent things - “split a row in half and then sum it” and “put the common factor of a row outside the determinant”, both of which will be used in the derivation.
It should also be emphasized that linearity refers to a single row, and the entire matrix cannot be disassembled by rows and columns at the same time. Precisely because you can process one line at a time, you can The determinant of is transformed into the sum of many simple terms layer by layer.
Ask now
Fixed second row , split the first line into , the sum of two determinants can be obtained from property three:
Then use property three once for each of these two items, this time fixing the first line and splitting the second line:
There are two columns with zeros in the four small blocks, and the determinant is zero - one column is all zeros, indicating that the columns are linearly related and the matrix is singular. Of the remaining two items, is a diagonal matrix, consisting of three properties , Take them out from the two rows respectively, leaving the identity matrix, so its determinant is . For another item, use property 2 and swap the two lines:
Together it is
The key to the method is to split each row into the sum of vectors that “leave only one position”. When each row is divided into two pieces, a total of item; When each line is split into films, total item. The number of items has grown extremely horribly, but most items are directly invalidated because they have zero columns, and there are very few real survivors.

Video 00:05:20|Approximately corresponding to Section 1 “1. Deduced from the three properties formula” near.
2. Survivors: one from each row and column
Use the method : Each row is divided into three pieces, a total of item. Specifically, this The item is The determinant of a matrix, each matrix only retains a number in one position in each row, and the remaining positions are all zeros; From “Each row has three positions to choose from”.
Which terms are not zero? As long as a certain column is not fetched from the beginning to the end, this item has a whole column of zeros and the determinant is zero. Therefore, the non-zero entries must be satisfied - one element is taken from each row and each column is taken exactly once. For example, diagonal terms is the survivor item; and “the first line takes , also take the second line “In that item, there must be a column that has never been retrieved and is set to zero, which is directly invalidated.
Just write it with double subscripts to make it clear. Each surviving item of is of the form
Among them is A certain arrangement of: the three column numbers are different from each other, and each is used once. This arrangement has , so there are exactly six surviving items. For example, identity arrangement gives the diagonal term , arrange given .
The symbol for each term comes from “the matrix that’s left after pulling the numbers out of the rows.” to arrange For example, take away , , Then there is exactly one left in each row and each column of permutation matrix(permutation matrix):
Its determinant is , because by exchanging two rows, the identity matrix is obtained, and the sign is changed once. Number all six arrangements according to “how many exchanges are needed to restore the natural order”, and you will get the complete Formula:
Check symbols item by item: After the exchange, the two characters return at once. , take the negative; Swap the first two digits once and take the negative; Swap it twice (first swap the first and last digits, then swap the last two digits) and get the positive value; Swap twice and get the positive result; Just swap the head and tail once and take the negative. Three positive terms and three negative terms, each accounts for exactly half.
Here is a widely circulated graphics mantra: The determinant of is equal to the sum of the products of the three “downslope” directions minus the sum of the products of the three “upslope” directions. This formula can only be used for . Arrived , the terms in the subdiagonal direction do not all have negative signs: if a The subdiagonals of the matrix are all , the rest of the positions are all , its determinant is , because by exchanging the first row and the fourth row, and then exchanging the second row and the third row (a total of two exchanges), the identity matrix is obtained, and the two sign changes cancel each other out. The symbol must be determined by the odd or even number of exchanges, and cannot be recorded by the direction of the slash.

Video 00:12:38 | Approximately corresponding to section 2 “2. Survivor items: take one from each row and each column”.
3. Big formula
put , The model is extended to , we get the main result of this lecture:
here Take all over of all an arrangement, Express Restore to the required number of row swaps, This is the symbol for this item.
Let’s write it down: When the big formula is only items,
The positive-signed term comes from the identity permutation, and the negative-signed term comes from the permutation that has been exchanged once. The derivation of the knot is completely consistent.
Why is the number of terms ? Because the elements of the first row can be obtained from Select any column. Once selected, this column will be used; the second row can only be selected from the remaining Column selected; third row remaining A selection method; if this continues, the elements in the last row have no choice but to fall into the only remaining column. Just multiply it . This also happens to be the number of arrangements for “take one from each row and column”. Yes items, Yes items, Yes items, Yes items, That’s it item.
Positive terms and negative terms each account for half ( time), because by swapping two positions in any arrangement, another arrangement with opposite parity will be obtained, and the two will be paired one by one.
Check the identity matrix with the big formula: Most of the elements in are zero. Except for the identity arrangement, every item disappears because it contains zero factors; the only one that survives is , while the identity permutation requires zero exchanges and has a positive sign. So , consistent with the first of the three properties. In the same way, the other two properties can also be deduced from the big formula; even In principle, it can also be proved by it, but we just need to Unfolding all the elements would be a huge workload, and the course will not take this path. The fact that the determinant is invariant to the transposition is easy to see from the big formula, because the transposition just changes the reading of “take one from each row and each column”.
The actual value of the big formula depends on how many zeros are in the matrix. watch one Example:
is , a total of item. A detailed inspection reveals that only two items are non-zero:
- arrange , that is, the subdiagonal, the product ;it requires two swaps(, ) can be restored, the sign is positive, and the contribution .
- arrange , the product is also ;Exchange once () can be restored, the sign is negative, and the contribution .
The rest The terms all have zero factors and are all zero. So
Determinant is zero explanation Strange, this matter is also very clear from the lines: the first line plus the third line gives , the second row plus the fourth row are also , so
Rows are linearly related. This example demonstrates on the one hand How the term is generated also explains the cost of the big formula: With just a few more non-zero elements, the number of items to check will double. In actual calculations, elimination is the more labor-saving method.

Video 00:20:15 | Approximately corresponding to Section 3 “3. Big Formula”.

MIT OCW Official Lecture Notes Summary Page 2/3 (18.06SC Lecture 19 Summary, CC BY-NC-SA 4.0).

Video 00:26:50 | Approximately corresponding to Section 3 “3. Big Formula”.
4. Algebraic cofactors
The large formula is written in a “spread” way. You can regroup according to which element is taken from the first row to get a “dimensionality reduction” way of writing. This section The six items of are grouped by the first row:
Each bracket encloses all items that use that row element. Look at the first bracket: It happens to be what remains after deleting the first row and column Determinant of a matrix. This is no coincidence - the first row and column have been used, the remaining elements can only be in the line and order Take one from each row and each column in the column, and all combinations of “take one from each row and each column” are exactly the determinants of that small matrix.
Generally, delete the first Row, No. obtained after column The determinant of a matrix is called of Yuzi style (minor), recorded as ; Then add symbols according to the position, and it is algebraic cofactor
The notation rules are Take positive for even numbers and negative for odd numbers. The three brackets correspond in sequence to , , : indeed there is . Looking along the first line the symbols are ; When switching to the second line, it starts with the negative sign and becomes . The entire symbol table is a checkerboard:
So get algebraic cofactor formula: along the first row expansion,
This line can be any line. The reason is directly related to the big formula: each item of the big formula takes exactly one element in each row, and all the elements are taken according to “which column is taken in this row” Items are divided into Group, No. The group happens to be Multiplied by the selection of all remaining positions, that is , the sum is the above formula. Note Just rely on deleting the first Row, No. The remaining elements after the column are the same as the Row, No. The numbers in the columns are irrelevant, so when the numbers in a row are replaced, the algebraic cofactors in this row remain unchanged. Since the determinant and transpose have the same value, expansion along any column is also true. In this case, that column should be regarded as the corresponding row of the transposed matrix.
Check with the world’s smallest example: When expanded along the first line, (Delete the first row and first column, leaving only ), (remaining after deletion) , while position sign is negative), then
Same as before.
The significance of the algebraic cofactor is that it The order problem becomes a order problem, and then becomes Steps, all the way down to the bottom. Because of this, it can be used as another starting point for determinant theory: first define , then use stage definition level, can also establish a whole set of theories. Of course, when actually developing it, you have to choose The row or column with the most, because the terms multiplied by zero don’t even have to be counted.
So far, there are three ways to calculate the determinant, and their respective “complexity distributions” are very different. On the road of elimination, all the complexity is pressed into the pivot element, and the determinant is equal to the product of all pivot elements - this is what I said in the previous lecture pivot formula, and finally only need to multiply the principal components. The process is efficient and clean, and it is the real way to use numerical calculations. The big formula spreads out all the complexity into Each item is simple, but the number of items is exploding. The algebraic cofactors are centered: each term is “an easy coefficient multiplied by a more difficult subdeterminant”, layer by layer. All three count the same number.

Video 00:34:38|Approximately corresponding to Section 4 “4. Algebraic cofactors”.

Video 00:41:14|Approximately corresponding to Section 4 “4. Algebraic cofactors”.
5. Example: Tridiagonal sum determinant of matrix
Finally, a complete example is used to run through the algebraic cofactor formula. Set is of tridiagonal matrix: The main diagonal and the two sub-diagonals immediately above and below it are all , the rest of the positions are all . time is
Start with the smallest ones. , . The two rows of are the same. If the determinant of the two rows is swapped, the sign will change but the matrix will remain unchanged. Therefore ;It counts directly as well .
A little more troublesome. Using the large formula, only three of the six permutations give a non-zero product: Contribute , Contribute , Contribute , the other three all got a certain . Together .
Check it in another way, and demonstrate the combination of elimination and algebraic cofactors. Subtract the third row from the second row, leaving the determinant unchanged:
Now expand along the second row: this row has only one non-zero element positional , the remaining two There is no need to multiply any number. The symbol for this position is , the cofactor obtained by deleting the second row and the first column is , so the contribution is , consistent with the above.
Arrived , expanded along the first row, only the first two of the four positions are , the last two are , zero-multiplied terms are not worth expanding.
first one in , the sign is positive, and what remains after deleting the first row and first column is exactly , this contribution .
second in , the sign is negative, after deleting the first row and second column, we get
The first column of only The location is , expansion along this column only needs to count one item, and the sign is positive; the remainder after deletion block is , exactly . So , the second contribution is .
thus
The same expansion holds for any order: along The first row of is expanded and the first term gives , the second term gives , the remaining terms are zero, so
This recursion starts from Begin to be established; if agreed , then when it also gives , consistent with the previous calculation.
Write out the sequence: . Continue with the recursive calculation:
The sequence becomes , with Repeat for the cycle. You don’t have to count all the way through to see the cycle: the recursion relies only on the first two terms, so as long as a certain pair of adjacent values recurs, the rest will repeat itself. here , , the combination of adjacent two items returns to the starting point, and thereafter each item is related to Same as before.
This periodicity is completely invisible from the matrix itself. It only emerges when the recursion is written out. With it, any subscript can immediately find the result: , so
The value of this example does not lie in calculating a specific number, but in showing a complete path: large formulas or eliminations are used to deal with small orders, the algebraic cofactors give recursion, and the recursion reveals the overall law.

Video 00:47:58|Approximately corresponding to Section 5 “5. Example: Tridiagonal Complete “near the determinant of the matrix”.

MIT OCW Official Lecture Notes Summary Page 3/3 (18.06SC Lecture 19 Summary, CC BY-NC-SA 4.0).
Summary of this lecture
- The three defining properties of determinants are: , swap two lines to change signs, and linearize a certain line while fixing the remaining lines. put Split each row into two pieces (total items), the two items in the zero column disappear, leaving with , get .
- Survivor items One element must be taken from each row and column, and its column number constitutes an replacement(permutation); Yes The sign of the term is determined by the odd or even number of exchanges required to restore the natural order.
- The six items are: , , Take positive and the other three take negative. The diagonal direction formula only applies to ; The full subdiagonal of The matrix determinant is , because the two exchanges offset the symbols.
- big formula: , a total of terms, half positive and half negative; the number of terms is It’s because the first line has Kind of selection method, the second line is left species, and so on. Use it to verify Just look at the identity permutation.
- of - Example of Only two of the terms are nonzero: Contribute , Contribute , so ;This is related to the row mutual confirmation.
- algebraic cofactor , among which is to delete the first line of work behind the column Yuzi style;Symbol press The odd and even numbers are distributed in a checkerboard pattern.
- algebraic cofactor formula: along any line (or by along any column), , put transformed into level; Immediately .
- There are three ways to calculate the determinant: multiply the pivot components after elimination, and expand the large formula ( term), use algebraic cofactor recursion (easy coefficients multiplied by more difficult small determinants).
- three diagonals The matrix satisfies , the sequence is And with is a period, therefore .
keywords
| English | Chinese | One sentence explanation |
|---|---|---|
| determinant | determinant | by The number determined by the number table satisfies the three defining properties |
| big formula | big formula | Write the determinant as The sum of terms, taking one element from each row and column of each term |
| permutation | replacement | Arrive A rearrangement of determines the column number of an item in a large formula |
| parity of a permutation | Permuted parity | The odd or even number of exchanges required to restore the natural order determines the sign of the item |
| permutation matrix | permutation matrix | Exactly one per row and column is a matrix whose determinant is |
| minor | Yuzi style | Delete the first line of work The determinant of the resulting matrix after the columns |
| cofactor | algebraic cofactor | The co-factor with the sign, |
| cofactor formula | algebraic cofactor formula | Expand along a row: , put transformed into level |
| linearity in one row | single line linear | When the remaining rows are fixed, the determinant can be added to a certain row and constant factors can be proposed. |
| tridiagonal matrix | tridiagonal matrix | A matrix with only the main diagonal and two adjacent sub-diagonals being non-zero |
| pivot formula | pivot formula | The determinant is equal to the product of all the pivots obtained by elimination |
Machine-assisted translation · Read Chinese original
