A731 of 56
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

A7 · Lesson 31 · Cofactors and Cramer's rule

Determinants by formula, and what they're good for

Numerical software never uses Cramer's rule; elimination is far faster. Yet engineers reach for it constantly, because it gives answers as formulas. Want to know how a sensor bridge's output depends on each resistor, symbolically, so you can see which one matters most? Cramer's rule writes the answer as a ratio of two determinants you can expand by hand. This lesson gives the determinant's rules, the cofactor formula, and Cramer's rule.

  • The columns 𝐚1=(2,0.5) and 𝐚2=(0.5,1.5) are fixed. Move the target 𝐛.
  • Cramer's rule says x1 is the area of the parallelogram from 𝐛 and 𝐚2, divided by the area from 𝐚1 and 𝐚2. The dashed arrows show x1𝐚1+x2𝐚2 landing on 𝐛.
  • Put 𝐛 along 𝐚2. What is x1, and why does Cramer's rule agree?

Predict

You swap two rows of a matrix. What happens to its determinant?

Name it

The rules

The determinant is the signed volume factor of the transformation. Three rules define it:

  1. det⁡I=1.
  2. Swapping two rows changes the sign.
  3. It's linear in each row separately (scale a row by k and the determinant scales by k).

Everything else follows:

  • Two equal rows, or a zero row: det⁡=0.
  • Subtracting a multiple of one row from another leaves det⁡ unchanged, so elimination preserves it.
  • det⁡A=±(product of the pivots), the sign set by the number of row swaps.
  • det⁡(AB)=det⁡Adet⁡B, det⁡AT=det⁡A, det⁡A−1=1/det⁡A.
  • For an n×n matrix, det⁡(kA)=kndet⁡A.

Cofactor expansion

Along row i: det⁡A=∑jaijCij, where the cofactor Cij=(−1)i+jdet⁡Mij and Mij deletes row i and column j. The signs follow a checkerboard, +−+. Expand along a row or column with many zeros.

Cramer's rule and the inverse

For A𝐱=𝐛 with det⁡A≠0:

xj=det⁡Bjdet⁡A

where Bj is A with column j replaced by 𝐛. Likewise A−1=1det⁡ACT, which for 2 × 2 is the swap-and-negate formula from lesson 11.

Cramer's rule costs roughly n! operations if the determinants are expanded by cofactors, hopeless beyond a few unknowns. Use it for formulas, not for numbers.

Worked example

Find det⁡[213041102] by cofactors.

Show the solution
  1. Expand along row 1. 2|4102|−1|0112|+3|0410|
  2. Evaluate the 2 × 2 determinants and add. 2(8)−1(−1)+3(−4)=5

Answer the determinant is 5.

Worked example

Current I is injected into node 1 of a two-node network with conductances g1 (node 1 to ground), g2 (between the nodes) and g3 (node 2 to ground). Find v2 as a formula.

Show the solution
  1. Matrix and source vector. G=[g1+g2−g2−g2g2+g3] and 𝐢=(I,0).
  2. Cramer's rule. Replace column 2 with 𝐢: v2=|g1+g2I−g20|det⁡G=g2I(g1+g2)(g2+g3)−g22=g2Ig1g2+g1g3+g2g3
  3. What the formula shows. It shows at once that v2→0 as g2→0 (the nodes come apart), something a number alone wouldn't.

Answer v2=g2Ig1g2+g1g3+g2g3.

Worked example

Find the determinant of the n×n matrix with 2 on the diagonal and −1 beside it, for n up to 5.

Show the solution
  1. Expand along the first row. The 2 multiplies the same matrix one size smaller, Dn−1.
  2. The −1's cofactor. Expanded down its first column, it leaves Dn−2. So Dn=2Dn−1−Dn−2
  3. Run the recurrence. Starting from D1=2 and D2=3: D3=4,D4=5,D5=6 In general Dn=n+1.
  4. What it means. This matrix is the conductance matrix of a ladder of equal resistors, so it's never singular.

Answer the determinants are 2, 3, 4, 5 and 6 for n = 1 to 5, and in general Dn=n+1.

Check

Expand det⁡[210011105] by cofactors.

Check

det⁡A = −3. Two rows of A are swapped. What is the new determinant?

Check

A is 3 × 3 with det⁡A = −2. What is det⁡(2A)?

Check

det⁡A = 2 and det⁡B = 3. What is det⁡((AB)−1)?

Check

Use Cramer's rule on [2145]𝐱=(4,1). What is x1?

Check

A two-node network has g1 = 1 mS (node 1 to ground), g2 = 0.5 mS (between the nodes) and g3 = 4 mS (node 2 to ground). 2 mA is injected into node 1. What is v2?

Write units the way you normally would: 1.5 V, 1500 mV and 0.0015 kV are the same answer.

Check

Take A=[210111016].

(a)

What is det⁡A?

(b)

By Cramer's rule, what is x1 in A𝐱=(1,0,0)?

Check

Solve [x11x]𝐮=(1,0) by Cramer's rule.

Step 1

What is the determinant?

Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.

Explain why

Why is det⁡(AB)=det⁡A×det⁡B?

Practice

Keep practicing

10 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.