Cramer’s Rule
Introduction
Cramer’s rule is a method for solving linear simultaneous equations. It makes use of determinants and so a knowledge of these is necessary before proceeding.
1. Cramer’s Rule - two equations
If we are given a pair of simultaneous equations
a 1 x + b 1 y = d 1 a_1x + b_1y = d_1 a 1 x + b 1 y = d 1
a 2 x + b 2 y = d 2 a_2x + b_2y = d_2 a 2 x + b 2 y = d 2
then x and y can be found from
x = ∣ d 1 b 1 d 2 b 2 ∣ ∣ a 1 b 1 a 2 b 2 ∣ y = ∣ a 1 d 1 a 2 d 2 ∣ ∣ a 1 b 1 a 2 b 2 ∣ x = \frac{
\begin{vmatrix}
d_1 & b_1 \\
d_2 & b_2
\end{vmatrix}
}{
\begin{vmatrix}
a_1 & b_1\\
a_2 & b_2
\end{vmatrix}
}
\qquad
y = \frac{
\begin{vmatrix}
a_1 & d_1 \\
a_2 & d_2
\end{vmatrix}
}{
\begin{vmatrix}
a_1 & b_1\\
a_2 & b_2
\end{vmatrix}
} x = a 1 a 2 b 1 b 2 d 1 d 2 b 1 b 2 y = a 1 a 2 b 1 b 2 a 1 a 2 d 1 d 2
Example
Solve the equations
3 x + 4 y = − 14 3x + 4y = -14 3 x + 4 y = − 14
− 2 x − 3 y = 11 -2x - 3y = 11 − 2 x − 3 y = 11
Solution
Using Cramer’s rule we can write the solution as the ratio of two determinants.
x = ∣ − 14 4 11 − 3 ∣ ∣ 3 4 − 2 − 3 ∣ = − 2 − 1 = 2 y = ∣ 3 − 14 − 2 11 ∣ ∣ 3 4 − 2 − 3 ∣ = 5 − 1 = − 5 x = \frac{
\begin{vmatrix}
-14 & 4 \\
11 & -3
\end{vmatrix}
}{
\begin{vmatrix}
3 & 4\\
-2 & -3
\end{vmatrix}
} =\frac{-2}{-1}=2
\qquad
y = \frac{
\begin{vmatrix}
3 & -14 \\
-2 & 11
\end{vmatrix}
}{
\begin{vmatrix}
3 & 4\\
-2 & -3
\end{vmatrix}
} =\frac{5}{-1}=-5 x = 3 − 2 4 − 3 − 14 11 4 − 3 = − 1 − 2 = 2 y = 3 − 2 4 − 3 3 − 2 − 14 11 = − 1 5 = − 5
The solution of the simultaneous equations is then x = 2, y = -5.
2. Cramer’s Rule - three equations
{ a 1 x + b 1 y + c 1 z = d 1 a 2 x + b 2 y + c 2 z = d 2 a 3 x + b 3 y + c 3 z = d 3 \begin{cases}
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{cases} ⎩ ⎨ ⎧ a 1 x + b 1 y + c 1 z = d 1 a 2 x + b 2 y + c 2 z = d 2 a 3 x + b 3 y + c 3 z = d 3
then x,y and z can be found from
x = [ d 1 b 1 c 1 d 2 b 2 c 2 d 3 b 3 c 3 ] [ a 1 b 1 c 1 a 2 b 2 c 2 a 3 b 3 c 3 ] y = [ a 1 d 1 c 1 a 2 d 2 c 2 a 3 d 3 c 3 ] [ a 1 b 1 c 1 a 2 b 2 c 2 a 3 b 3 c 3 ] z = [ a 1 b 1 d 1 a 2 b 2 d 2 a 3 b 3 d 3 ] [ a 1 b 1 c 1 a 2 b 2 c 2 a 3 b 3 c 3 ] x = \frac{
\begin{bmatrix}
d_1 & b_1 & c_1 \\
d_2 & b_2 & c_2 \\
d_3 & b_3 & c_3
\end{bmatrix}}
{\begin{bmatrix}
a_1 & b_1 & c_1 \\
a_2 & b_2 & c_2 \\
a_3 & b_3 & c_3
\end{bmatrix}}
\qquad
y = \frac{
\begin{bmatrix}
a_1 & d_1 & c_1 \\
a_2 & d_2 & c_2 \\
a_3 & d_3 & c_3
\end{bmatrix}}
{\begin{bmatrix}
a_1 & b_1 & c_1 \\
a_2 & b_2 & c_2 \\
a_3 & b_3 & c_3
\end{bmatrix}}
\qquad
z = \frac{
\begin{bmatrix}
a_1 & b_1 & d_1 \\
a_2 & b_2 & d_2 \\
a_3 & b_3 & d_3
\end{bmatrix}}
{\begin{bmatrix}
a_1 & b_1 & c_1 \\
a_2 & b_2 & c_2 \\
a_3 & b_3 & c_3
\end{bmatrix}} x = a 1 a 2 a 3 b 1 b 2 b 3 c 1 c 2 c 3 d 1 d 2 d 3 b 1 b 2 b 3 c 1 c 2 c 3 y = a 1 a 2 a 3 b 1 b 2 b 3 c 1 c 2 c 3 a 1 a 2 a 3 d 1 d 2 d 3 c 1 c 2 c 3 z = a 1 a 2 a 3 b 1 b 2 b 3 c 1 c 2 c 3 a 1 a 2 a 3 b 1 b 2 b 3 d 1 d 2 d 3
{ x + 2 y + 3 z = 17 3 x + 2 y + z = 11 x − 5 y + z = − 5 \begin{cases}
x + 2y + 3z = 17\\
3x + 2y + z = 11\\
x − 5y + z = −5
\end{cases} ⎩ ⎨ ⎧ x + 2 y + 3 z = 17 3 x + 2 y + z = 11 x − 5 y + z = − 5
Answers
x = 1, y = 2, z = 4
未完,后面应该要加上矩阵中行列式的计算方式,有兴趣的也可以自己搜索矩阵的行列式计算