Engineering Maths First Aid Kit

5 阅读1分钟

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

a1x+b1y=d1a_1x + b_1y = d_1

a2x+b2y=d2a_2x + b_2y = d_2

then x and y can be found from

x=d1b1d2b2a1b1a2b2y=a1d1a2d2a1b1a2b2x = \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} }

Example

Solve the equations

3x+4y=143x + 4y = -14

2x3y=11-2x - 3y = 11

Solution

Using Cramer’s rule we can write the solution as the ratio of two determinants.

x=1441133423=21=2y=3142113423=51=5x = \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

The solution of the simultaneous equations is then x = 2, y = -5.

2. Cramer’s Rule - three equations

{a1x+b1y+c1z=d1a2x+b2y+c2z=d2a3x+b3y+c3z=d3\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}

then x,y and z can be found from

x=[d1b1c1d2b2c2d3b3c3][a1b1c1a2b2c2a3b3c3]y=[a1d1c1a2d2c2a3d3c3][a1b1c1a2b2c2a3b3c3]z=[a1b1d1a2b2d2a3b3d3][a1b1c1a2b2c2a3b3c3]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+2y+3z=173x+2y+z=11x5y+z=5\begin{cases} x + 2y + 3z = 17\\ 3x + 2y + z = 11\\ x − 5y + z = −5 \end{cases}

Answers

x = 1, y = 2, z = 4

未完,后面应该要加上矩阵中行列式的计算方式,有兴趣的也可以自己搜索矩阵的行列式计算