What is Cramer’s Rule?

Cramer’s Rule is a mathematical theorem used in linear algebra to solve systems of linear equations with as many equations as unknowns. Named after the Swiss mathematician Gabriel Cramer, this rule provides an explicit formula for the solution of a system of linear equations with a unique solution.

System of Linear Equations

Consider a system of linear equations:

$begin{align*}
a_1x + b_1y + c_1z &= d_1 \
a_2x + b_2y + c_2z &= d_2 \
a_3x + b_3y + c_3z &= d_3
end{align*}$

This can be written in matrix form as $AX = B$, where $A$ is the coefficient matrix, $X$ is the column vector of variables, and $B$ is the column vector of constants.

Determinants and Cramer’s Rule

Cramer’s Rule states that if the determinant of the coefficient matrix $A$ (denoted as $det(A)$) is non-zero, the system has a unique solution. The solutions for the variables can be found using the formula:

$X_i = frac{det(A_i)}{det(A)}$

where $det(A_i)$ is the determinant of the matrix obtained by replacing the $i$-th column of $A$ with the column vector $B$

Example

Let’s solve the following system using Cramer’s Rule:

$begin{align*}
2x + 3y – z &= 5 \
4x – y + 2z &= 6 \
-3x + 2y + 4z &= 8
end{align*}$

First, we write the coefficient matrix $A$ and the column vector $B$:

$A = begin{pmatrix} 2 & 3 & -1 \ 4 & -1 & 2 \ -3 & 2 & 4 end{pmatrix}, quad B = begin{pmatrix} 5 \ 6 \ 8 end{pmatrix}$

Calculate $det(A)$:

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

$= 2(-1 cdot 4 – 2 cdot 2) – 3(4 cdot 4 – (-3) cdot 2) – 1(4 cdot 2 – (-3) cdot -1)$

$= 2(-4 – 4) – 3(16 + 6) – 1(8 + 3)$

$= 2(-8) – 3(22) – 1(11)$

$= -16 – 66 – 11 = -93$

Since $det(A)
eq 0$, we can use Cramer’s Rule.

Solution for $x$

Replace the first column of $A$ with $B$ to get $A_1$:

$A_1 = begin{pmatrix} 5 & 3 & -1 \ 6 & -1 & 2 \ 8 & 2 & 4 end{pmatrix}$

Calculate $det(A_1)$:

$det(A_1) = 5 begin{vmatrix} -1 & 2 \ 2 & 4 end{vmatrix} – 3 begin{vmatrix} 6 & 2 \ 8 & 4 end{vmatrix} – (-1) begin{vmatrix} 6 & -1 \ 8 & 2 end{vmatrix}$

$= 5(-1 cdot 4 – 2 cdot 2) – 3(6 cdot 4 – 8 cdot 2) + 1(6 cdot 2 – (-1) cdot 8)$

$= 5(-4 – 4) – 3(24 – 16) + 1(12 + 8)$

$= 5(-8) – 3(8) + 1(20)$

$= -40 – 24 + 20 = -44$

Thus, $x = frac{det(A_1)}{det(A)} = frac{-44}{-93} = frac{44}{93}$

Solution for $y$ and $z$

Following similar steps, we can find $y$ and $z$. Replace the second and third columns of $A$ with $B$ to get $A_2$ and $A_3$ and calculate their determinants. Finally, use the formula $y = frac{det(A_2)}{det(A)}$ and $z = frac{det(A_3)}{det(A)}$

Conclusion

Cramer’s Rule is a powerful tool for solving systems of linear equations, especially when the number of equations matches the number of unknowns. While it may be computationally intensive for large systems, it provides an elegant solution for smaller ones.

Citations

  1. 1. Khan Academy – Cramer’s Rule
  2. 2. Wolfram MathWorld – Cramer’s Rule
  3. 3. Purplemath – 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) φ