MATH 133 Linear Algebra and Geometry • McGill University, Montreal

Revision sheet: determinants, cofactor expansion and row operations (MATH 133)

This sheet is not a summary of section 3.1 of Nicholson: you already have the course notes. It answers one question only, what makes students lose marks on determinants in MATH 133 at McGill University, and which precise gesture avoids each loss.

Almost every lost mark on this chapter is a bookkeeping error, not a conceptual one: a sign read from the wrong cell of the checkerboard, a swap that was made and never written down, a factor that left the determinant and never came back. The method below is therefore mostly a way of WRITING: choose the line before computing, and record every row operation with its effect on the determinant, one line at a time.

The thread of the chapter

A determinant is never computed by brute force: either you expand along the line that already holds the zeros, or you MAKE the zeros with row operations and keep a ledger of what each one did, a sign for a swap, a factor for a scaling, nothing for a replacement. And the sign of a cofactor belongs to the POSITION, never to the entry.

This chapter is part of MATH 133, Linear Algebra and Geometry (McGill)

The essentials

Minor, cofactor, and the sign that belongs to the position

  • • Minor MijM_{ij}: the determinant of the matrix left once row ii and column jj are deleted.
  • • Cofactor Cij=(−1)i+jMijC_{ij} = (-1)^{i+j}M_{ij}. The sign depends on i+ji + j only: even gives ++, odd gives −-. The value of aija_{ij} plays no part.
  • • Expansion along row ii: det⁡A=ai1Ci1+ai2Ci2+⋯+ainCin\det A = a_{i1}C_{i1} + a_{i2}C_{i2} + \dots + a_{in}C_{in}. The same formula holds down any column, and every line gives the SAME number.
  • • 2×22 \times 2: det⁡(abcd)=ad−bc\det\begin{pmatrix} a & b \\ c & d \end{pmatrix} = ad - bc. Triangular, upper or lower: the product of the diagonal entries.
+−+−+−+−+row 1row 2row 3row 2 reads −, +, −the diagonal is always +sign at (i, j): (−1) to the power i + j
Row 22 of every matrix starts with a MINUS, and so does column 22: reciting +,−,++, -, + is right only on rows 11 and 33 of a 3×33 \times 3.

Before expanding along a line, write its signs above it, read from the checkerboard. It takes three seconds and removes the most common error of the chapter.

The ledger: what each row operation does to the determinant

  • • Swap two rows, Ri↔RjR_i \leftrightarrow R_j: the determinant is multiplied by −1-1.
  • • Scale one row, Ri→cRiR_i \to cR_i: multiplied by cc. Read backwards, a common factor of one row comes OUT in front.
  • • Replacement, Ri→Ri+cRjR_i \to R_i + cR_j with j≠ij \neq i: unchanged. The replaced row must keep the coefficient 11.
  • • Zero row, zero column, two equal or proportional rows: the determinant is 00.
  • • det⁡(AT)=det⁡A\det(A^{T}) = \det A, so every rule above holds for COLUMNS too. And det⁡(kA)=kndet⁡A\det(kA) = k^{n}\det A for an n×nn \times n matrix.

Between two consecutive matrices of a reduction, always write an equality sign and the factor, for example det⁡A=−det⁡B\det A = -\det B after a swap. An arrow between matrices tells the marker nothing about the determinant.

The rules in table form

Each row reads from left to right: the assumptions, then the result. A red cell is not an answer, it is the finding that the form settles nothing and the instruction to rewrite it. Every case is followed by a worked example.

What happens to the determinant, operation by operation

Read each line with det⁡A=4\det A = 4 and AA of size 3×33 \times 3. The red lines are the rules students believe and that do not exist: they are not answers, they are the signal to go back to the ledger.

Change made to AAWritten asNew det⁡\det
swap two rows R1↔R2R_1 \leftrightarrow R_2 −det⁡A-\det A

Example: det⁡(1234)=−2\det\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix} = -2 and det⁡(3412)=2\det\begin{pmatrix} 3 & 4 \\ 1 & 2 \end{pmatrix} = 2.

scale one row R2→3R2R_2 \to 3R_2 3det⁡A3\det A

Example: 4→124 \to 12; row 22 of (1234)\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix} times 33 gives det⁡=12−18=−6\det = 12 - 18 = -6.

replacement R2→R2+2R1R_2 \to R_2 + 2R_1 det⁡A\det A

Example: (1258)\begin{pmatrix} 1 & 2 \\ 5 & 8 \end{pmatrix} has det⁡=8−10=−2\det = 8 - 10 = -2, same as (1234)\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}.

scale, then add R2→3R2−R1R_2 \to 3R_2 - R_1 3det⁡A3\det A

Example: (12810)\begin{pmatrix} 1 & 2 \\ 8 & 10 \end{pmatrix} has det⁡=10−16=−6=3×(−2)\det = 10 - 16 = -6 = 3 \times (-2).

every row times kk kAkA kndet⁡Ak^{n}\det A

Example: det⁡(2A)=23×4=32\det(2A) = 2^{3} \times 4 = 32 for a 3×33 \times 3.

transpose ATA^{T} det⁡A\det A

Example: det⁡(1324)=4−6=−2=det⁡(1234)\det\begin{pmatrix} 1 & 3 \\ 2 & 4 \end{pmatrix} = 4 - 6 = -2 = \det\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}.

sum of two matrices A+BA + B det⁡A+det⁡B\det A + \det B no such rule

Example: det⁡(I2+I2)=det⁡(2I2)=4\det(I_2 + I_2) = \det(2I_2) = 4, while det⁡I2+det⁡I2=2\det I_2 + \det I_2 = 2.

What to do: Compute the sum matrix first, then its determinant.

every row times kk kAkA kdet⁡Ak\det A no such rule

Example: For A=I3A = I_3 and k=2k = 2: det⁡(2I3)=8\det(2I_3) = 8, not 22.

What to do: Count the rows: each one contributes its own factor kk, so knk^{n}.

Only the coefficient of the row being REPLACED matters. In R2→3R2−R1R_2 \to 3R_2 - R_1 that coefficient is 33, so the ledger says ×3\times 3, however the rest of the line looks.

The mistakes that cost marks

These are the errors I correct most often in session. Each one costs marks on a paper, even when the reasoning behind it is right.

1. Reading the signs of row 2 as plus, minus, plus

the whole expansion, and every part that uses the value

What not to write

“Along row 22: det⁡A=a21M21−a22M22+a23M23\det A = a_{21}M_{21} - a_{22}M_{22} + a_{23}M_{23}.”

What to write

“Along row 22, signs −,+,−-, +, -: det⁡A=−a21M21+a22M22−a23M23\det A = -a_{21}M_{21} + a_{22}M_{22} - a_{23}M_{23}.”

Why: The sign is (−1)i+j(-1)^{i+j}, and on row 22, i+ji + j starts at 33. The wrong version gives exactly −det⁡A-\det A: on (010100001)\begin{pmatrix} 0 & 1 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 1 \end{pmatrix} it returns +1+1 instead of −1-1, and nothing in the arithmetic looks suspicious.

2. Handing in the minor where the cofactor was asked

1 mark per cofactor, and the whole expansion built on them

What not to write

“C12=det⁡(015−2)=−5C_{12} = \det\begin{pmatrix} 0 & 1 \\ 5 & -2 \end{pmatrix} = -5.”

What to write

“M12=−5M_{12} = -5, and since 1+21 + 2 is odd, C12=−M12=5C_{12} = -M_{12} = 5.”

Why: Minor and cofactor are one determinant and one sign. Writing both, in that order, costs one line and makes the sign visible to the marker. In an expansion, using M12M_{12} instead of C12C_{12} shifts the answer by twice the middle term.

3. Making a swap during the reduction and never recording it

the final answer, with every line of arithmetic correct

What not to write

“Pivot 00, so I exchange R2R_2 and R3R_3 and continue. Diagonal 1,2,3,11, 2, 3, 1, so det⁡B=6\det B = 6.”

What to write

“R2↔R3R_2 \leftrightarrow R_3: det⁡B=−det⁡B′\det B = -\det B'. The diagonal of the triangular form gives 66, so det⁡B=−6\det B = -6.”

Why: A swap is always allowed; forgetting its sign is the error. Count the swaps at the end: an odd number flips the sign, an even number does not. Writing det⁡B=−det⁡B′\det B = -\det B' on the line of the swap makes the count impossible to get wrong.

4. Pulling a factor out of a row, then losing it

2 marks, and an answer off by a factor of 20

What not to write

“Row 11 is 4(1,−2,3)4(1, -2, 3) and row 33 is 5(2,1,3)5(2, 1, 3). After simplifying, det⁡M=34\det M = 34.”

What to write

“det⁡M=4×5×det⁡M′=20×34=680\det M = 4 \times 5 \times \det M' = 20 \times 34 = 680.”

Why: Pulling a factor out is a scaling read backwards, so the factor must multiply the outside. Write it in front of the new determinant on the same line and carry it to the end; the arithmetic in between is easier precisely because it is no longer inside.

5. Treating a scaled combination as a replacement

the final answer, off by a factor of 8

What not to write

“R2→4R2−3R1R_2 \to 4R_2 - 3R_1 and R3→2R3−5R1R_3 \to 2R_3 - 5R_1 are row replacements, so det⁡M=5440\det M = 5440.”

What to write

“R2→4R2−3R1R_2 \to 4R_2 - 3R_1 multiplies the determinant by 44, and R3→2R3−5R1R_3 \to 2R_3 - 5R_1 by 22: det⁡M=5440/8=680\det M = 5440 / 8 = 680.”

Why: The fraction-free combination is a good idea, but the replaced row is multiplied before anything is added to it. Only Ri→Ri+cRjR_i \to R_i + cR_j, coefficient 11 on RiR_i, leaves the determinant alone.

6. Writing det(2A) as twice det A

the whole question, a classic true or false item

What not to write

“AA is 3×33 \times 3 with det⁡A=5\det A = 5, so det⁡(2A)=10\det(2A) = 10.”

What to write

“2A2A multiplies each of the 33 rows by 22, so det⁡(2A)=23×5=40\det(2A) = 2^{3} \times 5 = 40.”

2a2b2c2d2e2f2g2h2i× 2 from row 1× 2 from row 2× 2 from row 3det(2A) = 2 × 2 × 2 × det A = 8 det A, never 2 det A
2A2A has a factor 22 in EACH row, and each row gives one factor to the determinant: three rows, 23=82^{3} = 8.

Why: Each row contributes its own factor. The same count explains why det⁡(−A)=−det⁡A\det(-A) = -\det A for a 3×33 \times 3 but det⁡(−A)=det⁡A\det(-A) = \det A for a 4×44 \times 4.

7. Cancelling a factor that can be zero, in a determinant with a parameter

half the question, the missing value

What not to write

“(x−1)2(x+2)=0(x - 1)^{2}(x + 2) = 0, divide by (x−1)2(x - 1)^{2}: x=−2x = -2 is the only value.”

What to write

“(x−1)2(x+2)=0(x - 1)^{2}(x + 2) = 0 exactly when x=1x = 1 or x=−2x = -2.”

Why: Dividing by x−1x - 1 assumes x≠1x \neq 1, which is precisely one of the values being looked for. Set each factor to zero instead; the factored form is also the proof that there are no other values.

8. Expanding along a full row when a column is nearly empty

rarely the mark, always ten minutes, often a sign

What not to write

“Along row 11: 3⋅C11+0+2⋅C13+(−1)⋅C143 \cdot C_{11} + 0 + 2 \cdot C_{13} + (-1) \cdot C_{14}”, three 3×33 \times 3 determinants and a sign lost in the second.

What to write

“Column 22 holds three zeros, so det⁡A=5 C32=−5 M32\det A = 5 \, C_{32} = -5 \, M_{32}”, one 3×33 \times 3 determinant.

Why: Every extra small determinant is one more chance to drop a sign. Count the zeros of every row and column before writing anything: it takes ten seconds and decides the length of the whole question.

Which method to choose

Which method, from the shape of the matrix

Look at the zeros and at the size before writing a single product

14023-105267103042131437512233512three zeros in column 3:expand along it, one termno zero anywhere:reduce first, then expand
Left, column 33 holds three zeros: one cofactor to compute. Right, no zero anywhere: row replacements first, to build the column the left matrix already had.
  • If a zero row, a zero column, or two equal or proportional rows → the determinant is 00, no computation

    Example: det⁡(123246015)=0\det\begin{pmatrix} 1 & 2 & 3 \\ 2 & 4 & 6 \\ 0 & 1 & 5 \end{pmatrix} = 0, since R2=2R1R_2 = 2R_1

  • If triangular, upper or lower → product of the diagonal entries

    Example: diagonal 2,−1,3,−22, -1, 3, -2 gives 1212

  • If a row or a column with a single non-zero entry, or several zeros → expand along it, signs written from the checkerboard

    Example: column 22 of a 4×44 \times 4 holding only a 55 at (3,2)(3,2): det⁡=−5M32\det = -5M_{32}

  • If a row or a column with a common factor → pull the factor out in front, then continue

    Example: row (4,−8,12)=4(1,−2,3)(4, -8, 12) = 4(1, -2, 3)

  • If a parameter, or rows that all have the same sum → row operations to extract factors BEFORE expanding

    Example: R1→R1+R2+R3R_1 \to R_1 + R_2 + R_3 extracts x+2x + 2 from det⁡M(x)\det M(x)

  • If a dense 4×44 \times 4 with no zero → replacements to empty one column, then expand along it

    Example: a pivot 11 clears its column with integer multipliers

The rule of Sarrus, the diagonal trick, exists for 3×33 \times 3 ONLY. Applied to a 4×44 \times 4 it produces 88 products where the determinant has 2424, and a wrong answer with no warning.

How the answer is expected to be written

A marker ticks steps. Here they are in order, with the concluding sentence expected word for word.

A determinant by reduction, with the ledger written out

When to use it: Any determinant of size 44 or more, or any 3×33 \times 3 with a factor or a parameter

  1. 1 Count the zeros of each row and column, and say which line you will aim for.
  2. 2 Pull out any common factor of a row or a column, writing the factor in front: det⁡P=3det⁡P1\det P = 3\det P_1.
  3. 3 Perform the operations one line at a time, each named (R3→R3−2R1R_3 \to R_3 - 2R_1) and followed by its effect: unchanged, ×(−1)\times(-1) or ×c\times c.
  4. 4 Stop as soon as a line has a single non-zero entry, or as soon as the matrix is triangular, and finish by expansion or by the diagonal product.
  5. 5 Multiply the ledger back in and give the value in a sentence. Check with a second expansion along another line if time allows.

Concluding sentence

“det⁡P=3det⁡P1\det P = 3\det P_1 (factor 33 from R1R_1) =−3det⁡P2= -3\det P_2 (R1↔R2R_1 \leftrightarrow R_2) =−3×(1)(1)(1)(−29)=87= -3 \times (1)(1)(1)(-29) = 87, the remaining operations being replacements.”

The trap: Writing a chain of matrices joined by arrows with no equality sign. The marker cannot tell which factors you tracked, and gives no method marks for a sequence of matrices that only looks like a computation.

Marking: Typically 1 mark for a sensible choice of line or first operation, 2 for the operations with their effects recorded, 1 for the final expansion or diagonal product, and 1 for the value. A correct number without the ledger is usually worth 1 out of 5.

Check before you hand in

Five minutes of checking recover more marks than one more problem started in a hurry.

The typical problem, taken apart

A 4 by 4 with a factor, a zero pivot and a replacement chain

Compute det⁡P\det P for P=(03−69120−12411−1125)P = \begin{pmatrix} 0 & 3 & -6 & 9 \\ 1 & 2 & 0 & -1 \\ 2 & 4 & 1 & 1 \\ -1 & 1 & 2 & 5 \end{pmatrix}, showing every row operation and its effect on the determinant.

Step 1

Row 11 is 3(0,1,−2,3)3(0, 1, -2, 3): det⁡P=3det⁡P1\det P = 3\det P_1 with P1=(01−23120−12411−1125)P_1 = \begin{pmatrix} 0 & 1 & -2 & 3 \\ 1 & 2 & 0 & -1 \\ 2 & 4 & 1 & 1 \\ -1 & 1 & 2 & 5 \end{pmatrix}.

Why

The factor goes out first and is written in front, so that every later number is smaller and nothing has to be remembered.

Step 2

The entry at (1,1)(1,1) is 00, so R1↔R2R_1 \leftrightarrow R_2: det⁡P=−3det⁡P2\det P = -3\det P_2 with P2=(120−101−232411−1125)P_2 = \begin{pmatrix} 1 & 2 & 0 & -1 \\ 0 & 1 & -2 & 3 \\ 2 & 4 & 1 & 1 \\ -1 & 1 & 2 & 5 \end{pmatrix}.

Why

A zero cannot be a pivot. The swap brings up a 11, which clears column 11 with integer multipliers, and its sign is recorded on the same line.

Step 3

R3→R3−2R1R_3 \to R_3 - 2R_1 gives (0,0,1,3)(0, 0, 1, 3) and R4→R4+R1R_4 \to R_4 + R_1 gives (0,3,2,4)(0, 3, 2, 4). Replacements: still det⁡P=−3det⁡P3\det P = -3\det P_3.

Why

Column 1 is now empty below the pivot. Here one could already expand along column 1; continuing to a triangle shows the other route.

Step 4

R4→R4−3R2R_4 \to R_4 - 3R_2 gives (0,0,8,−5)(0, 0, 8, -5), then R4→R4−8R3R_4 \to R_4 - 8R_3 gives (0,0,0,−29)(0, 0, 0, -29). Replacements again.

Why

Each pivot so far equals 11, so every multiplier is an integer and no fraction ever appears, which is what the exam numbers are designed for.

Step 5

The matrix is upper triangular with diagonal 1,1,1,−291, 1, 1, -29: det⁡P=−3×(−29)=87\det P = -3 \times (-29) = 87.

Why

The ledger has exactly two entries, the factor 3 and one swap. Multiplying them back in is the last line, not an afterthought.

Step 6

Check: after step 3, expand along column 1 instead: det⁡P3=det⁡(1−23013324)=−2−18−9=−29\det P_3 = \det\begin{pmatrix} 1 & -2 & 3 \\ 0 & 1 & 3 \\ 3 & 2 & 4 \end{pmatrix} = -2 - 18 - 9 = -29.

Why

A different route to the same small determinant: the two agree, so the sign and the factor are confirmed.

The conclusion, written out

“det⁡P=3×(−1)×(−29)=87\det P = 3 \times (-1) \times (-29) = 87.”

The classic mistake on this problem: Forgetting the swap gives −87-87, forgetting the factor gives 2929, forgetting both gives −29-29. All three come with perfectly correct arithmetic, which is why the ledger has to be written, not remembered.

Learn by heart

  • • Cij=(−1)i+jMijC_{ij} = (-1)^{i+j}M_{ij}: the sign belongs to the POSITION. Row 22 starts with a minus.
  • • Expand along ANY row or column: same result every time. Choose the line with the most zeros.
  • • Triangular: product of the diagonal. Zero row or two equal rows: 00.
  • • Swap: ×(−1)\times(-1). Scale one row by cc: ×c\times c. Ri→Ri+cRjR_i \to R_i + cR_j: unchanged.
  • • Ri→aRi+cRjR_i \to aR_i + cR_j multiplies the determinant by aa, NOT by 11.
  • • det⁡(kA)=kndet⁡A\det(kA) = k^{n}\det A and det⁡(AT)=det⁡A\det(A^{T}) = \det A. There is NO rule for det⁡(A+B)\det(A + B).
  • • Vandermonde 3×33 \times 3: (b−a)(c−a)(c−b)(b - a)(c - a)(c - b), zero exactly when two nodes coincide.

Frequently asked questions

Which row should I expand along to compute a determinant?

Along the row or column with the most zeros, because each zero removes a whole smaller determinant from the work. If no line has zeros, use row replacements first to create them in one column, since a replacement does not change the determinant, and then expand along that column.

What is the difference between a minor and a cofactor?

The minor of an entry is the determinant of the matrix left after deleting that entry's row and column. The cofactor is the same number with a sign attached: plus when the row number plus the column number is even, minus when it is odd. The sign depends only on the position, never on the value of the entry.

How do row operations change the determinant?

Swapping two rows changes its sign. Multiplying one row by a number multiplies the determinant by that number. Adding a multiple of another row to a row leaves it unchanged. Record each operation with its effect as you go, and multiply the factors back in at the end, because a forgotten swap or factor is the most common wrong answer.

Is the determinant of 2A equal to twice the determinant of A?

No. Multiplying the matrix by 2 multiplies every row by 2, and each row gives its own factor, so for an n by n matrix the determinant is multiplied by 2 to the power n. For a 3 by 3 matrix that is a factor of 8, and for a 4 by 4 matrix a factor of 16.

Can I use the rule of Sarrus on a 4 by 4 determinant?

No. The diagonal rule of Sarrus is a shortcut valid for 3 by 3 determinants only. On a 4 by 4 it produces eight products, while the true determinant is a sum of twenty-four, so the answer is simply wrong. For larger matrices, use row reduction to a triangular form or a cofactor expansion along a line with zeros.

Practise it

Corrected exercises: Determinants: cofactor expansion and row operations, MATH 133 at McGill

A method is proved on a paper, not on a sheet. The set for the same chapter takes each of these traps into a problem, with the solution written out step by step.

  • 10 corrected exercises
  • 100 points
  • 150 minutes
Do the exercises
Previous sheet Matrix inverses Next sheet Determinants, adjugate and Cramer's rule

See also

Looking for a MATH 133 tutor in Montreal?

Get in touch for a first session. The determinant chapter is where linear algebra becomes a matter of method: choose the line, keep the ledger, check with a second expansion.

Site by Studio Squalli