Cramer's Rule & Invertible Matrices

3614 words
18 min read
Python Week 1: the first filter for runtime behavior
Visual companion
Python
Type and operator map

Python Week 1: the first filter for runtime behavior

View
Revision summary

What this note is really saying

Short form

# Cramer's Rule & Invertible Matrices ## ๐ŸŽฏ Learning Objectives After this topic you will be able to: - State and apply Cramer's rule to solve $A\mathbf{x} = \mathbf{b}$ when $A$ is square and invertible - Compute the adjugate (classical adjoint) of a matrix - Find the inverse of a matrix using the adjugate formula...

Cramer's Rule & Invertible Matrices

๐ŸŽฏ Learning Objectives

After this topic you will be able to:
  • State and apply Cramer's rule to solve Ax=bA\mathbf{x} = \mathbf{b} when AA is square and invertible
  • Compute the adjugate (classical adjoint) of a matrix
  • Find the inverse of a matrix using the adjugate formula Aโˆ’1=adj(A)detโก(A)A^{-1} = \frac{\text{adj}(A)}{\det(A)}
  • Determine when Cramer's rule is (and isn't) computationally practical
  • Express solutions to linear systems using determinants

๐Ÿ“‹ Prerequisites

  • Determinants (Week 1) โ€” computing detโก\det, minors, cofactors
  • Gaussian Elimination (this week) โ€” the standard method for solving systems
  • Matrix Multiplication (Week 1) โ€” Aโˆ’1A^{-1} is defined by AAโˆ’1=IAA^{-1} = I
  • Cramer's rule provides an elegant theoretical formula, though Gaussian elimination is usually more practical

1. Intuition: What Cramer's Rule Does

Cramer's rule expresses the solution of Ax=bA\mathbf{x} = \mathbf{b} directly in terms of determinants. For each variable xjx_j:
  1. Take the coefficient matrix AA
  2. Replace column jj of AA with b\mathbf{b}
  3. Compute the determinant of this new matrix
  4. Divide by detโก(A)\det(A) The result is xjx_j. It's a beautiful formula, but computationally expensive for large nn (requires n+1n+1 determinants).

2. Cramer's Rule

2.1 Statement

Theorem (Cramer's Rule). Let AA be an nร—nn \times n invertible matrix (so detโก(A)โ‰ 0\det(A) \neq 0). For any bโˆˆRn\mathbf{b} \in \mathbb{R}^n, the unique solution to Ax=bA\mathbf{x} = \mathbf{b} is:
>xj=detโก(Aj)detโก(A),j=1,2,โ€ฆ,n>> x_j = \frac{\det(A_j)}{\det(A)}, \quad j = 1, 2, \dots, n >
where AjA_j is the matrix formed by replacing the jj-th column of AA with b\mathbf{b}. Proof Sketch
Let A=[a1โ€…โ€Ša2โ€…โ€Šโ€ฆโ€…โ€Šan]A = [\mathbf{a}_1 \; \mathbf{a}_2 \; \dots \; \mathbf{a}_n] where aj\mathbf{a}_j is column jj. Then Ax=bA\mathbf{x} = \mathbf{b} means:
>x1a1+x2a2+โ‹ฏ+xnan=b>> x_1\mathbf{a}_1 + x_2\mathbf{a}_2 + \cdots + x_n\mathbf{a}_n = \mathbf{b} >
Consider Aj=[a1โ€…โ€Šโ€ฆโ€…โ€Šbโ€…โ€Šโ€ฆโ€…โ€Šan]A_j = [\mathbf{a}_1 \; \dots \; \mathbf{b} \; \dots \; \mathbf{a}_n] (column jj replaced by b\mathbf{b}). Using multilinearity of the determinant:
>detโก(Aj)=detโก[a1โ€…โ€Šโ€ฆโ€…โ€Šโˆ‘k=1nxkakโ€…โ€Šโ€ฆโ€…โ€Šan]=xjdetโก(A)>> \det(A_j) = \det[\mathbf{a}_1 \; \dots \; \sum_{k=1}^n x_k\mathbf{a}_k \; \dots \; \mathbf{a}_n] = x_j \det(A) >
because all terms with kโ‰ jk \neq j have two identical columns (determinant zero). Hence xj=detโก(Aj)/detโก(A)x_j = \det(A_j)/\det(A).

2.2 2ร—22 \times 2 Case

For
A=[abcd]A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}
,
b=[b1b2]\mathbf{b} = \begin{bmatrix} b_1 \\ b_2 \end{bmatrix}
:
x1=โˆฃb1bb2dโˆฃโˆฃabcdโˆฃ=b1dโˆ’bb2adโˆ’bc,x2=โˆฃab1cb2โˆฃโˆฃabcdโˆฃ=ab2โˆ’b1cadโˆ’bcx_1 = \frac{\begin{vmatrix} b_1 & b \\ b_2 & d \end{vmatrix}}{\begin{vmatrix} a & b \\ c & d \end{vmatrix}} = \frac{b_1 d - b b_2}{ad - bc}, \quad x_2 = \frac{\begin{vmatrix} a & b_1 \\ c & b_2 \end{vmatrix}}{\begin{vmatrix} a & b \\ c & d \end{vmatrix}} = \frac{a b_2 - b_1 c}{ad - bc}
Example 1: 2ร—2 Cramer's rule
Solve:
>{2x+3y=74xโˆ’y=1>> \begin{cases} 2x + 3y = 7 \\ 4x - y = 1 \end{cases} >
detโก(A)=2(โˆ’1)โˆ’3(4)=โˆ’2โˆ’12=โˆ’14\det(A) = 2(-1) - 3(4) = -2 - 12 = -14
>A1=[731โˆ’1]>> A_1 = \begin{bmatrix} 7 & 3 \\ 1 & -1 \end{bmatrix} >
, detโก(A1)=7(โˆ’1)โˆ’3(1)=โˆ’7โˆ’3=โˆ’10\det(A_1) = 7(-1) - 3(1) = -7 - 3 = -10
>A2=[2741]>> A_2 = \begin{bmatrix} 2 & 7 \\ 4 & 1 \end{bmatrix} >
, detโก(A2)=2(1)โˆ’7(4)=2โˆ’28=โˆ’26\det(A_2) = 2(1) - 7(4) = 2 - 28 = -26
x=โˆ’10โˆ’14=57x = \frac{-10}{-14} = \frac{5}{7}, y=โˆ’26โˆ’14=137y = \frac{-26}{-14} = \frac{13}{7}
Check: 2(57)+3(137)=10+397=72(\frac{5}{7}) + 3(\frac{13}{7}) = \frac{10+39}{7} = 7 โœ“

2.3 3ร—33 \times 3 Case

Example 2: 3ร—3 Cramer's rule
Solve:
>{x+2y+z=32xโˆ’y+3z=23x+yโˆ’z=6>> \begin{cases} x + 2y + z = 3 \\ 2x - y + 3z = 2 \\ 3x + y - z = 6 \end{cases} >
>A=[1212โˆ’1331โˆ’1]>> A = \begin{bmatrix} 1 & 2 & 1 \\ 2 & -1 & 3 \\ 3 & 1 & -1 \end{bmatrix} >
Step 1: Compute detโก(A)\det(A):
>detโก(A)=1(โˆ’1)(โˆ’1)+2(3)(3)+1(2)(1)โˆ’1(โˆ’1)(3)โˆ’1(3)(1)โˆ’2(2)(โˆ’1)=1+18+2โˆ’(โˆ’3)โˆ’3โˆ’(โˆ’4)=1+18+2+3โˆ’3+4=25>> \begin{aligned} \det(A) &= 1(-1)(-1) + 2(3)(3) + 1(2)(1) - 1(-1)(3) - 1(3)(1) - 2(2)(-1) \\ &= 1 + 18 + 2 - (-3) - 3 - (-4) \\ &= 1 + 18 + 2 + 3 - 3 + 4 = 25 \end{aligned} >
Step 2: Compute A1A_1 (replace column 1 with b\mathbf{b}):
>A1=[3212โˆ’1361โˆ’1]>> A_1 = \begin{bmatrix} 3 & 2 & 1 \\ 2 & -1 & 3 \\ 6 & 1 & -1 \end{bmatrix} >
>detโก(A1)=3(โˆ’1)(โˆ’1)+2(3)(6)+1(2)(1)โˆ’1(โˆ’1)(6)โˆ’3(3)(1)โˆ’2(2)(โˆ’1)=3+36+2+6โˆ’9+4=42>> \begin{aligned} \det(A_1) &= 3(-1)(-1) + 2(3)(6) + 1(2)(1) \\ &\quad - 1(-1)(6) - 3(3)(1) - 2(2)(-1) \\ &= 3 + 36 + 2 + 6 - 9 + 4 = 42 \end{aligned} >
x=4225x = \frac{42}{25}
Step 3: A2A_2 (replace column 2):
>A2=[13122336โˆ’1]>> A_2 = \begin{bmatrix} 1 & 3 & 1 \\ 2 & 2 & 3 \\ 3 & 6 & -1 \end{bmatrix} >
>detโก(A2)=1(2)(โˆ’1)+3(3)(3)+1(2)(6)โˆ’1(2)(3)โˆ’1(3)(6)โˆ’3(2)(โˆ’1)=โˆ’2+27+12โˆ’6โˆ’18+6=19>> \det(A_2) = 1(2)(-1) + 3(3)(3) + 1(2)(6) - 1(2)(3) - 1(3)(6) - 3(2)(-1) = -2 + 27 + 12 - 6 - 18 + 6 = 19 >
y=1925y = \frac{19}{25}
Step 4: A3A_3 (replace column 3):
>A3=[1232โˆ’12316]>> A_3 = \begin{bmatrix} 1 & 2 & 3 \\ 2 & -1 & 2 \\ 3 & 1 & 6 \end{bmatrix} >
>detโก(A3)=1(โˆ’1)(6)+2(2)(3)+3(2)(1)โˆ’3(โˆ’1)(3)โˆ’1(2)(1)โˆ’2(2)(6)=โˆ’6+12+6+9โˆ’2โˆ’24=โˆ’5>> \det(A_3) = 1(-1)(6) + 2(2)(3) + 3(2)(1) - 3(-1)(3) - 1(2)(1) - 2(2)(6) = -6 + 12 + 6 + 9 - 2 - 24 = -5 >
z=โˆ’525=โˆ’15z = \frac{-5}{25} = -\frac{1}{5}
Solution: x=4225x = \frac{42}{25}, y=1925y = \frac{19}{25}, z=โˆ’15z = -\frac{1}{5}.

3. Cramer's Rule vs. Gaussian Elimination

AspectCramer's RuleGaussian Elimination
Computational costO(n!)\mathcal{O}(n!) (requires n+1n+1 determinants)O(n3)\mathcal{O}(n^3)
Practical fornโ‰ค3n \leq 3 (textbook/exam problems)nโ‰ฅ3n \geq 3 (real-world)
Works for singular AA ?No (requires detโก(A)โ‰ 0\det(A) \neq 0 )Yes (detects inconsistency)
Conceptual valueExplicit formula; great for theoryAlgorithmic; great for computation
Why Cramer's rule matters despite being expensive: It proves that the solution depends continuously on the entries of AA and b\mathbf{b} (since determinants are continuous functions). This is useful in theoretical arguments.

4. The Adjugate and Matrix Inverse

4.1 Cofactor Matrix and Adjugate

Definition (Cofactor Matrix). The cofactor matrix CC of AA has entries Cij=(โˆ’1)i+jMijC_{ij} = (-1)^{i+j} M_{ij} (the cofactors). Definition (Adjugate). The adjugate (or classical adjoint) of AA is the transpose of the cofactor matrix:
>adj(A)=CT>> \text{adj}(A) = C^T >

4.2 Inverse via Adjugate

Theorem. If detโก(A)โ‰ 0\det(A) \neq 0, then:
>Aโˆ’1=1detโก(A)adj(A)>> A^{-1} = \frac{1}{\det(A)} \text{adj}(A) >
This formula is theoretically important but computationally inefficient for large nn (Gaussian elimination is better).
Example 3: Inverse of a 2ร—2 matrix using adjugate
>A=[abcd]>> A = \begin{bmatrix} a & b \\ c & d \end{bmatrix} >
Cofactor matrix:
>C=[dโˆ’cโˆ’ba]>> C = \begin{bmatrix} d & -c \\ -b & a \end{bmatrix} >
Adjugate:
>adj(A)=CT=[dโˆ’bโˆ’ca]>> \text{adj}(A) = C^T = \begin{bmatrix} d & -b \\ -c & a \end{bmatrix} >
>Aโˆ’1=1adโˆ’bc[dโˆ’bโˆ’ca]>> A^{-1} = \frac{1}{ad-bc} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix} >
Check:
>AAโˆ’1=1adโˆ’bc[abcd][dโˆ’bโˆ’ca]=1adโˆ’bc[adโˆ’bc00adโˆ’bc]=I>> AA^{-1} = \frac{1}{ad-bc} \begin{bmatrix} a & b \\ c & d \end{bmatrix} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix} = \frac{1}{ad-bc} \begin{bmatrix} ad-bc & 0 \\ 0 & ad-bc \end{bmatrix} = I >
โœ“ Example 4: Inverse of a 3ร—3 matrix
>A=[123014560]>> A = \begin{bmatrix} 1 & 2 & 3 \\ 0 & 1 & 4 \\ 5 & 6 & 0 \end{bmatrix} >
Step 1: Compute detโก(A)\det(A).
>detโก(A)=1(1โ‹…0โˆ’4โ‹…6)โˆ’2(0โ‹…0โˆ’4โ‹…5)+3(0โ‹…6โˆ’1โ‹…5)=1(โˆ’24)โˆ’2(โˆ’20)+3(โˆ’5)=โˆ’24+40โˆ’15=1>> \det(A) = 1(1\cdot0 - 4\cdot6) - 2(0\cdot0 - 4\cdot5) + 3(0\cdot6 - 1\cdot5) = 1(-24) - 2(-20) + 3(-5) = -24 + 40 - 15 = 1 >
Step 2: Compute all 9 cofactors.
>C11=+detโก[1460]=0โˆ’24=โˆ’24>> C_{11} = +\det\begin{bmatrix} 1 & 4 \\ 6 & 0 \end{bmatrix} = 0 - 24 = -24 >
>C12=โˆ’detโก[0450]=โˆ’(0โˆ’20)=20>> C_{12} = -\det\begin{bmatrix} 0 & 4 \\ 5 & 0 \end{bmatrix} = -(0 - 20) = 20 >
>C13=+detโก[0156]=0โˆ’5=โˆ’5>> C_{13} = +\det\begin{bmatrix} 0 & 1 \\ 5 & 6 \end{bmatrix} = 0 - 5 = -5 >
>C21=โˆ’detโก[2360]=โˆ’(0โˆ’18)=18>> C_{21} = -\det\begin{bmatrix} 2 & 3 \\ 6 & 0 \end{bmatrix} = -(0 - 18) = 18 >
>C22=+detโก[1350]=0โˆ’15=โˆ’15>> C_{22} = +\det\begin{bmatrix} 1 & 3 \\ 5 & 0 \end{bmatrix} = 0 - 15 = -15 >
>C23=โˆ’detโก[1256]=โˆ’(6โˆ’10)=4>> C_{23} = -\det\begin{bmatrix} 1 & 2 \\ 5 & 6 \end{bmatrix} = -(6 - 10) = 4 >
>C31=+detโก[2314]=8โˆ’3=5>> C_{31} = +\det\begin{bmatrix} 2 & 3 \\ 1 & 4 \end{bmatrix} = 8 - 3 = 5 >
>C32=โˆ’detโก[1304]=โˆ’(4โˆ’0)=โˆ’4>> C_{32} = -\det\begin{bmatrix} 1 & 3 \\ 0 & 4 \end{bmatrix} = -(4 - 0) = -4 >
>C33=+detโก[1201]=1โˆ’0=1>> C_{33} = +\det\begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix} = 1 - 0 = 1 >
Step 3: Form the adjugate (transpose of cofactor matrix):
>adj(A)=[โˆ’2418520โˆ’15โˆ’4โˆ’541]>> \text{adj}(A) = \begin{bmatrix} -24 & 18 & 5 \\ 20 & -15 & -4 \\ -5 & 4 & 1 \end{bmatrix} >
Step 4: Since detโก(A)=1\det(A) = 1:
>Aโˆ’1=11adj(A)=[โˆ’2418520โˆ’15โˆ’4โˆ’541]>> A^{-1} = \frac{1}{1} \text{adj}(A) = \begin{bmatrix} -24 & 18 & 5 \\ 20 & -15 & -4 \\ -5 & 4 & 1 \end{bmatrix} >
Verify: AAโˆ’1=IAA^{-1} = I (check one entry: first row of AA times first column of Aโˆ’1A^{-1}: 1(โˆ’24)+2(20)+3(โˆ’5)=โˆ’24+40โˆ’15=11(-24) + 2(20) + 3(-5) = -24 + 40 - 15 = 1 โœ“).

4.3 Properties of the Adjugate

PropertyFormula
Productadj(AB)=adj(B)โ€‰adj(A)\text{adj}(AB) = \text{adj}(B)\,\text{adj}(A)
Transposeadj(AT)=(adj(A))T\text{adj}(A^T) = (\text{adj}(A))^T
Inverseadj(Aโˆ’1)=(adj(A))โˆ’1\text{adj}(A^{-1}) = (\text{adj}(A))^{-1}
Determinantdetโก(adj(A))=(detโก(A))nโˆ’1\det(\text{adj}(A)) = (\det(A))^{n-1}
Scalaradj(cA)=cnโˆ’1adj(A)\text{adj}(cA) = c^{n-1} \text{adj}(A)
Fundamental identityAโ‹…adj(A)=adj(A)โ‹…A=detโก(A)โ‹…InA \cdot \text{adj}(A) = \text{adj}(A) \cdot A = \det(A) \cdot I_n

5. Edge Cases & Gotchas

SituationWhat Happens
** detโก(A)=0\det(A) = 0 **Cramer's rule is undefined; the system may have 0 or infinitely many solutions
Rectangular matricesCramer's rule only works for square AA
** 1ร—11 \times 1 system**A=[a]A = [a] , x=b/ax = b/a (Cramer's rule reduces to division)
Near-zero determinantNumerically unstable โ€” small errors in detโก\det blow up the solution

6. Common Pitfalls

โŒ Pitfall 1: Forgetting to divide by detโก(A)\det(A)

The formula is xj=detโก(Aj)/detโก(A)x_j = \det(A_j) / \det(A), not xj=detโก(Aj)x_j = \det(A_j). The determinant of the modified matrix alone is not the solution.

โŒ Pitfall 2: Misplacing b\mathbf{b} in the wrong column

To find x2x_2, replace column 2 of AA with b\mathbf{b} โ€” not column 1 or 3.

โŒ Pitfall 3: Applying Cramer's rule to non-square or singular systems

The rule requires AA to be square with detโก(A)โ‰ 0\det(A) \neq 0. Check this first before computing anything.

โŒ Pitfall 4: Confusing adjugate and inverse

Aโˆ’1=adj(A)/detโก(A)A^{-1} = \text{adj}(A) / \det(A), not adj(A)\text{adj}(A) alone (unless detโก(A)=1\det(A) = 1).

7. Formula Summary Table

ConceptFormula
Cramer's rulexj=detโก(Aj)detโก(A)x_j = \frac{\det(A_j)}{\det(A)} , AjA_j = AA with column jj replaced by b\mathbf{b}
CofactorCij=(โˆ’1)i+jMijC_{ij} = (-1)^{i+j} M_{ij}
Adjugateadj(A)=CT\text{adj}(A) = C^T
Inverse via adjugateAโˆ’1=1detโก(A)adj(A)A^{-1} = \frac{1}{\det(A)} \text{adj}(A)
2ร—2 inverse (memorise)[abcd]โˆ’1=1adโˆ’bc[dโˆ’bโˆ’ca]\begin{bmatrix} a & b \\ c & d \end{bmatrix}^{-1} = \frac{1}{ad-bc} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix}
Fundamental identityAโ‹…adj(A)=detโก(A)โ‹…IA \cdot \text{adj}(A) = \det(A) \cdot I

8. ๐Ÿ“ Practice Questions

Q1: 2ร—2 Cramer's rule
Solve:
>{3x+2y=7xโˆ’5y=โˆ’2>> \begin{cases} 3x + 2y = 7 \\ x - 5y = -2 \end{cases} >
Strategy: Compute detโก(A)\det(A), detโก(A1)\det(A_1), detโก(A2)\det(A_2), then xx and yy.
Solution: detโก(A)=3(โˆ’5)โˆ’2(1)=โˆ’15โˆ’2=โˆ’17\det(A) = 3(-5) - 2(1) = -15 - 2 = -17
>detโก(A1)=โˆฃ72โˆ’2โˆ’5โˆฃ=7(โˆ’5)โˆ’2(โˆ’2)=โˆ’35+4=โˆ’31>> \det(A_1) = \begin{vmatrix} 7 & 2 \\ -2 & -5 \end{vmatrix} = 7(-5) - 2(-2) = -35 + 4 = -31 >
>detโก(A2)=โˆฃ371โˆ’2โˆฃ=3(โˆ’2)โˆ’7(1)=โˆ’6โˆ’7=โˆ’13>> \det(A_2) = \begin{vmatrix} 3 & 7 \\ 1 & -2 \end{vmatrix} = 3(-2) - 7(1) = -6 - 7 = -13 >
x=โˆ’31โˆ’17=3117x = \frac{-31}{-17} = \frac{31}{17}, y=โˆ’13โˆ’17=1317y = \frac{-13}{-17} = \frac{13}{17}. Q2: 3ร—3 Cramer's rule
Solve:
>{x+y+z=62xโˆ’y+z=3x+2yโˆ’z=2>> \begin{cases} x + y + z = 6 \\ 2x - y + z = 3 \\ x + 2y - z = 2 \end{cases} >
Solution:
>detโก(A)=โˆฃ1112โˆ’1112โˆ’1โˆฃ>> \det(A) = \begin{vmatrix} 1 & 1 & 1 \\ 2 & -1 & 1 \\ 1 & 2 & -1 \end{vmatrix} >
=1(โˆ’1)(โˆ’1)+1(1)(1)+1(2)(2)โˆ’1(โˆ’1)(1)โˆ’1(1)(2)โˆ’1(2)(โˆ’1)= 1(-1)(-1) + 1(1)(1) + 1(2)(2) - 1(-1)(1) - 1(1)(2) - 1(2)(-1) =1+1+4+1โˆ’2+2=7= 1 + 1 + 4 + 1 - 2 + 2 = 7
>A1=[6113โˆ’1122โˆ’1]>> A_1 = \begin{bmatrix} 6 & 1 & 1 \\ 3 & -1 & 1 \\ 2 & 2 & -1 \end{bmatrix} >
, detโก(A1)=6(โˆ’1)(โˆ’1)+1(1)(2)+1(3)(2)โˆ’1(โˆ’1)(2)โˆ’6(1)(2)โˆ’1(3)(โˆ’1)\det(A_1) = 6(-1)(-1) + 1(1)(2) + 1(3)(2) - 1(-1)(2) - 6(1)(2) - 1(3)(-1) =6+2+6+2โˆ’12+3=7= 6 + 2 + 6 + 2 - 12 + 3 = 7
x=77=1x = \frac{7}{7} = 1
>A2=[16123112โˆ’1]>> A_2 = \begin{bmatrix} 1 & 6 & 1 \\ 2 & 3 & 1 \\ 1 & 2 & -1 \end{bmatrix} >
, detโก(A2)=1(3)(โˆ’1)+6(1)(1)+1(2)(2)โˆ’1(3)(1)โˆ’1(1)(2)โˆ’6(2)(โˆ’1)\det(A_2) = 1(3)(-1) + 6(1)(1) + 1(2)(2) - 1(3)(1) - 1(1)(2) - 6(2)(-1) =โˆ’3+6+4โˆ’3โˆ’2+12=14= -3 + 6 + 4 - 3 - 2 + 12 = 14
y=147=2y = \frac{14}{7} = 2
>A3=[1162โˆ’13122]>> A_3 = \begin{bmatrix} 1 & 1 & 6 \\ 2 & -1 & 3 \\ 1 & 2 & 2 \end{bmatrix} >
, detโก(A3)=1(โˆ’1)(2)+1(3)(1)+6(2)(2)โˆ’6(โˆ’1)(1)โˆ’1(3)(2)โˆ’1(2)(2)\det(A_3) = 1(-1)(2) + 1(3)(1) + 6(2)(2) - 6(-1)(1) - 1(3)(2) - 1(2)(2) =โˆ’2+3+24+6โˆ’6โˆ’4=21= -2 + 3 + 24 + 6 - 6 - 4 = 21
z=217=3z = \frac{21}{7} = 3
Solution: x=1x = 1, y=2y = 2, z=3z = 3. Q3: 2ร—2 inverse
Find Aโˆ’1A^{-1} for
>A=[4321]>> A = \begin{bmatrix} 4 & 3 \\ 2 & 1 \end{bmatrix} >
.
Solution: detโก(A)=4(1)โˆ’3(2)=4โˆ’6=โˆ’2\det(A) = 4(1) - 3(2) = 4 - 6 = -2
>Aโˆ’1=1โˆ’2[1โˆ’3โˆ’24]=[โˆ’12321โˆ’2]>> A^{-1} = \frac{1}{-2} \begin{bmatrix} 1 & -3 \\ -2 & 4 \end{bmatrix} = \begin{bmatrix} -\frac{1}{2} & \frac{3}{2} \\ 1 & -2 \end{bmatrix} >
Verify:
>AAโˆ’1=[4321][โˆ’12321โˆ’2]=[โˆ’2+36โˆ’6โˆ’1+13โˆ’2]=[1001]>> AA^{-1} = \begin{bmatrix} 4 & 3 \\ 2 & 1 \end{bmatrix} \begin{bmatrix} -\frac{1}{2} & \frac{3}{2} \\ 1 & -2 \end{bmatrix} = \begin{bmatrix} -2+3 & 6-6 \\ -1+1 & 3-2 \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} >
โœ“ Q4: 3ร—3 inverse
Find Aโˆ’1A^{-1} for
>A=[1022โˆ’13418]>> A = \begin{bmatrix} 1 & 0 & 2 \\ 2 & -1 & 3 \\ 4 & 1 & 8 \end{bmatrix} >
.
Solution: detโก(A)=1(โˆ’1)(8)+0(3)(4)+2(2)(1)โˆ’2(โˆ’1)(4)โˆ’1(3)(1)โˆ’0(2)(8)\det(A) = 1(-1)(8) + 0(3)(4) + 2(2)(1) - 2(-1)(4) - 1(3)(1) - 0(2)(8) =โˆ’8+0+4+8โˆ’3โˆ’0=1= -8 + 0 + 4 + 8 - 3 - 0 = 1
Cofactors:
>C11=+detโก[โˆ’1318]=โˆ’8โˆ’3=โˆ’11>> C_{11} = +\det\begin{bmatrix} -1 & 3 \\ 1 & 8 \end{bmatrix} = -8 - 3 = -11 >
>C12=โˆ’detโก[2348]=โˆ’(16โˆ’12)=โˆ’4>> C_{12} = -\det\begin{bmatrix} 2 & 3 \\ 4 & 8 \end{bmatrix} = -(16 - 12) = -4 >
>C13=+detโก[2โˆ’141]=2โˆ’(โˆ’4)=6>> C_{13} = +\det\begin{bmatrix} 2 & -1 \\ 4 & 1 \end{bmatrix} = 2 - (-4) = 6 >
>C21=โˆ’detโก[0218]=โˆ’(0โˆ’2)=2>> C_{21} = -\det\begin{bmatrix} 0 & 2 \\ 1 & 8 \end{bmatrix} = -(0 - 2) = 2 >
>C22=+detโก[1248]=8โˆ’8=0>> C_{22} = +\det\begin{bmatrix} 1 & 2 \\ 4 & 8 \end{bmatrix} = 8 - 8 = 0 >
>C23=โˆ’detโก[1041]=โˆ’(1โˆ’0)=โˆ’1>> C_{23} = -\det\begin{bmatrix} 1 & 0 \\ 4 & 1 \end{bmatrix} = -(1 - 0) = -1 >
>C31=+detโก[02โˆ’13]=0โˆ’(โˆ’2)=2>> C_{31} = +\det\begin{bmatrix} 0 & 2 \\ -1 & 3 \end{bmatrix} = 0 - (-2) = 2 >
>C32=โˆ’detโก[1223]=โˆ’(3โˆ’4)=1>> C_{32} = -\det\begin{bmatrix} 1 & 2 \\ 2 & 3 \end{bmatrix} = -(3 - 4) = 1 >
>C33=+detโก[102โˆ’1]=โˆ’1โˆ’0=โˆ’1>> C_{33} = +\det\begin{bmatrix} 1 & 0 \\ 2 & -1 \end{bmatrix} = -1 - 0 = -1 >
>adj(A)=CT=[โˆ’1122โˆ’4016โˆ’1โˆ’1]>> \text{adj}(A) = C^T = \begin{bmatrix} -11 & 2 & 2 \\ -4 & 0 & 1 \\ 6 & -1 & -1 \end{bmatrix} >
Since detโก(A)=1\det(A) = 1, Aโˆ’1=adj(A)A^{-1} = \text{adj}(A). Q5: Using Cramer's rule with parameters
For what kk does Cramer's rule apply? Solve for xx and yy:
>{kx+y=1x+ky=1>> \begin{cases} kx + y = 1 \\ x + ky = 1 \end{cases} >
Solution: detโก(A)=k(k)โˆ’1(1)=k2โˆ’1=(kโˆ’1)(k+1)\det(A) = k(k) - 1(1) = k^2 - 1 = (k-1)(k+1)
Cramer's rule applies when detโก(A)โ‰ 0\det(A) \neq 0, i.e., kโ‰ ยฑ1k \neq \pm 1.
>detโก(A1)=โˆฃ111kโˆฃ=kโˆ’1>> \det(A_1) = \begin{vmatrix} 1 & 1 \\ 1 & k \end{vmatrix} = k - 1 >
>detโก(A2)=โˆฃk111โˆฃ=kโˆ’1>> \det(A_2) = \begin{vmatrix} k & 1 \\ 1 & 1 \end{vmatrix} = k - 1 >
x=kโˆ’1(kโˆ’1)(k+1)=1k+1x = \frac{k-1}{(k-1)(k+1)} = \frac{1}{k+1} (for kโ‰ ยฑ1k \neq \pm 1) y=kโˆ’1(kโˆ’1)(k+1)=1k+1y = \frac{k-1}{(k-1)(k+1)} = \frac{1}{k+1} (for kโ‰ ยฑ1k \neq \pm 1)
Check: When k=1k = 1, the system is x+y=1x+y=1, x+y=1x+y=1 (infinitely many solutions). When k=โˆ’1k = -1, the system is โˆ’x+y=1-x+y=1, xโˆ’y=1x-y=1 (inconsistent). Q6: Adjugate properties
Verify Aโ‹…adj(A)=detโก(A)โ‹…IA \cdot \text{adj}(A) = \det(A) \cdot I for
>A=[2134]>> A = \begin{bmatrix} 2 & 1 \\ 3 & 4 \end{bmatrix} >
.
Solution: detโก(A)=8โˆ’3=5\det(A) = 8 - 3 = 5
>adj(A)=[4โˆ’1โˆ’32]>> \text{adj}(A) = \begin{bmatrix} 4 & -1 \\ -3 & 2 \end{bmatrix} >
>Aโ‹…adj(A)=[2134][4โˆ’1โˆ’32]=[8โˆ’3โˆ’2+212โˆ’12โˆ’3+8]=[5005]=5I>> A \cdot \text{adj}(A) = \begin{bmatrix} 2 & 1 \\ 3 & 4 \end{bmatrix} \begin{bmatrix} 4 & -1 \\ -3 & 2 \end{bmatrix} = \begin{bmatrix} 8-3 & -2+2 \\ 12-12 & -3+8 \end{bmatrix} = \begin{bmatrix} 5 & 0 \\ 0 & 5 \end{bmatrix} = 5I >
โœ“ Q7: Solving with inverse
Solve Ax=bA\mathbf{x} = \mathbf{b} using Aโˆ’1A^{-1} where
>A=[1225]>> A = \begin{bmatrix} 1 & 2 \\ 2 & 5 \end{bmatrix} >
,
>b=[37]>> \mathbf{b} = \begin{bmatrix} 3 \\ 7 \end{bmatrix} >
.
Solution: detโก(A)=5โˆ’4=1\det(A) = 5 - 4 = 1
>Aโˆ’1=11[5โˆ’2โˆ’21]=[5โˆ’2โˆ’21]>> A^{-1} = \frac{1}{1} \begin{bmatrix} 5 & -2 \\ -2 & 1 \end{bmatrix} = \begin{bmatrix} 5 & -2 \\ -2 & 1 \end{bmatrix} >
>x=Aโˆ’1b=[5โˆ’2โˆ’21][37]=[15โˆ’14โˆ’6+7]=[11]>> \mathbf{x} = A^{-1}\mathbf{b} = \begin{bmatrix} 5 & -2 \\ -2 & 1 \end{bmatrix} \begin{bmatrix} 3 \\ 7 \end{bmatrix} = \begin{bmatrix} 15 - 14 \\ -6 + 7 \end{bmatrix} = \begin{bmatrix} 1 \\ 1 \end{bmatrix} >
Check: 1(1)+2(1)=31(1) + 2(1) = 3 โœ“, 2(1)+5(1)=72(1) + 5(1) = 7 โœ“. Q8: Cramer's rule โ€” word problem
A company makes two products. The profit equations are:
>{5x+3y=1902x+4y=120>> \begin{cases} 5x + 3y = 190 \\ 2x + 4y = 120 \end{cases} >
where xx = units of product A, yy = units of product B. Find xx and yy.
Solution: detโก(A)=5(4)โˆ’3(2)=20โˆ’6=14\det(A) = 5(4) - 3(2) = 20 - 6 = 14
>detโก(A1)=โˆฃ19031204โˆฃ=190(4)โˆ’3(120)=760โˆ’360=400>> \det(A_1) = \begin{vmatrix} 190 & 3 \\ 120 & 4 \end{vmatrix} = 190(4) - 3(120) = 760 - 360 = 400 >
>detโก(A2)=โˆฃ51902120โˆฃ=5(120)โˆ’190(2)=600โˆ’380=220>> \det(A_2) = \begin{vmatrix} 5 & 190 \\ 2 & 120 \end{vmatrix} = 5(120) - 190(2) = 600 - 380 = 220 >
x=40014โ‰ˆ28.57x = \frac{400}{14} \approx 28.57, y=22014โ‰ˆ15.71y = \frac{220}{14} \approx 15.71. Q9: Determinant of adjugate
If AA is 3ร—33 \times 3 with detโก(A)=โˆ’4\det(A) = -4, find detโก(adj(A))\det(\text{adj}(A)).
Solution: detโก(adj(A))=(detโก(A))nโˆ’1=(โˆ’4)2=16\det(\text{adj}(A)) = (\det(A))^{n-1} = (-4)^2 = 16. Q10: When Cramer's rule fails
Explain why Cramer's rule cannot solve the system:
>{x+2y=52x+4y=10>> \begin{cases} x + 2y = 5 \\ 2x + 4y = 10 \end{cases} >
and find all solutions.
Solution: detโก(A)=1(4)โˆ’2(2)=4โˆ’4=0\det(A) = 1(4) - 2(2) = 4 - 4 = 0, so Cramer's rule is inapplicable.
The second equation is twice the first, so we have x+2y=5x + 2y = 5. x=5โˆ’2yx = 5 - 2y, yy free. Infinitely many solutions.
Parametric:
>[xy]=[50]+y[โˆ’21]>> \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} 5 \\ 0 \end{bmatrix} + y\begin{bmatrix} -2 \\ 1 \end{bmatrix} >
.

๐Ÿ”— Cross-References

Document outline

Keep your place and jump directly to a heading.

Table of contents

No note selected

Open a chapter to see its outline, backlinks, and sources here.