Solving Simultaneous Linear Equations
See also: matrix, GaussJordan elimination, Geometric Linear Transformation
The calculator below will solve simultaneous linear equations with two, three and up to 10 variables if the system of equation has a unique solution.
For systems of equations with many solutions, please use the GaussJordan Elimination method to solve it.
Please scroll down to read about various methods to solve simultaneous linear equations.
Please report any error to [email protected]. Thank you.
Methods to solve simultaneous linear equations
There are at least five methods to solve simultaneous linear equations.
For example, let's try to find the solution for the following set of simultaneous linear equations with 3 variables
x  +  y  −  z  =  1  (1) 
8x  +  3y  −  6z  =  1  (2) 
−4x  −  y  +  3z  =  1  (3) 
Elimination method
As the name suggest, this method tries to eliminate variables until there's only 1 variable left.
First, look at the equations and try to find 2 equations which has the same coefficient (plus or minus) for the same variables. For example, see equations (1) and (3). The coefficient for y is 1 and 1 respectively. We can add the two equations to eliminate y and we get equation (4).
x  +  y  −  z  =  1  (1) 
−4x  −  y  +  3z  =  1  (3) 
  +  
−3x  +  2z  =  2  (4) 
Note that equation (4) consists of variables x and z. Now we need another equation that has the same variables as equation (4). To get this we'll eliminate y from equation (1) and (2). In equation (1) and (2) the coefficients of y are 1 and 3 respectively. In order to eliminate y, we multiply equation (1) by 3 and then subtract equation (2) from equation (1).
x  +  y  −  z  =  1  (1)  × 3  3x  +  3y  −  3z  =  3  (1) 
8x  +  3y  −  6z  =  1  (2)  8x  +  3y  −  6z  =  1  (2)  
  −  
−5x  +  3z  =  2  (5) 
With equations (4) and (5), let's try to eliminate z.
−3x  +  2z  =  2  (4)  × 3  −9x  +  6z  =  6  (4) 
−5x  +  3z  =  2  (5)  × 2  −10x  +  6z  =  4  (5) 
  −  
x  =  2  (6) 
From equation (6) we get x = 2. Now we can substitute this value of x to equation (4) to get the value for z.
−3(2) + 2z  =  2  (4) 
−6 + 2z  =  2  
2z  =  8  
z  =  8 ÷ 2  
z  =  4 
Finally, we can substitute the value of z to equation (1) to get y.
2 + y − 4  =  1  (1) 
y  =  1 − 2 + 4  
y  =  3 
Hence the solution to the system of linear equations is x = 2, y = 3, z = 4.
Substitution method
First, let's rearrange equation (1) such that only 1 variable is on the left hand side
x = 1 − y + z (1)
Now let's substitute this x to equations (2).
8(1 − y + z) + 3y − 6z  =  1  (2) 
8 − 8y + 8z + 3y − 6z  =  1  
−5y + 2z  =  1 − 8  
−5y + 2z  =  −7  (4) 
Similarly, substitute x to equations (3).
−4(1 − y + z) − y+ 3z  =  1  (3) 
−4 + 4y − 4z − y+ 3z  =  1  
3y − z  =  1 + 4  
3y − z  =  5  (5) 
Now let's rearrange equation (5) so that only 1 variable is on the left hand side.
z = 3y − 5 (6)
Next, substitute this value of z to equation (4).
−5y + 2(3y − 5)  =  −7  (4) 
−5y + 6y − 10  =  −7  
y  =  −7 + 10  
y  =  3 
Now that we have found y, we can substitute this to equation (6) to find z.
z  =  3(3) − 5  (6) 
z  =  9 − 5  
z  =  4 
Finally, we can substitute the value of y and z to equation (1) to get the value of x.
x  =  1 − 3 + 4  (1) 
x  =  2 
Hence, we have found the solution to the system of linear equations: x = 2, y = 3, z = 4.
Graphical method
Solving a system of linear equation using graphical method is done by drawing the lines or planes that represent each equation. The solution is the coordinates of the intersection of the lines or planes.
For simplicity sake, let's consider a system of linear equations with two variables.
x  +  y  =  3  (1) 
2x  −  y  =  −3  (2) 
Plot the lines of these two equations
As shown on the graph, the two lines intersect at point (0,3). This is the solution to the system of linear equations, i.e. x = 0, y = 3.
For system of linear equations with three variables, the solution is the point of intersection of the three planes that represent each equation.
Inverse Matrix Method
The system of linear equations defined by equations (1), (2), and (3) can be expressed in matrix form AB = C as follows

 = 

The solutions set is the matrix B. To isolate B alone on one side of the equation, we multiply both sides of the equation with the inverse of matrix A.
A^{−1}AB  =  A^{−1}C 
B  =  A^{−1}C 
Now to find B we need to find A^{−1}. Please check the matrix page to learn how to find the inverse of a matrix.
A^{−1} = 
 
B = 

 
B = 

Hence, the solution set is x = 2, y = 3, z = 4.
This method works for solving system of linear equations with n variables. The calculator above uses this inverse matrix method.
Gaussian Elimination / GaussJordan Elimination
The system of linear equations defined by equations (1), (2), and (3) can be expressed in augmented matrix form A as follows
A = 

By performing a series of row operations (Gaussian elimination), we can reduce the above matrix to its row echelon form.
A = 

We can then do back substitution to get the value of all the unknowns / variables or we can perform further row operations until the matrix is in reduced row echelon form (using GaussJordan Elimination).
A = 

By doing the GaussJordan elimination, we get the solution of the system of equations on the last column: x = 2, y = 3, z = 4.
To see step by step row operations involved, please see the GaussJordan Elimination page.
See also: matrix, GaussJordan elimination, Geometric Linear Transformation