Cramer's rule is a method to solve a linear system of equations by means of determinants . However, Cramer's rule is not suitable for the practical calculation of the solution of a system of equations, since this is associated with significantly more computational effort than, for example, with the Gauss algorithm.
Nevertheless, Cramer's rule is useful in a certain way, because the solution of a system of equations depends continuously on the coefficients of the system of equations. In this way, one can obtain estimates for the individual components of the solution.
Procedure Linear system of equations a x 1 + b x 2 + c x 3 = b 1 d x 1 + e x 2 + f x 3 = b 2 g x 1 + h x 2 + i x 3 = b 3 \def\arraystretch{1.25} \begin{array}{ccccc}ax_1+bx_2+cx_3= b_1\\dx_1+ex_2+fx_3= b_2\\gx_1+hx_2+ix_3= b_3\end{array} a x 1 + b x 2 + c x 3 = b 1 d x 1 + e x 2 + f x 3 = b 2 g x 1 + h x 2 + i x 3 = b 3
The linear system of equations is transformed into an extended coefficient matrix .
⇒ ( A ∣ b ) = ( a b c d e f g h i ∣ b 1 b 2 b 3 ) \def\arraystretch{1.25} \;\;\Rightarrow\;\;( A\left| b)\right.=\left(\begin{array}{ccc} a& b& c\\ d& e& f\\ g& h& i\end{array} \left| \begin{array}{c} b_1\\ b_2\\ b_3\end{array}\right.\right) ⇒ ( A ∣ b ) = a d g b e h c f i b 1 b 2 b 3
Calculation of x 1 , x 2 , x 3 x_1,\;x_2,\;x_3 x 1 , x 2 , x 3 :
A = ( a b c d e f g h i ) ⇒ det A = det ( a b c d e f g h i ) \def\arraystretch{1.25} \begin{array}{l}A=\begin{pmatrix}a& b & c\\ d & e & f\\ g & h & i \end{pmatrix}\Rightarrow\text{det}\;A=\text{det }\begin{pmatrix}a& b& c\\ d & e & f\\g & h & i \end{pmatrix}\end{array} A = a d g b e h c f i ⇒ det A = det a d g b e h c f i
The determinant is calculated.
det ( A x 1 ) = det ( b 1 b c b 2 e f b 3 h i ) \text{det}(A_{x_1}) =\text{det }\begin{pmatrix}b_1 & b & c\\ b _2 & e& f\\ b _3& h & i\end{pmatrix} det ( A x 1 ) = det b 1 b 2 b 3 b e h c f i
The column of x 1 x _1 x 1 values is replaced by the result column and the determinant is calculated from it.
det ( A x 2 ) = det ( a b 1 c d b 2 f g b 3 i ) \text{det}(A_{x_2}) =\text{det }\begin{pmatrix} a & b_1 & c\\ d & b _2 & f\\ g & b _3 & i\end{pmatrix} det ( A x 2 ) = det a d g b 1 b 2 b 3 c f i
The column of x 2 x_2
x 2 values is replaced by the result column and the determinant is calculated from it.
det ( A x 3 ) = det ( a b b 1 d e b 2 g h b 3 ) \text{det}(A_{x_3}) =\text{det }\begin{pmatrix} a & b & b_1 \\ d & e &b _2 \\ g & h &b _3\end{pmatrix} det ( A x 3 ) = det a d g b e h b 1 b 2 b 3
The column of x 3 x_3
x 3 values is replaced by the result column and the determinant is calculated from it.
If det ( A ) ≠ 0 \det\left(A\right)\ \ne0 det ( A ) = 0 , the solutions x 1 , x 2 , x 3 x_1,\;x_2,\;x_3 x 1 , x 2 , x 3 of the given linear system of equations are then obtained as follows:
x 1 = det ( A x 1 ) det ( A ) x_1=\frac{\text{det}(A_{x_1})}{\det(A)} x 1 = d e t ( A ) det ( A x 1 )
x 2 = det ( A x 2 ) det ( A ) x_2=\frac{\text{det}(A_{x_2})}{\det(A)} x 2 = d e t ( A ) det ( A x 2 )
x 3 = det ( A x 3 ) det ( A ) x_3=\frac{\text{det}(A_{x_3})}{\det(A)} x 3 = d e t ( A ) det ( A x 3 )