Lesson Solving systems of linear equations in three unknowns using determinant (Cramer's rule)

Algebra ->  Matrices-and-determiminant -> Lesson Solving systems of linear equations in three unknowns using determinant (Cramer's rule)      Log On


   


This Lesson (Solving systems of linear equations in three unknowns using determinant (Cramer's rule)) was created by by ikleyn(52748) About Me : View Source, Show
About ikleyn:

Solving systems of linear equations in three unknowns using determinant (Cramer's rule)


In this lesson you will find typical examples on solution the systems of three linear equations in three unknowns using determinant  (Cramer's rule).
The lesson is a continuation of the lesson  HOW TO solve system of linear equations in three unknowns using determinant (Cramer's rule)  under the current topic in this site.

Cramer's rule

Let

.                                                          (1)

be a system of three linear equations in three unknowns, where  a,  b,  c,  d,  e,  f,  g,  h, k  are coefficients;  u,  v  and  w  are right side constants;  x,  y  and  z  are unknowns.  To solve the system of linear equations  (1)  using the  Cramer's rule  you need

1.  to form the coefficient matrix  %28matrix%283%2C3%2C+a%2Cb%2Cc%2Cd%2Ce%2Cf%2Cg%2Ch%2Ck%29%29  and calculate its determinant  D = det  %28matrix%283%2C3%2C+a%2Cb%2Cc%2Cd%2Ce%2Cf%2Cg%2Ch%2Ck%29%29.

      If the determinant is not zero,  then the solution does exist and is unique,  and the following steps are applicable.

2.  to calculate the  first unknown  you need to modify the coefficient matrix replacing its  first column  by the right side column.  You get the matrix  %28matrix%283%2C3%2C+u%2Cb%2Cc%2Cv%2Ce%2Cf%2Cw%2Ch%2Ck%29%29.
      Then calculate the determinant of this modified matrix  Dx = det%28matrix%283%2C3%2C+u%2Cb%2Cc%2Cv%2Ce%2Cf%2Cw%2Ch%2Ck%29%29  and divide it by the determinant of the coefficient matrix:  x = Dx%2FD.
3.  to calculate the  second unknown  you need to modify the coefficient matrix replacing its  second column  by the right side column.  You get the matrix  %28matrix%283%2C3%2C+a%2Cu%2Cc%2Cd%2Cv%2Cf%2Cg%2Cw%2Ck%29%29.
      Then calculate the determinant of this modified matrix  Dy = det%28matrix%283%2C3%2C+a%2Cu%2Cc%2Cd%2Cv%2Cf%2Cg%2Cw%2Ck%29%29  and divide it by the determinant of the coefficient matrix:  y = Dy%2FD.
4.  to calculate the  third unknown  you need to modify the coefficient matrix replacing its  third column  by the right side column.  You get the matrix  %28matrix%283%2C3%2C+a%2Cb%2Cu%2Cd%2Ce%2Cv%2Cg%2Ch%2Cw%29%29.
      Then calculate the determinant of this modified matrix  Dy = det%28matrix%283%2C3%2C+a%2Cb%2Cu%2Cd%2Ce%2Cv%2Cg%2Ch%2Cw%29%29  and divide it by the determinant of the coefficient matrix:  y = Dy%2FD.
      At this stage the solution is completed.

Thus     ,         ,          .               (2)

Example 1

Solve the system using the Cramer's rule

system%282x+%2B+2y+-+z+=+2%2C%0D%0Ax+%2B+y+%2B+z+=+4%2C%0D%0Ax+-+y+-+z+=+2%29.

Solution

The coefficient matrix is   D = %28matrix%283%2C3%2C+2%2C+2%2C+-1%2C+1%2C+1%2C+1%2C+1%2C+-1%2C+-1%29%29.

Let us calculate its determinant using co-factoring  (expanding)  along the first row  (see the lesson  Co-factoring the determinant of a 3x3 matrix  under the current topic):

det%28D%29 = 2*det%28matrix%282%2C2%2C+1%2C1%2C-1%2C-1%29%29 - 2*det%28matrix%282%2C2%2C+1%2C1%2C1%2C-1%29%29 + (-1)*det%28matrix%282%2C2%2C+1%2C1%2C1%2C-1%29%29 = 2*(-1-(-1)) - 2*(-1-1) + (-1)*(-1-1) = 0 - 2*(-2) + (-1)*(-2) = 0 + 4 + 2 = 6.

The determinant is non-zero,  hence,  the Cramer's rule is applicable.

Now,  let us calculate the determinant of the first modified matrix,  which is the numerator of the fraction for  x.  Again,  use the determinant expanding along the first row:

Dx = det%28matrix%283%2C3%2C+2%2C+2%2C+-1%2C+4%2C+1%2C+1%2C+2%2C+-1%2C+-1%29%29 = 2*det%28matrix%282%2C2%2C+1%2C1%2C-1%2C-1%29%29 - 2*det%28matrix%282%2C2%2C+4%2C1%2C2%2C-1%29%29 + (-1)*det%28matrix%282%2C2%2C+4%2C1%2C2%2C-1%29%29 = 2*(-1-(-1)) - 2*(-4-2) + (-1)*(-4 -2) = 0 - 2*(-6) - 1*(-6) = 0 + 12 + 6 = 18.

Next,  calculate the determinant of the second modified matrix,  which is the numerator of the fraction for  y.  Use the determinant expanding along the first row:

Dy = det%28matrix%283%2C3%2C+2%2C+2%2C+-1%2C+1%2C+4%2C+1%2C+1%2C+2%2C+-1%29%29 = 2*det%28matrix%282%2C2%2C++4%2C1%2C2%2C-1%29%29 - 2*det%28matrix%282%2C2%2C+1%2C1%2C1%2C-1%29%29 + (-1)*det%28matrix%282%2C2%2C+1%2C4%2C1%2C2%29%29 = 2*(-4-2) - 2*(-1-1) + (-1)*(2-4) = 2*(-6) - 2*(-2) + (-1)*(-2) = -12 +4 + 2 = -6.

At last,  calculate the determinant of the third modified matrix,  which is the numerator of the fraction for  z.  Use the determinant expanding along the first row:

Dz = det%28matrix%283%2C3%2C+2%2C+2%2C+2%2C+1%2C+1%2C+4%2C+1%2C+-1%2C+2%29%29 = 2*det%28matrix%282%2C2%2C++1%2C4%2C-1%2C2%29%29 - 2*det%28matrix%282%2C2%2C+1%2C4%2C1%2C2%29%29 + 2*det%28matrix%282%2C2%2C+1%2C1%2C1%2C-1%29%29 = 2*(2+4) - 2*(2-4) + 2*(-1-1) = 2*6 - 2*(-2) + 2*(-2) = 12.

Hence,  x = Dx%2FD = 18%2F6 = 3,  y = Dy%2FD = %28-6%29%2F6 = -1  and  z = Dz%2FD = 12%2F6 = 2.

You can easily check this solution by substituting the found values into the original system of equations.  The solution is unique.

Answer.  x = 3,  y = -1  and  z = 2.

Example 2

Solve the system using the Cramer's rule

system%28y+-+2z+=+-3%2C%0D%0Ax+-+y+=+2%2C%0D%0A3x+%2B+z+=+11%29.

Solution

Let us rewrite the system using zero coefficients for variables that are not shown

system%280%2Ax+%2B+y+-+2z+=+-3%2C%0D%0Ax+-+y+%2B+0%2Az+=+2%2C%0D%0A3x+%2B0%2Ay+%2B+z+=+11%29.

The coefficient matrix is   D = %28matrix%283%2C3%2C+0%2C+1%2C+-2%2C+1%2C+-1%2C+0%2C+3%2C+0%2C+1%29%29.

Let us calculate its determinant using co-factoring  (expanding)  along the first row  (see the lesson  Co-factoring the determinant of a 3x3 matrix  under the current topic):

det%28D%29 = 0*det%28matrix%282%2C2%2C+-1%2C0%2C0%2C1%29%29 - 1*det%28matrix%282%2C2%2C+1%2C0%2C3%2C1%29%29 + (-2)*det%28matrix%282%2C2%2C+1%2C-1%2C3%2C0%29%29 = 0 - 1*(1-0) + (-2)*(0+3) = 0 - 1 - 6 = -7.

The determinant is non-zero,  hence,  the Cramer's rule is applicable.
Now,  let us calculate the determinant of the first modified matrix,  which is the numerator of the fraction for  x.  Again,  use the determinant expanding along the first row:

Dx = det%28matrix%283%2C3%2C++-3%2C+1%2C+-2%2C+2%2C+-1%2C+0%2C+11%2C+0%2C+1%29%29 = (-3)*det%28matrix%282%2C2%2C+-1%2C0%2C0%2C1%29%29 - 1*det%28matrix%282%2C2%2C+2%2C0%2C11%2C1%29%29 + (-2)*det%28matrix%282%2C2%2C+2%2C-1%2C11%2C0%29%29 = (-3)*(-1) - 1*2 + (-2)*11 = 3 - 2 - 22 = -21.

Next,  calculate the determinant of the second modified matrix,  which is the numerator of the fraction for  y.  Use the determinant expanding along the first row:

Dy = det%28matrix%283%2C3%2C+0%2C+-3%2C+-2%2C+1%2C+2%2C+0%2C+3%2C+11%2C+1%29%29 = 0*det%28matrix%282%2C2%2C++2%2C0%2C11%2C1%29%29 - (-3)*det%28matrix%282%2C2%2C+1%2C0%2C3%2C1%29%29 + (-2)*det%28matrix%282%2C2%2C+1%2C2%2C3%2C11%29%29 = 0 - (-3)*1 + (-2)*(11-6) = 0 + 3 + (-2)*5 = 3 - 10 = -7.

At last,  calculate the determinant of the third modified matrix,  which is the numerator of the fraction for  z.  Use the determinant expanding along the first row:

Dz = det%28matrix%283%2C3%2C+0%2C+1%2C+-3%2C+1%2C+-1%2C+2%2C+3%2C+0%2C+11%29%29 = 0*det%28matrix%282%2C2%2C++-1%2C2%2C0%2C11%29%29 - 1*det%28matrix%282%2C2%2C+1%2C2%2C3%2C11%29%29 + (-3)*det%28matrix%282%2C2%2C+1%2C-1%2C3%2C0%29%29 = 0 - 1*(11-6) + (-3)*3 = 0 - 5 - 9 = -14.

Hence,  x = Dx%2FD = %28-21%29%2F%28-7%29 = 3,  y = Dy%2FD = %28-7%29%2F%28-7%29 = 1  and  z = Dz%2FD = %28-14%29%2F%28-7%29 = 2.

You can easily check this solution by substituting the found values into the original system of equations.  The solution is unique.

Answer.  x = 3,  y = 1  and  z = 2.

Example 3

Solve the system using the Cramer's rule

system%28x+%2B+y+%2B+z+=+0%2C%0D%0Ax+-+y+-+3z+=+0%2C%0D%0Ax+%2B+y+-+2z+=+0%29.

Solution

Notice that all right side terms are zeroes in the given system of equations.  Such systems with the zero right side terms are called  homogeneous  systems.

The coefficient matrix is   D = %28matrix%283%2C3%2C+1%2C+1%2C+1%2C+1%2C+-1%2C+-3%2C+1%2C+1%2C+-2%29%29.

Let us calculate its determinant using co-factoring  (expanding)  along the first row  (see the lesson  Co-factoring the determinant of a 3x3 matrix  under the current topic):

det%28D%29 = 1*det%28matrix%282%2C2%2C+-1%2C-3%2C1%2C-2%29%29 - 1*det%28matrix%282%2C2%2C+1%2C-3%2C1%2C-2%29%29 + 1*det%28matrix%282%2C2%2C+1%2C-1%2C1%2C1%29%29 = 1*((-1)*(-2)-(-3)*1) - 1*(1*(-2)-1*(-3)) + 1*(1-(-1)) = 5 - 1 + 2 = 6.

The determinant is non-zero,  hence,  the Cramer's rule is applicable.

Now, the first modified matrix has the first column consisting of zeroes.  If you calculate its determinant using co-factoring along the first column,  you will get all the expanding terms equal to zero.  Hence,  the first modified matrix has the zero determinant.

Similarly,  the second and the third modified matrices also have the zero determinants.

It implies that the given system of equations has the zero solution,  and this solution is unique.

Answer.  x = 0,  y = 0  and  z = 0.

Based on this example,  you cam make a general conclusion that a  homogeneous system of linear equations with non-zero determinant has only zero solution.


To complete this lesson,  I will show you that sometimes the Cramer's rule can help you to solve even  non-linear (!) systems of equations!
    . . . Of course,  if the given non-linear system of equations can be reduced to the linear one after replacing the unknowns :)
Below is an example.

Example 4

Solve the system of three non-linear equations in three unknowns

 1%2Fx + 1%2Fy - 1%2Fz = 4,
-1%2Fx + 1%2Fy + 1%2Fz = 6,
 1%2Fx + 1%2Fy + 1%2Fz = 8.

Solution

Let us introduce new variables  p = 1%2Fx,  q = 1%2Fy  and  r = 1%2Fz.
Then the given system of non-linear equations is reduced to the linear one:



The coefficient matrix is  %28matrix%283%2C3%2C+1%2C+1%2C+-1%2C+-1%2C+1%2C+1%2C+1%2C+1%2C+1%29%29.  Its determinant is  1*1*1 + 1*1*1 + 1*(-1)*(-1) - 1*1*(-1) - 1*1*1 - (-1)*1*1 = 1 + 1 + 1 + 1 - 1 + 1 = 4.

The determinant is non-zero.  Hence,  the Cramer's rule is applicable.

Let us calculate the determinant of the first modified matrix,  which is the numerator of the fraction for  p. Use the determinant expanding along the first row:

Dp = det%28matrix%283%2C3%2C++4%2C+1%2C+-1%2C+6%2C+1%2C+1%2C+8%2C+1%2C+1%29%29 = 4*det%28matrix%282%2C2%2C+1%2C1%2C1%2C1%29%29 - 1*det%28matrix%282%2C2%2C+6%2C1%2C8%2C1%29%29 + (-1)*det%28matrix%282%2C2%2C+6%2C1%2C8%2C1%29%29 = 4*(1-1) - 1*(6-8) - 1*(6-8) = 0 + 2 + 2 = 4.

Now,  let us calculate the determinant of the second modified matrix,  which is the numerator of the fraction for  q.  Use the determinant expanding along the first row:

Dq = det%28matrix%283%2C3%2C++1%2C+4%2C+-1%2C+-1%2C+6%2C+1%2C+1%2C+8%2C+1%29%29 = 1*det%28matrix%282%2C2%2C+6%2C1%2C8%2C1%29%29 - 4*det%28matrix%282%2C2%2C+-1%2C1%2C1%2C1%29%29 + (-1)*det%28matrix%282%2C2%2C+-1%2C6%2C1%2C8%29%29 = 1*(6-8) - 4*(-1-1) + (-1)*(-8-6) = -2 + 8 + 14 = 20.

At last,  let us calculate the determinant of the third modified matrix,  which is the numerator of the fraction for  r.  Again,  use the determinant expanding along the first row:

Dr = det%28matrix%283%2C3%2C++1%2C+1%2C+4%2C+-1%2C+1%2C+6%2C+1%2C+1%2C+8%29%29 = 1*det%28matrix%282%2C2%2C+1%2C6%2C1%2C8%29%29 - 1*det%28matrix%282%2C2%2C+-1%2C6%2C1%2C8%29%29 + 4*det%28matrix%282%2C2%2C+-1%2C1%2C1%2C1%29%29 = 1*(8-6) - 1*(-8-6) + 4*(-1-1) = 2 + 14 - 8 = 8.

Hence,  p = Dp%2FD = 4%2F4 = 1,  q = Dq%2FD = 20%2F4 = 5  and  r = Dr%2FD = 8%2F4 = 2.

Therefore,  x = 1%2Fp = 1,  y = 1%2Fq = 1%2F5  and  z = 1%2Fr = 1%2F2.

You can easily check this solution by substituting the found values into the original system of equations.  The solution is unique.

Answer.  x = 1,  y = 1%2F5  and  z = 1%2F2.


My lessons in this site on determinants of  3x3-matrices and the Cramer's rule for solving systems of linear equations in three unknowns are
    - Determinant of a 3x3 matrix
    - Co-factoring the determinant of a 3x3 matrix
    - HOW TO solve system of linear equations in three unknowns using determinant (Cramer's rule)
    - Solving word problems by reducing to systems of linear equations in three unknowns
    - The tricks to solve some word problems with three and more unknowns using mental math
    - Solving systems of non-linear equations in three unknowns using Cramer's rule
    - Sometime two equations are enough to find three unknowns by an UNIQUE way
    - Two very different approaches to one word problem
    - Solving word problems in three unknowns by the backward method
    - Solving system of linear equation in 17 unknowns
    - Solving system of linear equation in 19 unknowns
    - OVERVIEW of LESSONS on determinants of 3x3-matrices and Cramer's rule for systems in 3 unknowns
under the current topic  Matrices, determinant, Cramer rule  of the section  Algebra-II.

My other lessons in this site on solving systems of linear equations in three unknowns are
    - Solving systems of linear equations in 3 unknowns by the Substitution method,
    - BRIEFLY on solving systems of linear equations in 3 unknowns by the Substitution method,
    - Solving systems of linear equations in 3 unknowns by the Elimination method  and
    - BRIEFLY on solving systems of linear equations in 3 unknowns by the Elimination method
under the current topic  Matrices, determinant, Cramer rule  of the section  Algebra-II.


Use this file/link  ALGEBRA-II - YOUR ONLINE TEXTBOOK  to navigate over all topics and lessons of the online textbook  ALGEBRA-II.


This lesson has been accessed 2700 times.