Cramer's Rule Introduction

Master Cramer's Rule: solving linear systems using determinants through these 5 detailed exercises.

Cramer's Rule Concepts & Formulas
\(x_i = \frac{\det(A_i)}{\det(A)}\)
Cramer's Rule General Formula
\(x = \frac{\det\begin{pmatrix} e & b \\ f & d \end{pmatrix}}{\det\begin{pmatrix} a & b \\ c & d \end{pmatrix}}, y = \frac{\det\begin{pmatrix} a & e \\ c & f \end{pmatrix}}{\det\begin{pmatrix} a & b \\ c & d \end{pmatrix}}\)
2×2 System Example
Key Definitions:

Cramer's Rule: A method for solving systems of linear equations using determinants when the coefficient matrix is square and invertible.

Coeficient Matrix (A): Matrix containing coefficients of the variables in the system.

Augmented Matrix: Coefficient matrix with the constant vector added as an extra column.

Column Replacement: For each variable, replace the corresponding column in A with the constants.

Step-by-Step Process:
  1. Write the system in matrix form: \(AX = B\)
  2. Calculate \(\det(A)\): Must be non-zero for Cramer's Rule to apply
  3. For each variable: Replace the corresponding column in A with B
  4. Calculate the new determinant: \(\det(A_i)\) where i is the variable index
  5. Apply the formula: \(x_i = \frac{\det(A_i)}{\det(A)}\)
Limitations: Only works for square systems with \(\det(A) \neq 0\) (unique solution).
Advantages: Direct formula for each variable without solving the entire system.
Tip 1: Always check that \(\det(A) \neq 0\) before applying Cramer's Rule.
Tip 2: For 2×2 systems, remember to replace the correct column for each variable.
Tip 3: Verify your solution by substituting back into the original equations.
Solution: Exercises 1 to 3
1 Basic 2×2 System
Exercise 1
Solve the system using Cramer's Rule:
\(2x + 3y = 7\)
\(x - y = 1\)
Matrix Form:

\(A = \begin{pmatrix} 2 & 3 \\ 1 & -1 \end{pmatrix}\), \(X = \begin{pmatrix} x \\ y \end{pmatrix}\), \(B = \begin{pmatrix} 7 \\ 1 \end{pmatrix}\)

Coefficient Matrix
\(A = \begin{pmatrix} 2 & 3 \\ 1 & -1 \end{pmatrix}\)
Constants Vector
\(B = \begin{pmatrix} 7 \\ 1 \end{pmatrix}\)
Step 1: Calculate \(\det(A)\)

\(\det(A) = (2)(-1) - (3)(1) = -2 - 3 = -5\)

Step 2: Find \(A_x\) (replace first column with constants)

\(A_x = \begin{pmatrix} 7 & 3 \\ 1 & -1 \end{pmatrix}\)

\(\det(A_x) = (7)(-1) - (3)(1) = -7 - 3 = -10\)

Step 3: Find \(A_y\) (replace second column with constants)

\(A_y = \begin{pmatrix} 2 & 7 \\ 1 & 1 \end{pmatrix}\)

\(\det(A_y) = (2)(1) - (7)(1) = 2 - 7 = -5\)

Step 4: Apply Cramer's Rule

\(x = \frac{\det(A_x)}{\det(A)} = \frac{-10}{-5} = 2\)

\(y = \frac{\det(A_y)}{\det(A)} = \frac{-5}{-5} = 1\)

\(x = 2, y = 1\)
Final Answer:

\(x = 2, y = 1\)

Verification:

Check: \(2(2) + 3(1) = 4 + 3 = 7\) ✓

Check: \(2 - 1 = 1\) ✓

2 Another 2×2 System
Exercise 2
Solve the system using Cramer's Rule:
\(4x - 2y = 6\)
\(3x + 5y = 1\)
Matrix Form:

\(A = \begin{pmatrix} 4 & -2 \\ 3 & 5 \end{pmatrix}\), \(X = \begin{pmatrix} x \\ y \end{pmatrix}\), \(B = \begin{pmatrix} 6 \\ 1 \end{pmatrix}\)

Step 1: Calculate \(\det(A)\)

\(\det(A) = (4)(5) - (-2)(3) = 20 + 6 = 26\)

Step 2: Find \(A_x\) (replace first column with constants)

\(A_x = \begin{pmatrix} 6 & -2 \\ 1 & 5 \end{pmatrix}\)

\(\det(A_x) = (6)(5) - (-2)(1) = 30 + 2 = 32\)

Step 3: Find \(A_y\) (replace second column with constants)

\(A_y = \begin{pmatrix} 4 & 6 \\ 3 & 1 \end{pmatrix}\)

\(\det(A_y) = (4)(1) - (6)(3) = 4 - 18 = -14\)

Step 4: Apply Cramer's Rule

\(x = \frac{\det(A_x)}{\det(A)} = \frac{32}{26} = \frac{16}{13}\)

\(y = \frac{\det(A_y)}{\det(A)} = \frac{-14}{26} = -\frac{7}{13}\)

\(x = \frac{16}{13}, y = -\frac{7}{13}\)
Final Answer:

\(x = \frac{16}{13}, y = -\frac{7}{13}\)

3 3×3 System
Exercise 3
Solve the system using Cramer's Rule:
\(x + y + z = 6\)
\(2x - y + z = 3\)
\(x + 2y - z = 1\)
Matrix Form:

\(A = \begin{pmatrix} 1 & 1 & 1 \\ 2 & -1 & 1 \\ 1 & 2 & -1 \end{pmatrix}\), \(X = \begin{pmatrix} x \\ y \\ z \end{pmatrix}\), \(B = \begin{pmatrix} 6 \\ 3 \\ 1 \end{pmatrix}\)

Step 1: Calculate \(\det(A)\)

\(\det(A) = 1\begin{vmatrix} -1 & 1 \\ 2 & -1 \end{vmatrix} - 1\begin{vmatrix} 2 & 1 \\ 1 & -1 \end{vmatrix} + 1\begin{vmatrix} 2 & -1 \\ 1 & 2 \end{vmatrix}\)

\(= 1((-1)(-1) - (1)(2)) - 1((2)(-1) - (1)(1)) + 1((2)(2) - (-1)(1))\)

\(= 1(1 - 2) - 1(-2 - 1) + 1(4 + 1) = -1 + 3 + 5 = 7\)

Step 2: Find \(A_x\) (replace first column with constants)

\(A_x = \begin{pmatrix} 6 & 1 & 1 \\ 3 & -1 & 1 \\ 1 & 2 & -1 \end{pmatrix}\)

\(\det(A_x) = 6\begin{vmatrix} -1 & 1 \\ 2 & -1 \end{vmatrix} - 1\begin{vmatrix} 3 & 1 \\ 1 & -1 \end{vmatrix} + 1\begin{vmatrix} 3 & -1 \\ 1 & 2 \end{vmatrix}\)

\(= 6(1 - 2) - 1(-3 - 1) + 1(6 + 1) = 6(-1) - 1(-4) + 1(7) = -6 + 4 + 7 = 5\)

Step 3: Find \(A_y\) (replace second column with constants)

\(A_y = \begin{pmatrix} 1 & 6 & 1 \\ 2 & 3 & 1 \\ 1 & 1 & -1 \end{pmatrix}\)

\(\det(A_y) = 1\begin{vmatrix} 3 & 1 \\ 1 & -1 \end{vmatrix} - 6\begin{vmatrix} 2 & 1 \\ 1 & -1 \end{vmatrix} + 1\begin{vmatrix} 2 & 3 \\ 1 & 1 \end{vmatrix}\)

\(= 1(-3 - 1) - 6(-2 - 1) + 1(2 - 3) = 1(-4) - 6(-3) + 1(-1) = -4 + 18 - 1 = 13\)

Step 4: Find \(A_z\) (replace third column with constants)

\(A_z = \begin{pmatrix} 1 & 1 & 6 \\ 2 & -1 & 3 \\ 1 & 2 & 1 \end{pmatrix}\)

\(\det(A_z) = 1\begin{vmatrix} -1 & 3 \\ 2 & 1 \end{vmatrix} - 1\begin{vmatrix} 2 & 3 \\ 1 & 1 \end{vmatrix} + 6\begin{vmatrix} 2 & -1 \\ 1 & 2 \end{vmatrix}\)

\(= 1(-1 - 6) - 1(2 - 3) + 6(4 + 1) = 1(-7) - 1(-1) + 6(5) = -7 + 1 + 30 = 24\)

Step 5: Apply Cramer's Rule

\(x = \frac{\det(A_x)}{\det(A)} = \frac{5}{7}\)

\(y = \frac{\det(A_y)}{\det(A)} = \frac{13}{7}\)

\(z = \frac{\det(A_z)}{\det(A)} = \frac{24}{7}\)

\(x = \frac{5}{7}, y = \frac{13}{7}, z = \frac{24}{7}\)
Final Answer:

\(x = \frac{5}{7}, y = \frac{13}{7}, z = \frac{24}{7}\)

Solution: Exercises 4 to 5
4 Word Problem Application
Exercise 4
A store sells apples, bananas, and oranges. Three customers bought different quantities:
Customer 1: 2 apples, 1 banana, 1 orange for $8
Customer 2: 1 apple, 3 bananas, 2 oranges for $13
Customer 3: 3 apples, 1 banana, 1 orange for $10
Find the price of each fruit using Cramer's Rule.
Let variables represent prices:

Let \(x\) = price of apple, \(y\) = price of banana, \(z\) = price of orange

Step 1: Set up the system

\(2x + y + z = 8\)
\(x + 3y + 2z = 13\)
\(3x + y + z = 10\)

Step 2: Write in matrix form

\(A = \begin{pmatrix} 2 & 1 & 1 \\ 1 & 3 & 2 \\ 3 & 1 & 1 \end{pmatrix}\), \(X = \begin{pmatrix} x \\ y \\ z \end{pmatrix}\), \(B = \begin{pmatrix} 8 \\ 13 \\ 10 \end{pmatrix}\)

Step 3: Calculate \(\det(A)\)

\(\det(A) = 2\begin{vmatrix} 3 & 2 \\ 1 & 1 \end{vmatrix} - 1\begin{vmatrix} 1 & 2 \\ 3 & 1 \end{vmatrix} + 1\begin{vmatrix} 1 & 3 \\ 3 & 1 \end{vmatrix}\)

\(= 2(3 - 2) - 1(1 - 6) + 1(1 - 9) = 2(1) - 1(-5) + 1(-8) = 2 + 5 - 8 = -1\)

Step 4: Find \(A_x\), \(A_y\), and \(A_z\)

\(A_x = \begin{pmatrix} 8 & 1 & 1 \\ 13 & 3 & 2 \\ 10 & 1 & 1 \end{pmatrix}\), \(\det(A_x) = 8(3-2) - 1(13-20) + 1(13-30) = 8(1) - 1(-7) + 1(-17) = 8 + 7 - 17 = -2\)

\(A_y = \begin{pmatrix} 2 & 8 & 1 \\ 1 & 13 & 2 \\ 3 & 10 & 1 \end{pmatrix}\), \(\det(A_y) = 2(13-20) - 8(1-6) + 1(10-39) = 2(-7) - 8(-5) + 1(-29) = -14 + 40 - 29 = -3\)

\(A_z = \begin{pmatrix} 2 & 1 & 8 \\ 1 & 3 & 13 \\ 3 & 1 & 10 \end{pmatrix}\), \(\det(A_z) = 2(30-13) - 1(10-39) + 8(1-9) = 2(17) - 1(-29) + 8(-8) = 34 + 29 - 64 = -1\)

Step 5: Apply Cramer's Rule

\(x = \frac{\det(A_x)}{\det(A)} = \frac{-2}{-1} = 2\)

\(y = \frac{\det(A_y)}{\det(A)} = \frac{-3}{-1} = 3\)

\(z = \frac{\det(A_z)}{\det(A)} = \frac{-1}{-1} = 1\)

Apple: $2, Banana: $3, Orange: $1
Final Answer:

Apple costs $2, Banana costs $3, Orange costs $1

5 Parameter System
Exercise 5
For what values of parameter \(k\) can Cramer's Rule be applied to solve the system:
\(x + ky = 1\)
\(kx + y = k\)
Matrix Form:

\(A = \begin{pmatrix} 1 & k \\ k & 1 \end{pmatrix}\), \(X = \begin{pmatrix} x \\ y \end{pmatrix}\), \(B = \begin{pmatrix} 1 \\ k \end{pmatrix}\)

Step 1: Calculate \(\det(A)\)

\(\det(A) = (1)(1) - (k)(k) = 1 - k^2\)

Step 2: Determine when Cramer's Rule applies

Cramer's Rule applies when \(\det(A) \neq 0\)

\(1 - k^2 \neq 0 \Rightarrow k^2 \neq 1 \Rightarrow k \neq \pm 1\)

Step 3: Find solution when Cramer's Rule applies

For \(k \neq \pm 1\):

\(A_x = \begin{pmatrix} 1 & k \\ k & 1 \end{pmatrix}\), \(\det(A_x) = 1 - k^2\)

\(A_y = \begin{pmatrix} 1 & 1 \\ k & k \end{pmatrix}\), \(\det(A_y) = k - k = 0\)

\(x = \frac{1 - k^2}{1 - k^2} = 1\), \(y = \frac{0}{1 - k^2} = 0\)

Step 4: Analyze special cases

When \(k = 1\): System becomes \(x + y = 1\) and \(x + y = 1\) (infinite solutions)

When \(k = -1\): System becomes \(x - y = 1\) and \(-x + y = -1\) (same equation, infinite solutions)

Cramer's Rule applies when \(k \neq \pm 1\)
Final Answer:

Cramer's Rule can be applied for all values of \(k\) except \(k = 1\) and \(k = -1\).

Key Insight:

• When \(\det(A) = 0\), the system has either no solution or infinitely many solutions

• Cramer's Rule only applies to systems with unique solutions

• Parameter analysis helps identify critical values where solution behavior changes

Comprehensive Summary: Cramer's Rule
Core Concepts:

Cramer's Rule: A method to solve systems of linear equations using determinants, applicable only when the coefficient matrix is square and invertible.

Condition for Use: The system must have the same number of equations as unknowns and \(\det(A) \neq 0\).

Algorithm Steps:
  1. Formulate: Write system as \(AX = B\)
  2. Check: Verify \(\det(A) \neq 0\)
  3. Replace: For each variable \(x_i\), replace column \(i\) of \(A\) with \(B\)
  4. Calculate: Compute \(\det(A_i)\) for each modified matrix
  5. Solve: Apply formula \(x_i = \frac{\det(A_i)}{\det(A)}\)
Advantages & Limitations:

Advantages:

  • Direct formula for each variable without solving the entire system
  • Useful for theoretical analysis
  • Elegant mathematical expression

Limitations:

  • Only works when \(\det(A) \neq 0\)
  • Computationally expensive for large systems
  • Not suitable for systems with no or infinite solutions
Memory Tip: "Replace column, divide by original determinant"
Efficiency Tip: Use for small systems (2×2 or 3×3) where you need only specific variables
Verification Tip: Always substitute back to verify your solution
Caution Tip: Never use when \(\det(A) = 0\) - system may be inconsistent
Cramer's Rule Workflow
1
Verify Square System
2
Calculate det(A)
3
Replace Columns
4
Apply Formula

Questions & Answers

Question: When is Cramer's Rule more efficient than other methods like elimination or substitution?

Answer: Cramer's Rule is most efficient when:

  • You need only one or two specific variables (not the entire solution set)
  • Working with small systems (2×2 or 3×3)
  • Doing theoretical work or proofs involving determinants
  • Verifying solutions or checking consistency conditions

However, for solving complete systems, Gaussian elimination is generally more efficient, especially for larger systems, as it avoids the computational complexity of multiple determinant calculations.

Question: What happens if the determinant of the coefficient matrix is zero?

Answer: When \(\det(A) = 0\), Cramer's Rule cannot be applied because division by zero is undefined. This situation indicates that the system has either:

  • No solution: The equations are inconsistent (parallel lines/planes)
  • Infinitely many solutions: The equations are dependent (same line/plane)

In such cases, you need to use other methods like Gaussian elimination to determine which scenario applies.

Question: How do I remember which column to replace for each variable?

Answer: Use this simple indexing rule:

  • For variable \(x_1\) (the first variable), replace column 1
  • For variable \(x_2\) (the second variable), replace column 2
  • For variable \(x_n\) (the nth variable), replace column n

In the system \(ax + by = e\), \(cx + dy = f\), to find \(x\), replace the first column (coefficients of \(x\)) with the constants. To find \(y\), replace the second column (coefficients of \(y\)) with the constants.