How does Cramer’s rule work?

Cramer’s rule is a powerful tool in linear algebra for solving systems of linear equations. It offers a straightforward method by leveraging determinants, making it especially useful when dealing with small systems of equations.

Understanding the Basics

Systems of Linear Equations

A system of linear equations is a collection of one or more linear equations involving the same set of variables. For example:

$begin{cases}
2x + 3y = 5 \
4x – y = 6
end{cases}$

Here, we have a system of two equations with two variables, x and y.

Determinants

A determinant is a scalar value that can be computed from the elements of a square matrix. It provides important properties about the matrix, such as whether it is invertible. For a 2×2 matrix, the determinant is calculated as:

$text{det}(A) = begin{vmatrix} a & b \ c & d end{vmatrix} = ad – bc$

For a 3×3 matrix, it is a bit more complex:

$text{det}(A) = begin{vmatrix} a & b & c \ d & e & f \ g & h & i end{vmatrix} = a(ei – fh) – b(di – fg) + c(dh – eg)$

Applying Cramer’s Rule

Cramer’s rule states that for a system of n linear equations with n unknowns, the solution can be found using determinants. Let’s break it down step-by-step.

  1. Write the System in Matrix Form
    Consider the system:

    $begin{cases}
    a_1x + b_1y = c_1 \
    a_2x + b_2y = c_2
    end{cases}$

    This can be written in matrix form as:

    $Amathbf{x} = mathbf{b}$

    where

    $A = begin{pmatrix} a_1 & b_1 \ a_2 & b_2 end{pmatrix}, mathbf{x} = begin{pmatrix} x \ y end{pmatrix}, mathbf{b} = begin{pmatrix} c_1 \ c_2 end{pmatrix}$

  1. Compute the Determinant of A
    Calculate the determinant of matrix A:

    $text{det}(A) = begin{vmatrix} a_1 & b_1 \ a_2 & b_2 end{vmatrix} = a_1b_2 – a_2b_1$

  1. Formulate Matrices for Each Variable
    To find the value of each variable, replace the corresponding column in A with the column vector b and compute the determinant of the new matrix. For x, replace the first column of A with b:

    $A_x = begin{pmatrix} c_1 & b_1 \ c_2 & b_2 end{pmatrix}$

    For y, replace the second column of A with b:

    $A_y = begin{pmatrix} a_1 & c_1 \ a_2 & c_2 end{pmatrix}$

  1. Solve for Each Variable
    The solution for each variable is given by the ratio of the determinant of the modified matrix to the determinant of the original matrix A. For x:

    $x = frac{text{det}(A_x)}{text{det}(A)} = frac{begin{vmatrix} c_1 & b_1 \ c_2 & b_2 end{vmatrix}}{begin{vmatrix} a_1 & b_1 \ a_2 & b_2 end{vmatrix}} = frac{c_1b_2 – c_2b_1}{a_1b_2 – a_2b_1}$

    For y:

    $y = frac{text{det}(A_y)}{text{det}(A)} = frac{begin{vmatrix} a_1 & c_1 \ a_2 & c_2 end{vmatrix}}{begin{vmatrix} a_1 & b_1 \ a_2 & b_2 end{vmatrix}} = frac{a_1c_2 – a_2c_1}{a_1b_2 – a_2b_1}$

Example

Let’s solve the system:

$begin{cases}
2x + 3y = 5 \
4x – y = 6
end{cases}$

  1. Write in matrix form:

$A = begin{pmatrix} 2 & 3 \ 4 & -1 end{pmatrix}, mathbf{b} = begin{pmatrix} 5 \ 6 end{pmatrix}$

  1. Compute determinant of A:

$text{det}(A) = 2(-1) – 4(3) = -2 – 12 = -14$

  1. Formulate matrices for x and y:

$A_x = begin{pmatrix} 5 & 3 \ 6 & -1 end{pmatrix}, A_y = begin{pmatrix} 2 & 5 \ 4 & 6 end{pmatrix}$

  1. Compute determinants:

$text{det}(A_x) = 5(-1) – 6(3) = -5 – 18 = -23$

$text{det}(A_y) = 2(6) – 4(5) = 12 – 20 = -8$

  1. Solve for x and y:

$x = frac{-23}{-14} = frac{23}{14}, y = frac{-8}{-14} = frac{4}{7}$

Conclusion

Cramer’s rule is an elegant method for solving systems of linear equations using determinants. While it becomes cumbersome for larger systems, it provides a straightforward solution for smaller ones. Understanding this rule enhances our grasp of linear algebra and its applications.

Citations

  1. 1. Khan Academy – Cramer’s Rule
  2. 2. Math is Fun – Cramer’s Rule
  3. 3. Wolfram MathWorld – Cramer’s Rule

Related

(2) O3 + H → O2 + OH k2 = 1.78×10^-11 cm^3 s^-1 (3) O + OH → O2 + H k3 = 4.40×10^-11 cm^3 s^-1 (5) O + HO2 → O2 + OH k5 = 3.50×10^-11 cm^3 s^-1 (6) H + HO2 → O2 + H2 k6 = 5.40×10^-12 cm^3 s^-1 (9) OH + HO2 → O2 + H2O2 k9 = 4.00×10^-11 cm^3 s^-1 (10) HO2 + HO2 → O2 + H2O2 k10 = 2.50×10^-12 cm s^-1 (11) O + O2 + M → O3 + M k11 = 1.05×10^-34 cm^6 s^-1 (14) H + O2 + M → HO2 + M k14 = 8.08×10^-32 cm^6 s^-1 (15) H + H + M → H2O + M k15 = 3.31×10^-27 cm^6 s^-1 (16) O2 + hv → 2 O k16 = (1.26×10^-8 s^-1) φ (17) H2O + hv → H + OH k17 = (3.4×10^-6 s^-1) φ (18) O3 + hv → O2 + O k18 = (7.10×10^-5 s^-1) φ

Table 1 Reactions, rate constants and activation energies used in the model* No. Reaction kopt (M⁻¹ s⁻¹) 1 OH + H₂ → H + H₂O 3.74 x 10⁷ 2 OH + HO₂ → HO₂ + OH⁻ 5 x 10⁹ 3 OH + H₂O₂ → HO₂ + H₂O 3.8 x 10⁷ 4 OH + O₂ → O₂ + OH 9.96 x 10⁹ 5 OH + HO₂ → O₂ + H₂O 7.1 x 10⁹ 6 OH + OH → H₂O₂ 5.3 x 10⁹ 7 OH + e⁻aq → OH⁻ 3 x 10¹⁰ 8 H + O₂ → HO₂ 2.0 x 10¹⁰ 9 H + HO₂ → H₂O₂ 2.0 x 10¹⁰ 10 H + H₂O₂ → OH + H₂O 3.44 x 10⁷ 11 H + OH → H₂O 1.4 x 10¹⁰ 12 H + H → H₂ 1.94 x 10¹⁰ 13 e⁻aq + O₂ → O₂⁻ 1.9 x 10¹⁰ 14 e⁻aq + O₂ → HO₂⁻ + OH⁻ 1.3 x 10¹⁰ 15 e⁻aq + HO₂ 2.0 x 10¹⁰ 16 e⁻aq + H₂O₂ 1.1 x 10¹⁰ 17 e⁻aq + HO₂ → OH + OH⁻ 1.3 x 10¹⁰ 18 e⁻aq + H⁺ → H 2.3 x 10¹⁰ 19 e⁻aq + e⁻aq → H₂ + OH⁻ + OH⁻ 2.5 x 10⁹ 20 HO₂ + O₂ → O₂ + HO₂ 1.3 x 10⁹ 21 HO₂ + HO₂ → O₂ + H₂O₂ 8.3 x 10⁵ 22 HO₂ + HO₂ → O₂ + OH + H₂O 3.7 23 HO₂ + HO₂ → O₂ + O₂ + OH + H₂O 7 x 10⁵ s⁻¹ 24 H⁺ + O₂⁻ → HO₂ 4.5 x 10¹⁰ 25 H⁺ + O₂⁻ → O₂ 2.0 x 10¹⁰ 26 H⁺ + OH⁻ 1.4 x 10¹¹ 27 H⁺ + HO₂⁻ 2 x 10¹⁰ 28 H₂O₂ → HO₂ + H⁺ + OH⁻ 2.5 x 10⁻⁵ s⁻¹ 29 H₂O₂ → H⁺ + OH⁻ 1.4 x 10⁻⁷ s⁻¹ 30 O₂ + O₂ → O₂ + HO₂ + OH⁻ 0.3 31 O₂ + H₂O₂ → O₂ + OH + OH 16 32

(2) O3 + H → O2 + OH k2 = 1.78×10^-11 cm^3 s^-1 (3) O + OH → O2 + H k3 = 4.40×10^-11 cm^3 s^-1 (5) O + HO2 → O2 + OH k5 = 3.50×10^-11 cm^3 s^-1 (6) H2O + O → 2 OH k6 = 5.40×10^-12 cm^3 s^-1 (9) OH + HO2 → O2 + H2O k9 = 4.00×10^-11 cm^3 s^-1 (10) HO2 + HO2 → O2 + H2O2 k10 = 2.50×10^-12 cm s^-1 (11) O + O2 + M → O3 + M k11 = 1.05×10^-34 cm^6 s^-1 (14) H + O2 + M → HO2 + M k14 = 8.08×10^-32 cm^6 s^-1 (15) OH + H + M → H2O + M k15 = 3.31×10^-27 cm^6 s^-1 (16) O2 + hv → 2 O k16 = (1.26×10^-8 s^-1) φ (17) H2O + hv → H + OH k17 = (3.4×10^-6 s^-1) φ (18) O3 + hv → O2 + O k18 = (7.10×10^-8 s^-1) φ