We are given three set of system of equations
3x + 2y + z = 8
x + y + 2z = 4
4x + y + z = 7
We have three equations with three unknowns (x, y, and z)
Firstly, we need to eliminate of the variables, so that we can solve the remaining equation simultaneously.
Firstly., we will be eliminating z
Let us combine equation 1 and 2 together
3x + 2y + z = 8 ------ equation 1
x + y + 2z = 4 --------- equation 2
To eliminate z, multiply equation 1 by 2 and equation 2 by 1
3x * 2 + 2y*2 + 2*z = 2 * 8
x *1 + y * 1 + 1 * 2z = 1 * 4
6x + 4y + 2z = 16 ------ equation 4
x + y + 2z = 4 ----------- equation 5
Substract equation 5 from 4
6x - x + 4y - y + 2z - 2z = 16 - 4
5x + 3y + 0 = 12
5x + 3y = 12 -------------- equation 6
Secondly, combine equation 2 and 3 together
x + y + 2z = 4
4x + y + z = 7
To eliminate z, multiply equation 1 by 1 and equation 2 by 2
x * 1 + y * 1 + 2z * 1= 4*1
4x *2 + 2 * y + 2*z = 2 * 7
x + y + 2z = 4 ----------- equation 7
8x + 2y + 2z = 14 -------- equation 8
Substract equation 8 from 7
x - 8x + y - 2y + 2z - 2z = 4 - 14
-7x - y + 0 = -10
-7x - y = -10 -------------- equation 9
Solve equation 6 and equation 9 simultaneously to get the values of x and y
5x + 3y = 12
-7x - y = -10
Let us eliminate y
To eliminate y, multiply equation 6 by 1 and equation 9 by 3
5x * 1 + 3y*1 = 12*1
-7x * 3 - y*3 = -10*3
5x + 3y = 12 ------ equation 10
-21x - 3y = -30----- equation 11
Add equation 11 and 10 together
5x + (-21x) + 3y + (-3y) = 12 + (-30)
5x - 21x + 3y - 3y = 12 -30
-16x + 0 = -18
-16x = -18
Divide both sides by -16
-16x/-16 = -18/-16
x = 18/16
x = 8/9
To find y, put the value of x in equation 9
-7x - y = -10
-7(8/9) - y = -10
-72/9 - y = -10
Collect the like terms
-y = -10 + 72/9
-y = -10 *9 / 1 + 72 x 9 / 9 / 9
-y = -90 + 72 / 9
-y = -18/9
-y = -2
Divide both sides by -1
-y/-1 =- -2/-1
y = 2
To find the value of z, substitute the values of x and y into equation 2
x + y + 2z = 4
Make 2z the subject of the formula
2z= 4 - x - y
2z = 4 -8/9 - 2
2z = 4 x 9 - 8 - 2*9 /9
2z = 36 - 8 - 18 / 9
2z = 10/9
Divide both sides by 2
2z / 2 = 10/9 / 2
z = 10/18
z = 5/9
The solutions are x = 8/9, y = 2 and z = 5/9