In the world of linear algebra, Cramer's rule plays a very important role in finding determinants, ranks, and type of system. In simple words, Cramer's rule is used to find the solution of a system of a linear equation. In addition, it also helps us to identify whether the system will have at least one solution or not. This saves a lot of time and not to mention that this method is very accurate to predict solutions of a system.

There is another method to find a solution to a linear system which is known as the Gauss Elimination method. At this point, you might be wondering why should we use Cramer's rule instead of the Gauss Elimination method? We have an answer. Cramer's rule is very simple to use. You have to follow a similar pattern for all of the matrix, on the other hand, Gauss Elimination requires logical row operations. You need to think and select the row operations. These row operations can become difficult when solving a system of a linear equations system. Furthermore, there are operations when considering Gauss elimination such as row pivoting and column operations. They have their own rules which can become frustrating sometimes.

Check for a maths tutor here.

How does Cramer's Rule work?

To make things easy, imagine a system which has two linear equations:

{ a }_{ 1 }x + { b }_{ 1 }y = { c }_{ 1 } \longrightarrow(1)

{ a }_{ 2 }x + { b }_{ 2 }y = { c }_{ 2 } \longrightarrow(2)

We can eliminate one variable with the help of row operations. You can choose any variable but here, we chose to eliminate y to make equation in term of x. To do that, we need to apply a row operation. If we multiply equation 2 by the -{ b }_{ 1 } and equation 1 by the { b }_{ 2 } and then add both equations, we can easily eliminate y from the overall equation.

{ R }_{ 1 } \rightarrow { R }_{ 1 } \times { b }_{ 2 } hence { a }_{ 1 }{ b }_{ 2 }x + { b }_{ 1 }{ b }_{ 2 }y = { c }_{ 1 }{ b }_{ 2 }

{ R }_{ 2 } \rightarrow { R }_{ 2 } \times -{ b }_{ 1 } hence -{ a }_{ 2 }{ b }_{ 1 }x - { b }_{ 2 }{ b }_{ 1 }y = -{ c }_{ 2 }{ b }_{ 1 }

Adding both equations:

{ a }_{ 1 }{ b }_{ 2 }x + { b }_{ 1 }{ b }_{ 2 }y -{ a }_{ 2 }{ b }_{ 1 }x - { b }_{ 2 }{ b }_{ 1 }y = { c }_{ 1 }{ b }_{ 2 } - { c }_{ 2 }{ b }_{ 1 }

{ a }_{ 1 }{ b }_{ 2 }x-{ a }_{ 2 }{ b }_{ 1 }x= { c }_{ 1 }{ b }_{ 2 } - { c }_{ 2 }{ b }_{ 1 }

Taking x as a common:

x({ a }_{ 1 }{ b }_{ 2 } - { a }_{ 2 }{ b }_{ 1 }) = { c }_{ 1 }{ b }_{ 2 } - { c }_{ 2 }{ b }_{ 1 }

x = \frac { { c }_{ 1 }{ b }_{ 2 } - { c }_{ 2 }{ b }_{ 1 } }{ { a }_{ 1 }{ b }_{ 2 } - { a }_{ 2 }{ b }_{ 1 } }

x = \frac { \begin{bmatrix} { c }_{ 1 } & b_{ 1 } \\ { c }_{ 2 } & b_{ 2 } \end{bmatrix} }{ \begin{bmatrix} { a }_{ 1 } & b_{ 1 } \\ { a }_{ 2 } & b_{ 2 } \end{bmatrix} }

Now, the same method will be applied but this time, we will eliminate x and make the equation in terms of y.

{ R }_{ 1 } \rightarrow { R }_{ 1 } \times { a }_{ 2 } hence { a }_{ 1 }{ a }_{ 2 }x + { b }_{ 1 }{ a }_{ 2 }y = { c }_{ 1 }{ a }_{ 2 }

{ R }_{ 2 } \rightarrow { R }_{ 2 } \times -{ a }_{ 1 } hence -{ a }_{ 2 }{ a }_{ 1 }x - { b }_{ 2 }{ a }_{ 1 }y = -{ c }_{ 2 }{ a }_{ 1 }

Adding both equations:

{ a }_{ 1 }{ a }_{ 2 }x + { b }_{ 1 }{ a }_{ 2 }y -{ a }_{ 2 }{ a }_{ 1 }x - { b }_{ 2 }{ a }_{ 1 }y = { c }_{ 1 }{ a }_{ 2 } - { c }_{ 2 }{ a }_{ 1 }

{ b }_{ 1 }{ a }_{ 2 }y - { b }_{ 2 }{ a }_{ 1 }y = { c }_{ 1 }{ a }_{ 2 } - { c }_{ 2 }{ a }_{ 1 }

Taking y as common:

y({ b }_{ 1 }{ a }_{ 2 } - { b }_{ 2 }{ a }_{ 1 }) = { c }_{ 1 }{ a }_{ 2 } - { c }_{ 2 }{ a }_{ 1 }

y = \frac { { c }_{ 1 }{ a }_{ 2 } - { c }_{ 2 }{ a }_{ 1 } }{ { b }_{ 1 }{ a }_{ 2 } - { b }_{ 2 }{ a }_{ 1 } }

y = \frac { \begin{bmatrix} { a }_{ 1 } & c_{ 1 } \\ { a }_{ 2 } & c_{ 2 } \end{bmatrix} }{ \begin{bmatrix} { a }_{ 1 } & b_{ 1 } \\ { a }_{ 2 } & b_{ 2 } \end{bmatrix} }

Did you notice something? The denominator of both equations are same. That denominator is the determinant of the coefficient matrix. Therefore, we can write something like this:

x = \frac { { D }_{ x } }{ D }

y = \frac { { D }_{ y } }{ D }

Where, D is the determinant of the coefficient matrix,

{ D }_{ x } is the determinant of the numerator in the x solution,

{ D }_{ y } is the determinant of the numerator in the y solution.

In the above example, we considered a system of two equation but what if you don't have system of two equations? Then still, you don't need to worry because the method is exactly the same. Here is an illustration if you have number of system:

{ x }_{ 1 } = \frac { { D }_{ { x }_{ 1 } } }{ D } \quad { x }_{ 2 } = \frac { { D }_{ { x }_{ 2 } } }{ D } \quad { x }_{ 3 } = \frac { { D }_{ { x }_{ 3 } } }{ D } ... \quad { x }_{ n } = \frac { { D }_{ { x }_{ n } } }{ D }

Determinants are obtained by replacing the coefficients of the 2nd member (independent terms) in the 1st, 2nd, 3rd and the nth column, respectively. However, there are some conditions to use Cramer's rule, below are all the conditions.

  • The number of equations equals the number of unknowns.
  • The determinant of the coefficient matrix is nonzero.
The best Maths tutors available
1st lesson free!
Intasar
4.9
4.9 (23 reviews)
Intasar
£42
/h
1st lesson free!
Matthew
5
5 (17 reviews)
Matthew
£25
/h
1st lesson free!
Dr. Kritaphat
4.9
4.9 (6 reviews)
Dr. Kritaphat
£49
/h
1st lesson free!
Paolo
4.9
4.9 (11 reviews)
Paolo
£25
/h
1st lesson free!
Ayush
5
5 (28 reviews)
Ayush
£60
/h
1st lesson free!
Petar
4.9
4.9 (9 reviews)
Petar
£27
/h
1st lesson free!
Rajan
4.9
4.9 (11 reviews)
Rajan
£15
/h
1st lesson free!
Farooq
5
5 (13 reviews)
Farooq
£35
/h
1st lesson free!
Intasar
4.9
4.9 (23 reviews)
Intasar
£42
/h
1st lesson free!
Matthew
5
5 (17 reviews)
Matthew
£25
/h
1st lesson free!
Dr. Kritaphat
4.9
4.9 (6 reviews)
Dr. Kritaphat
£49
/h
1st lesson free!
Paolo
4.9
4.9 (11 reviews)
Paolo
£25
/h
1st lesson free!
Ayush
5
5 (28 reviews)
Ayush
£60
/h
1st lesson free!
Petar
4.9
4.9 (9 reviews)
Petar
£27
/h
1st lesson free!
Rajan
4.9
4.9 (11 reviews)
Rajan
£15
/h
1st lesson free!
Farooq
5
5 (13 reviews)
Farooq
£35
/h
First Lesson Free>

Examples

Example 1

\begin{cases} x+y+z \\ x-2y+3z \\ x+z \end{cases} \begin{matrix} =1 \\ =2 \\ =5 \end{matrix}

\Delta = \begin{vmatrix} 1 & 1 & 1 \\ 1 & -2 & 3 \\ 1 & 0 & 1 \end{vmatrix}

\left| \Delta \right| = 1(-2-0)-1(1-3)+1(0+2)

\left| \Delta \right| = -2+2+2

\left| \Delta \right| = 2

 

\left| { \Delta }_{ 1 } \right| = \begin{vmatrix} 1 & 1 & 1 \\ 2 & -2 & 3 \\ 5 & 0 & 1 \end{vmatrix}

\left| { \Delta }_{ 1 } \right| = 1(-2-0)-1(2-15)+1(0+10)

\left| { \Delta }_{ 1 } \right| = -2+13+10

\left| { \Delta }_{ 1 } \right| = 21

 

\left| { \Delta }_{ 2 } \right| = \begin{vmatrix} 1 & 1 & 1 \\ 1 & 2 & 3 \\ 1 & 5 & 1 \end{vmatrix}

\left| { \Delta }_{ 2 } \right| = 1(2-15)-1(1-3)+1(5-2)

\left| { \Delta }_{ 2 } \right| = -13+2+3

\left| { \Delta }_{ 2 } \right| = -8

 

\left| { \Delta }_{ 3 } \right| = \begin{vmatrix} 1 & 1 & 1 \\ 1 & -2 & 2 \\ 1 & 0 & 5 \end{vmatrix}

\left| { \Delta }_{ 3 } \right| = 1(-10+0)-1(5-2)+1(0+2)

\left| { \Delta }_{ 3 } \right| = -10-3+2

\left| { \Delta }_{ 3 } \right| = -11

 

x = \frac { { D }_{ x } }{ D }

y = \frac { { D }_{ y } }{ D }

z = \frac { { D }_{ z } }{ D }

x = \frac { 21 }{ 2 } \quad y = \frac { -8 }{ 2 }=-4 \quad z=\frac { -11 }{ 2 }

 

Example 2

\begin{cases} 2x-y+z \\ 2y-z \\ -x+u \end{cases}\begin{matrix} =3 \\ =1 \\ =1 \end{matrix}

\Delta =\begin{vmatrix} 2 & -1 & 1 \\ 0 & 2 & -1 \\ -1 & 1 & 0 \end{vmatrix}

\left| \Delta \right| = 2(0+1)-(-1)(0-1)+1(0+2)

\left| \Delta \right| = 2-1+2

\left| \Delta \right| = 3

 

x = \frac { \begin{vmatrix} 3 & -1 & 1 \\ 1 & 2 & -1 \\ 1 & 1 & 0 \end{vmatrix} }{ 3 }

{ \Delta }_{ x } = \begin{vmatrix} 3 & -1 & 1 \\ 1 & 2 & -1 \\ 1 & 1 & 0 \end{vmatrix}

\left| { \Delta }_{ x } \right| = 3(0+1)-(-1)(0+1)+1(1-2)

\left| { \Delta }_{ x } \right| = 3+1-1

\left| { \Delta }_{ x } \right| = 3

x = \frac { 3 }{ 3 }

x = 1

 

y = \frac { \begin{vmatrix} 2 & 3 & 1 \\ 0 & 1 & -1 \\ -1 & 1 & 0 \end{vmatrix} }{ 3 }

{ \Delta }_{ y } = \begin{vmatrix} 2 & 3 & 1 \\ 0 & 1 & -1 \\ -1 & 1 & 0 \end{vmatrix}

\left| { \Delta }_{ y } \right| = 2(0+1)-3(0-1)+1(0+1)

\left| { \Delta }_{ y } \right| = 2+3+1

\left| { \Delta }_{ y } \right| = 6

y = \frac { 6 }{ 3 }

y = 2

 

z = \frac { \begin{vmatrix} 2 & -1 & 3 \\ 0 & 2 & 1 \\ -1 & 1 & 1 \end{vmatrix} }{ 3 }

{ \Delta }_{ z } = \begin{vmatrix} 2 & -1 & 3 \\ 0 & 2 & 1 \\ -1 & 1 & 1 \end{vmatrix}

\left| { \Delta }_{ z } \right| = 2(2-1)-(-1)(0+1)+3(0+2)

\left| { \Delta }_{ z } \right| = 2+1+6

\left| { \Delta }_{ z } \right| = 9

z = \frac { 9 }{ 3 }

z = 3

 

Example 3

\begin{cases} x+y+z \\ x-y+z \\-x+y+z \end{cases}\begin{matrix} =1 \\ =1 \\ =1 \end{matrix}

\Delta =\begin{vmatrix} 1 & 1 & 1 \\ 1 & -1 & 1 \\ -1 & 1 & 1 \end{vmatrix}

\left| \Delta \right| = 1(-1-1)-1(1+1)+1(1-1)

\left| \Delta \right| = -2-2+0

\left| \Delta \right| = -4

 

x = \frac { \begin{vmatrix} 1 & 1 & 1 \\ 1 & -1 & 1 \\ 1 & 1 & 1 \end{vmatrix} }{ -4 }

{ \Delta }_{ x } = \begin{vmatrix} 1 & 1 & 1 \\ 1 & -1 & 1 \\ 1 & 1 & 1 \end{vmatrix}

\left| { \Delta }_{ x } \right| = 1(-1-1)-1(1-1)+1(1+1)

\left| { \Delta }_{ x } \right| = -2+0+2

\left| { \Delta }_{ x } \right| = 0

x = \frac { 0 }{ -4 }

x = 0

 

y = \frac { \begin{vmatrix} 1 & 1 & 1 \\ 1 & 1 & 1 \\ -1 & 1 & 1 \end{vmatrix} }{ -4 }

{ \Delta }_{ y } = \begin{vmatrix} 1 & 1 & 1 \\ 1 & 1 & 1 \\ -1 & 1 & 1 \end{vmatrix}

\left| { \Delta }_{ y } \right| = 1(1-1)-1(1+1)+1(1+1)

\left| { \Delta }_{ y } \right| = 0-2+2

\left| { \Delta }_{ y } \right| = 0

y = \frac { 0 }{ -4 }

y = 0

 

z = \frac { \begin{vmatrix} 1 & 1 & 1 \\ 1 & -1 & 1 \\ -1 & 1 & 1 \end{vmatrix} }{ -4 }

{ \Delta }_{ z } = \begin{vmatrix} 2 & -1 & 3 \\ 0 & 2 & 1 \\ -1 & 1 & 1 \end{vmatrix}

\left| { \Delta }_{ z } \right| = 1(-1-1)-1(1+1)+1(1-1)

\left| { \Delta }_{ z } \right| = -2-2+0

\left| { \Delta }_{ z } \right| = -4

z = \frac { -4 }{ -4 }

z = 1

Find a maths tutor on Superprof.

Need a Maths teacher?

Did you like the article?

1 Star2 Stars3 Stars4 Stars5 Stars 5.00/5 - 1 vote(s)
Loading...

Emma

I am passionate about travelling and currently live and work in Paris. I like to spend my time reading, gardening, running, learning languages and exploring new places.