Linear Algebra and Vector Geometry 201-SN4-RE • CEGEP, Montreal

Revision sheet: determinants, cofactors and Cramer's rule (201-SN4-RE)

This sheet does not restate the definition of the determinant: it is in your notes. It deals with what decides the mark, that is the choice of the row to expand along, the properties that save ten minutes, and the five computation rules you think you know and apply the wrong way.

It is written for CEGEP students in 201-SN4-RE (formerly 201-NYC), in the Science program, and for Social Science students who meet determinants in 201-105. Once you have read it, the corrected exercises of the same chapter put every reflex to the test.

Mark this sheet as read or add it to your favourites: a free account, no password, keeps your read sheets and favourites from one visit to the next, tells you which chapter to tackle next and lets you ask for the method or exercise you are missing. Create your space, an email is enough.

The thread of the chapter

A determinant is not a matrix, it is a NUMBER attached to a square matrix. So it follows none of the rules of matrix addition: every operation, sum, multiple, transpose, elementary row operation, has its own rule, and that is where the marks go.

This chapter is part of 201-SN4-RE, Linear Algebra and Vector Geometry

The essentials

Cofactor expansion, and the checkerboard

  • • MINOR MijM_{ij}: the determinant obtained by deleting row ii and column jj. COFACTOR: Cij=(−1)i+jMijC_{ij}=(-1)^{i+j}M_{ij}.
  • • det⁡(A)=∑jaijCij\det(A)=\sum_{j}a_{ij}C_{ij} for any fixed row ii, or det⁡(A)=∑iaijCij\det(A)=\sum_{i}a_{ij}C_{ij} for any fixed column jj. All these values agree.
  • • So choose the row or column with the MOST ZEROS: each zero removes a whole minor from the work.
  • • The factor (−1)i+j(-1)^{i+j} follows the checkerboard of signs, which starts with a plus in the top left corner and alternates in both directions.
  • • The rule of SARRUS holds ONLY for order 33. There is no order 44 version, and inventing one is the costliest error in the chapter.
+−+−−+−++−+−−+−+sign: (−1)ⁱ⁺ʲ
The sign of a cofactor depends only on its POSITION, not on the value of the entry: plus (in green) in the top left corner, then alternating in both directions, like a checkerboard.

Before expanding, create zeros with Ri←Ri+kRjR_{i}\leftarrow R_{i}+kR_{j}, which does NOT change the determinant: an order 44 determinant with three zeros in a column is computed with a single minor.

What each operation does to the determinant

  • • SWAPPING two rows or two columns: the determinant changes SIGN.
  • • MULTIPLYING a row by kk: the determinant is multiplied by kk, once.
  • • ADDING a multiple of one row to another: the determinant DOES NOT CHANGE. This is the property that creates zeros for free.
  • • det⁡(kA)=kndet⁡(A)\det(kA)=k^{n}\det(A) for an n×nn\times n matrix, because all nn rows are multiplied by kk.
  • • Two identical or proportional rows, or a zero row: the determinant is 00, with no calculation. A triangular matrix: the determinant is the product of the diagonal.
R₁R₂swap: −det2R₁R₂det × 2R₁R₂ + kR₁det unchanged
The rows seen as vectors: a swap keeps the figure but reverses the orientation; doubling R1R_{1} doubles the area; R2+kR1R_{2}+kR_{1} slides one side (same base, same height, same area).

These rules make the determinant a quick calculation: reduce to echelon form using only the third operation, then multiply the diagonal entries. It is the safest method from order 44 on.

Products, inverse and Cramer's rule

  • • det⁡(AB)=det⁡(A)det⁡(B)\det(AB)=\det(A)\det(B), and det⁡(AT)=det⁡(A)\det(A^{T})=\det(A). On the other hand det⁡(A+B)≠det⁡(A)+det⁡(B)\det(A+B)\neq\det(A)+\det(B) in general.
  • • AA is INVERTIBLE if and only if det⁡(A)≠0\det(A)\neq 0. It is then called nonsingular; otherwise it is singular.
  • • det⁡(A−1)=1det⁡(A)\det(A^{-1})=\dfrac{1}{\det(A)} when AA is invertible.
  • • A−1=1det⁡(A) adj(A)A^{-1}=\dfrac{1}{\det(A)}\,\text{adj}(A), where adj(A)\text{adj}(A) is the TRANSPOSE of the matrix of cofactors. The transposition is not optional.
  • • CRAMER'S RULE: for AX=BAX=B with det⁡(A)≠0\det(A)\neq 0, xi=det⁡(Ai)det⁡(A)x_{i}=\dfrac{\det(A_{i})}{\det(A)}, where AiA_{i} is AA with COLUMN ii replaced by BB.
-112345-11234(3, 1)(1, 2)area 5
The columns (3,1)(3, 1) and (1,2)(1, 2) build a parallelogram of area ∣det⁡∣=5|\det|=5; in dimension 33, a parallelepiped of volume ∣det⁡∣|\det|. det⁡=0\det=0 flattens the figure: no inverse.

Geometrically, ∣det⁡∣|\det| is the area of the parallelogram built on the columns in dimension 22, and the volume of the parallelepiped in dimension 33. The SIGN only tells the orientation.

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. Distributing the determinant over a sum of matrices

the whole question, and the error does not show since both results look plausible.

What not to write

“det⁡(A+B)=det⁡(A)+det⁡(B)\det(A+B)=\det(A)+\det(B).”

What to write

“That is false in general. With A=(1001)A=\begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} and B=(1001)B=\begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}: det⁡(A+B)=det⁡(2002)=4\det(A+B)=\det\begin{pmatrix} 2 & 0 \\ 0 & 2 \end{pmatrix}=4, whereas det⁡A+det⁡B=2\det A+\det B=2.”

-11234567-2-1123ABA + Bdet A + det B = 2det(A + B) = 4
With A=B=IA=B=I: each matrix sends the unit square to a square of area 11, total 22; the sum A+B=2IA+B=2I sends the unit square to a square of side 22, with area 44. Areas do not add up.

Why: The determinant is multiplicative, not additive: det⁡(AB)=det⁡Adet⁡B\det(AB)=\det A\det B is true, det⁡(A+B)\det(A+B) has no simple formula. Mixing the two up is like believing that (a+b)2=a2+b2(a+b)^{2}=a^{2}+b^{2}.

2. Taking a common factor out of a determinant only once

2 marks, and a result nine times too small that no order-of-magnitude check will catch.

What not to write

“det⁡(3A)=3det⁡(A)\det(3A)=3\det(A) for a 3×33\times 3 matrix.”

What to write

“det⁡(3A)=33det⁡(A)=27det⁡(A)\det(3A)=3^{3}\det(A)=27\det(A): ALL THREE rows are multiplied by 33, so the factor comes out three times.”

edge × 3: volume × 27
3A3A multiplies each of the three columns by 33: the edge of the unit cube (in blue) is tripled in all three directions, and the big cube holds 3×3×3=273\times 3\times 3=27 small cubes. Hence det⁡(3A)=27det⁡(A)\det(3A)=27\det(A).

Why: The basic rule is “one row multiplied by kk multiplies the determinant by kk”. Multiplying the whole matrix means applying that rule nn times, once per row.

3. Forgetting the checkerboard sign in a cofactor

the whole question, and the whole determinant often comes out with the wrong sign.

What not to write

“C23=M23=17C_{23}=M_{23}=17, so the term of the expansion is 6×176\times 17.”

What to write

“C23=(−1)2+3M23=−17C_{23}=(-1)^{2+3}M_{23}=-17, because 2+3=52+3=5 is odd. The term of the expansion is therefore 6×(−17)=−1026\times(-17)=-102.”

3142567893178the minor M₂₃xxgivescross out row 2 and column 3checkerboard sign: minus
The two crosses mark the row and the column deleted; the four entries left form the minor M23=17M_{23}=17, to which the checkerboard then adds a minus sign.

Why: The sign depends only on the POSITION, never on the value of the entry. Writing the checkerboard in the margin before expanding takes five seconds and removes the error.

4. Row reducing a determinant without tracking the effect of the operations

2 marks, and a wrong sign on half the papers that swap a row.

What not to write

“I row reduce as for a system, then multiply the pivots: the determinant is the product I get.”

What to write

“Every row SWAP changes the sign, every row MULTIPLIED by kk multiplies the determinant by kk. Only the operation Ri←Ri+kRjR_{i}\leftarrow R_{i}+kR_{j} leaves it unchanged: it is the only one to use freely.”

uvarea AR₁ × 2: area 2AR₂ + 1.5R₁: area A
Doubling a row doubles the area; adding a multiple of one row to another shears the parallelogram without changing its base or its height, so without changing the area.

Why: Solving a system and computing a determinant do not call for the same precautions: for a system, only equivalence matters; for a determinant, it is the VALUE that must be tracked.

5. Taking the matrix of cofactors for the adjugate

the whole inversion question, and the check AA−1=IAA^{-1}=I would have shown it in thirty seconds.

What not to write

“A−1=1det⁡A×A^{-1}=\dfrac{1}{\det A}\times (matrix of cofactors).”

What to write

“A−1=1det⁡A adj(A)A^{-1}=\dfrac{1}{\det A}\,\text{adj}(A), and adj(A)\text{adj}(A) is the TRANSPOSE of the matrix of cofactors. Without the transposition, the product AA−1AA^{-1} does not give the identity.”

Why: The fundamental identity is A adj(A)=det⁡(A) IA\,\text{adj}(A)=\det(A)\,I: it is what requires the transposition, so that row ii of AA meets the cofactors of row ii and not those of column ii.

6. Replacing a row instead of a column in Cramer's rule

the whole question, with plausible but wrong values.

What not to write

“To find xx, I replace the first ROW of AA by the right-hand side BB.”

What to write

“Replace the first COLUMN. Column ii holds the coefficients of xix_{i} in every equation: that is what the right-hand side replaces.”

b₁a₁₂a₁₃b₂a₂₂a₂₃b₃a₃₂a₃₃b₁b₂b₃a₂₁a₂₂a₂₃a₃₁a₃₂a₃₃right: column of xwrong: row 1
For xx, the right-hand side (b1,b2,b3)(b_{1}, b_{2}, b_{3}) takes the place of the COLUMN of coefficients of xx, in green. Putting it in the first row, in red, mixes the three equations and computes nothing.

Why: In AX=BAX=B, XX is a column and each column of AA multiplies one unknown. Cramer therefore replaces the column of the unknown being sought, never a row, which stands for an equation.

7. Inventing a rule of Sarrus of order four

the whole question, with a result that has nothing to do with the determinant.

What not to write

“For a 4×44\times 4 determinant, I copy the first three columns and do the diagonals.”

What to write

“The rule of Sarrus exists ONLY for order 33. At order 44, expand by cofactors, after creating zeros in a row or a column.”

Why: A determinant of order nn has n!n! terms: 66 for order 33, but 2424 for order 44. The six diagonals of a Sarrus diagram cannot cover twenty-four.

8. Giving a negative area or volume

1 mark, and an impossible answer that the marker spots at once.

What not to write

“The area of the parallelogram built on u⃗\vec{u} and v⃗\vec{v} is det⁡=−6\det=-6.”

What to write

“The area is ∣det⁡∣=6|\det|=6. The negative sign only says that the pair (u⃗,v⃗)(\vec{u}, \vec{v}) turns clockwise, that is, the orientation is reversed.”

1st: u2nd: vdet(u, v) = 61st: v2nd: udet(v, u) = −6
The same parallelogram in both orders: from the first vector to the second, you turn counterclockwise (+6+6) or clockwise (−6-6). The area is ∣det⁡∣=6|\det|=6 in both cases.

Why: The determinant measures a SIGNED area: swapping the two vectors changes the sign without changing the figure. It is exactly the property “swapping two columns changes the sign”.

Which method to choose

How to compute this determinant, depending on what it looks like

Look at the MATRIX before computing: its size, its zeros, its proportional rows. The right choice divides the work by three.

  • If two identical or proportional rows or columns, or a zero row → the determinant is 00, with no calculation

    Example: R2=2R1R_{2}=2R_{1} is enough to conclude

  • If triangular or diagonal matrix → product of the DIAGONAL entries, no expansion

    Example: det⁡(257031004)=24\det\begin{pmatrix} 2 & 5 & 7 \\ 0 & 3 & 1 \\ 0 & 0 & 4 \end{pmatrix}=24

  • If order 22 → ad−bcad-bc, directly

  • If order 33 → Sarrus, or expansion along the row with the most zeros

    With two zeros in a row, the expansion beats Sarrus by far.

  • If order 44 or more → create zeros with Ri←Ri+kRjR_{i}\leftarrow R_{i}+kR_{j}, which changes nothing, then expand along that row

    Example: a column with three zeros brings an order 44 down to a single determinant of order 33

  • If the matrix is a PRODUCT, a transpose, a multiple or a power → use the properties instead of computing: det⁡(AB)=det⁡Adet⁡B\det(AB)=\det A\det B, det⁡(kA)=kndet⁡A\det(kA)=k^{n}\det A

    det⁡(A5)=(det⁡A)5\det(A^{5})=(\det A)^{5} takes one line, against several pages otherwise.

No branch applies and the matrix contains a parameter? Expand keeping the parameter as a letter, then solve det⁡=0\det=0 to find the values that make the matrix singular.

Cramer, inverse or Gauss: which one costs the least

Count what the question really asks for, because the three methods do not cost the same number of determinants.

  • If only ONE unknown is asked for in a 3×33\times 3 system → CRAMER on that unknown: two determinants of order 33 are enough

    Example: x=det⁡A1det⁡Ax=\frac{\det A_{1}}{\det A}, and neither yy nor zz is computed

  • If all the unknowns are asked for in a 3×33\times 3 system → GAUSS-JORDAN, faster than four determinants of order 33

    Cramer would need det⁡A\det A plus three other determinants, that is four full calculations.

  • If the question explicitly asks for A−1A^{-1} → cofactors and adjugate if the order is 22 or 33, Gauss-Jordan beyond

  • If the question only asks WHETHER the system has a unique solution → a single determinant: nonzero means yes, and there is nothing more to do

  • If det⁡A=0\det A=0 → neither Cramer nor the inverse: switch to Gaussian elimination to tell no solution from infinitely many

Cramer is a writing tool as much as a computing tool: on a concrete problem it gives the unknown asked for without going through the others, which makes the answer much shorter.

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.

Computing a determinant of order four

When to use it: The question gives a 4×44\times 4 matrix and asks for its determinant, or whether it is invertible.

  1. 1 Look at the matrix, spot the row or column with the most zeros, and SAY so: “column 22 contains three zeros”.
  2. 2 If there are not enough zeros, create some with Ri←Ri+kRjR_{i}\leftarrow R_{i}+kR_{j}, writing down each operation and recalling that it does not change the determinant.
  3. 3 Write the full expansion along that row or column, with the checkerboard signs shown.
  4. 4 Compute the minor or minors of order 33 obtained, by Sarrus or by a new expansion.
  5. 5 Put everything together, conclude on the value and, if the question asks, on invertibility.

Concluding sentence

Expanding along the second column, det⁡(A)=2×(−1)3+2×M32=−2×(−28)=56≠0\det(A)=2\times(-1)^{3+2}\times M_{32}=-2\times(-28)=56\neq 0, so AA is invertible.

The trap: Expanding along the first row out of habit. If it is full, you have to compute four minors of order 33 instead of one: fifteen minutes against three, and four chances to make a mistake.

Marking: 0.5 mark for the justified choice of row, 0.5 mark for the checkerboard signs, 1.5 marks for the minors, 0.5 mark for the conclusion.

Solving a system by Cramer's rule

When to use it: The question requires Cramer's rule, or asks for only one unknown of a square system.

  1. 1 Write the system in the form AX=BAX=B and identify AA and BB clearly.
  2. 2 Compute det⁡(A)\det(A) and write the conclusion: “det⁡(A)≠0\det(A)\neq 0, so the system has a unique solution and Cramer's rule applies”.
  3. 3 For each unknown asked for, write the matrix AiA_{i} by replacing COLUMN ii by BB, and show it in full.
  4. 4 Compute det⁡(Ai)\det(A_{i}), then the quotient, keeping exact values.
  5. 5 Check by substituting the values found into every original equation.

Concluding sentence

Since det⁡(A)=−5≠0\det(A)=-5\neq 0, Cramer's rule applies and gives x=det⁡(A1)det⁡(A)=−10−5=2x=\dfrac{\det(A_{1})}{\det(A)}=\dfrac{-10}{-5}=2.

The trap: Forgetting to justify det⁡(A)≠0\det(A)\neq 0 before applying the rule. It is not a formality: the rule divides by this number, and without that line the marking scheme takes off a mark even when the result is right.

Marking: 0.5 mark for the matrix form, 0.5 mark for the determinant and the justification, 1 mark per unknown computed, 0.5 mark for the check.

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 determinant of order four, computed with a single minor

Compute det⁡(A)\det(A) for A=(2013004012−153021)A=\begin{pmatrix} 2 & 0 & 1 & 3 \\ 0 & 0 & 4 & 0 \\ 1 & 2 & -1 & 5 \\ 3 & 0 & 2 & 1 \end{pmatrix}, then say whether AA is invertible and give det⁡(2A)\det(2A).

Step 1

The second COLUMN is (0,0,2,0)(0, 0, 2, 0): it contains three zeros. Expand along it.

Why

Three zeros mean three minors of order 33 NOT to compute. Choosing where to expand is the only decision in the problem, and it is worth ten minutes.

Step 2

det⁡(A)=a32C32=2×(−1)3+2×M32=−2 M32\det(A)=a_{32}C_{32}=2\times(-1)^{3+2}\times M_{32}=-2\,M_{32}.

Why

Position (3,2)(3, 2) gives 3+2=53+2=5, odd, so a minus sign. Writing the exponent before concluding avoids the most frequent error of the chapter.

Step 3

M32M_{32} is obtained by deleting ROW 33 and COLUMN 22: M32=det⁡(213040321)M_{32}=\det\begin{pmatrix} 2 & 1 & 3 \\ 0 & 4 & 0 \\ 3 & 2 & 1 \end{pmatrix}.

Why

Delete the row and the column of the entry used, and no others. Copying the submatrix in full before computing removes copying errors.

Step 4

In this determinant of order 33, the second row is (0,4,0)(0, 4, 0): expand along it again.

Why

The same reflex applies at every level: two more zeros, two minors of order 22 saved. That is what makes Sarrus unnecessary here.

Step 5

M32=4×(−1)2+2×det⁡(2331)=4×1×(2−9)=4×(−7)=−28M_{32}=4\times(-1)^{2+2}\times\det\begin{pmatrix} 2 & 3 \\ 3 & 1 \end{pmatrix}=4\times 1\times(2-9)=4\times(-7)=-28.

Why

Position (2,2)(2, 2) gives a plus sign this time. The minor of order 22 keeps rows 11 and 33 and columns 11 and 33 of the submatrix.

Step 6

det⁡(A)=−2×(−28)=56\det(A)=-2\times(-28)=56.

Why

Two minus signs that cancel: this is exactly where papers lose the sign, by forgetting one of them. Writing both explicitly is the only defence.

Step 7

det⁡(A)=56≠0\det(A)=56\neq 0, so AA is invertible, and det⁡(A−1)=156\det(A^{-1})=\dfrac{1}{56}.

Why

Invertibility is read off the determinant alone, without computing the inverse. It is the cheapest question of the problem, provided you do not skip it.

Step 8

AA has order 44, so det⁡(2A)=24det⁡(A)=16×56=896\det(2A)=2^{4}\det(A)=16\times 56=896.

Why

Four rows multiplied by 22, so four factors 22. Answering 112112 would count only one, and that is the error the question is waiting for.

The conclusion, written out

det⁡(A)=56\det(A)=56, so AA is invertible with det⁡(A−1)=156\det(A^{-1})=\frac{1}{56}, and det⁡(2A)=24×56=896\det(2A)=2^{4}\times 56=896.

The classic mistake on this problem: Expanding along the first row, which contains a single zero: three minors of order 33 to compute instead of one, and three chances to lose a sign. The result is the same; the time and the risk are not.

Learn by heart

  • • Cij=(−1)i+jMijC_{ij}=(-1)^{i+j}M_{ij}: the sign depends on the POSITION, not on the entry.
  • • Expand along the row or column with the MOST ZEROS.
  • • Sarrus exists only at order 33. Never at order 44.
  • • Swapping two rows changes the SIGN; multiplying a row by kk multiplies by kk; adding a multiple of another row CHANGES NOTHING.
  • • det⁡(kA)=kndet⁡(A)\det(kA)=k^{n}\det(A) for an n×nn\times n matrix.
  • • det⁡(AB)=det⁡Adet⁡B\det(AB)=\det A\det B and det⁡(AT)=det⁡A\det(A^{T})=\det A, but det⁡(A+B)\det(A+B) has no formula.
  • • AA invertible is equivalent to det⁡A≠0\det A\neq 0, and then det⁡(A−1)=1det⁡A\det(A^{-1})=\frac{1}{\det A}.
  • • adj(A)\text{adj}(A) is the TRANSPOSE of the matrix of cofactors.
  • • Cramer replaces COLUMN ii by BB, never the row.
  • • ∣det⁡∣|\det| is an area or a volume; the sign is only an orientation.

Frequently asked questions

How do you compute a four by four determinant?

Expand by cofactors along the row or column that contains the most zeros, which brings the calculation down to three by three determinants. If there are not enough zeros, create some by adding a multiple of one row to another, an operation that does not change the determinant. The rule of Sarrus never applies here.

Why does the sign of the cofactors alternate?

The factor minus one to the power i plus j comes from the definition of the determinant as a signed sum of products. In practice, it follows a checkerboard that starts with a plus in the top left corner and alternates in both directions. The sign depends only on the position of the entry, never on its value.

When should I use Cramer's rule rather than Gaussian elimination?

When only one unknown is asked for in a square system. Cramer then gives the answer with only two determinants, without computing the other unknowns. If all the unknowns are asked for, Gauss-Jordan elimination is faster, because Cramer would need a full determinant for each unknown.

What does a zero determinant mean?

That the matrix is not invertible, so its columns are linearly dependent. For a square system, it means there is no unique solution: either no solution or infinitely many. Geometrically, the parallelogram or parallelepiped built on the columns is flattened, with zero area or volume.

Is the determinant of a sum the sum of the determinants?

No, not in general. The determinant is multiplicative, not additive: the determinant of a product is the product of the determinants, but the determinant of a sum has no simple formula. A counterexample takes two identity matrices of order two, whose sum has determinant four while the sum of their determinants is two.

Why must the matrix of cofactors be transposed?

Because the identity that defines the inverse is the product of the matrix by its adjugate, equal to the determinant times the identity. For that product to work, each row of the matrix has to meet the matching cofactors, which only the transposition ensures. Without it, the product does not give the identity.

Practise it

Corrected exercises: Determinants and Cramer's rule, 201-SN4-RE

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.

  • 16 corrected exercises
  • 160 points
  • 225 minutes
Do the exercises
Something missing from this sheet? A method, a trap, an exercise to practise it, a mistake you spotted: tell me, I read every request.

Sending goes through your free space: that is how I can answer you and tell you when the exercise is added. An email is enough, no password. Create your space. Rather not create an account? Write to me directly.

What is it about?
I read every request myself, nobody else sees it. No need to write your name or your school.
When your request is dealt with, you hear about it by email and in your space.

By sending, you agree that I read your request to answer it. It is kept with your account, erased with it, and never published: privacy policy.

Previous sheet Linear systems, Gauss and Gauss-Jordan Next sheet Linear combinations and bases

© Ahmed Squalli Houssaini. Revision sheet published at www.letuteurscientifique.ca/en/fiches/cegep-sn4-determinants-cramer. Free for personal and classroom use; republishing it elsewhere requires written permission (legal notice).

See also

Looking for a 201-SN4-RE tutor in Montreal?

Get in touch for a first session. We go over the moves that cost marks on a linear algebra exam, from reading a system to writing a proof about linearly independent sets, then test them on exercises at the real level of CEGEP evaluations.

Site by Studio Squalli