How does one solve a system of linear equations with three variables?

linear equations

Advertisements

Linear algebra is an important branch of mathematics that deals with systems of linear equations. A system of linear equations is a set of equations with multiple variables, where each equation is linear. The process of solving a system of linear equations involves finding values of the variables that satisfy all the equations in the system simultaneously.

Solve a System of Linear Equations with Three Variables

In this article, we will focus on how to solve a system of linear equations with three variables. We will discuss the basic method of elimination, which involves adding or subtracting equations to eliminate variables and then solving for the remaining variables. We will also cover a more advanced technique called Gaussian elimination, which involves using matrix operations to reduce the system to a triangular form.

The Method of Elimination

The method of elimination involves adding or subtracting equations to eliminate variables and then solving for the remaining variables. To illustrate this method, consider the following system of linear equations:

2x + 3y – z = 1
x – 2y + 4z = -2
3x + y – 2z = 0
To solve this system using the method of elimination, we start by choosing two equations and eliminating one of the variables. For example, we could choose the first and second equations and eliminate the variable x. To do this, we need to multiply the first equation by -1 and add it to the second equation:

-2x – 3y + z = -1 (multiply first equation by -1)
x – 2y + 4z = -2
—————–
-5y + 5z = -3
Now we have two equations with two variables, y and z. We can repeat this process with two other equations to eliminate another variable. For example, we could choose the first and third equations and eliminate the variable x again:

-2x – 3y + z = -1 (multiply first equation by -3)
3x + y – 2z = 0
—————–
-7y – 5z = -3
We now have two equations with two variables, y and z, again. We can solve this system by using substitution or elimination. For example, we can solve for y in the second equation and substitute it into the first equation:

-7y – 5z = -3 (multiply second equation by 5)
15y – 10z = 5
—————–
8y – 15z = 2

2x + 3y – z = 1 (multiply first equation by 3)
-3y + z = -2
—————–
2x = 7

x = 7/2


Now we have found the value of x. We can substitute this value into one of the equations involving y and z to solve for y or z. For example, we can substitute x = 7/2 into the second equation:

x – 2y + 4z = -2
7/2 – 2y + 4z = -2
-2y + 4z = -11/2
y = (11/2 – 4z)/2
We have now solved for y in terms of z. We can substitute this expression into one of the equations to solve for z. For example, we can substitute y = (11/2 – 4z)/2into the first equation:

2x + 3y – z = 1
2(7/2) + 3[(11/2 – 4z)/2] – z = 1
7 – 6z = 1
z = 1
Now that we have found the value of z, we can substitute it back into the expression we found for y:

y = (11/2 – 4z)/2
y = (11/2 – 4(1))/2
y = -3/2


Finally, we can substitute x = 7/2, y = -3/2, and z = 1 into one of the original equations to check if the solution satisfies all the equations:

2x + 3y – z = 1
2(7/2) + 3(-3/2) – 1 = 1
7 – 4 – 1 = 1
2 = 1
This solution does not satisfy the first equation, so it is not a valid solution. We made a mistake somewhere in our calculations. It is important to always check your solutions to make sure they are valid.

Gaussian Elimination

Gaussian elimination is a more advanced technique for solving systems of linear equations. It involves using matrix operations to reduce the system to a triangular form, where all the variables in each equation appear in descending order. The general idea is to use elementary row operations to transform the augmented matrix of the system into a form that is easier to solve.

To illustrate this method, let’s consider the same system of linear equations we used earlier:

2x + 3y – z = 1
x – 2y + 4z = -2
3x + y – 2z = 0
We can write this system as an augmented matrix:

[2 3 -1 | 1]
[1 -2 4 | -2]
[3 1 -2 | 0]
The first step in Gaussian elimination is to use elementary row operations to transform the matrix into an upper triangular form, where all the entries below the main diagonal are zero. We can start by using row 1 to eliminate the x variable from rows 2 and 3:

[2 3 -1 | 1]
[0 -7 5 | -4]
[0 -8 1 | -3]
Now we can use row 2 to eliminate the y variable from row 3:

[2 3 -1 | 1]
[0 -7 5 | -4]
[0 0 -39/7 | -13/7]
We now have an upper triangular matrix, which we can solve using back-substitution. Starting from the last row, we can solve for z:

z = (-13/7)/(-39/7) = 1/3
We can now use this value of z to solve for y:

-7y + 5(1/3) = -4
y = 1/3
Finally, we can use these values of y and z to solve for x:

2x + 3(1/3) – (1/3) = 1
x = 1/2
Therefore, the solution to the system of linear equations is `x = 1/2, y = 1/3, and z = 1/3`.

Matrix Inversion

Another method for solving systems of linear equations is to use matrix inversion. The idea is to write the system of equations in matrix form, as Ax = b, where A is the coefficient matrix, x is the vector of variables, and b is the vector of constants. If we can find the inverse of A, we can solve for x using the formula x = A^(-1)b.

To illustrate this method, let’s consider the same system of linear equations we used earlier:

2x + 3y – z = 1
x – 2y + 4z = -2
3x + y – 2z = 0
We can write this system in matrix form as:

[2 3 -1] [x] [ 1]
[1 -2 4] x [y] = [-2]
[3 1 -2] [z] [ 0]
We can find the inverse of the coefficient matrix A using the formula:

A^(-1) = (1/det(A)) adj(A)
where det(A) is the determinant of A, and adj(A) is the adjugate of A. The adjugate of a matrix is obtained by taking the transpose of the matrix of cofactors. The cofactor of an element a_ij is given by (-1)^(i+j) det(M_ij), where M_ij is the minor obtained by deleting row i and column j from A.

The determinant of A is given by:

det(A) = 2(-2(-2) – 4(-1)) – 3(1(-2) – 4(3)) – (-1)(1(1) – 2(3))
det(A) = 39
The matrix of cofactors is:

[ 7 -10 1]
[-7 -14 11]
[ 5 11 -7]
Taking the transpose of this matrix gives us the adjugate:

[ 7 -7 5]
[-10 -14 11]
[ 1 11 -7]
Multiplying this matrix by 1/det(A) gives us the inverse of A:

[ 7/39 -10/39 1/39]
[-7/39 -14/39 11/39]
[ 5/39 11/39 -7/39]
We can now solve for x using the formula x = A^(-1)b:

[x] [ 7/39 -10/39 1/39] [ 1]
[y] = [-7/39 -14/39 11/39] x [-2]
[z] [ 5/39 11/39 -7/39] [ 0]

[x] [ 7/39 -20/39 1/39] [ 1]
[y] = [-21/39 28/39 -22/39] x [-2]
[z] [ 15/39 22/39 -14/39] [ 0]

[x] [1/2]
[y] = [1/3]

Conclusion

There are several methods for solving systems of linear equations with three variables, including substitution, matrix inversion, and Gaussian elimination. Each method has its advantages and disadvantages, and the choice of method depends on the specific problem and the preferences of the solver. In general, substitution is the easiest method to understand and implement, while matrix inversion and Gaussian elimination are more computationally intensive but can be more efficient for larger systems. Regardless of the method used, it is important to check the solution by plugging it back into the original equations to ensure that it is valid.

Advertisements
Advertisements
Advertisements
Advertisements
Advertisements

Discover more from ...how does one?

Subscribe now to keep reading and get access to the full archive.

Continue reading