*See also: matrix, Gauss-Jordan 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 Gauss-Jordan Elimination method to solve it.

Please scroll down to read about various methods to solve simultaneous linear equations.

Choose the size of the system.

loading . . .

Calculating . . .

Please report any error to [email protected]

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

$$\{\begin{array}{rrrrrll}x& +& y& -& z& =1& \phantom{\rule{30px}{0ex}}{\text{(1)}}\\ 8x& +& 3y& -& 6z& =1& \phantom{\rule{30px}{0ex}}{\text{(2)}}\\ -4x& -& y+& 3z& =1& \phantom{\rule{30px}{0ex}}{\text{(3)}}\end{array}$$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 ${\text{(1)}}$ and ${\text{(3)}}$. The coefficient for $y$ is $1$ and $-1$ respectively. We can add the two equations to eliminate $y$ and we get equation ${\text{(4)}}$.

$$\begin{array}{rrrrrll}x& +& y& -& z& =1& \phantom{\rule{30px}{0ex}}{\text{(1)}}\\ -4x& -& y& +& 3z& =1& \phantom{\rule{30px}{0ex}}{\text{(3)}}\end{array}\phantom{\rule{0ex}{0ex}}\text{------------------------}\phantom{\rule{30px}{0ex}}+\phantom{\rule{0ex}{0ex}}\begin{array}{rrrrrll}-3x& \phantom{+}& \phantom{0}& +& 2z& =2& \phantom{\rule{30px}{0ex}}{\text{(4)}}\end{array}$$Note that equation ${\text{(4)}}$ consists of variables $x$ and $z$. Now we need another equation that has the same variables as equation ${\text{(4)}}$. To get this we will eliminate $y$ from equation ${\text{(1)}}$ and ${\text{(2)}}$. In equation ${\text{(1)}}$ and ${\text{(2)}}$, the coefficients of $y$ are $1$ and $3$ respectively. In order to eliminate $y$, we multiply equation ${\text{(1)}}$ by $3$ and then subtract equation ${\text{(2)}}$ from equation ${\text{(1)}}$.

$$\begin{array}{rrrrrlll}x& +& y& -& z& =1& \phantom{\rule{30px}{0ex}}{\text{(1)}}& \phantom{\rule{20px}{0ex}}{\text{\xd7 3}}\\ 8x& +& 3y& -& 6z& =1& \phantom{\rule{30px}{0ex}}{\text{(2)}}& \end{array}$$$$\begin{array}{rrrrrlll}3x& +& 3y& -& 3z& =3& \phantom{\rule{30px}{0ex}}{\text{(1)}}& \phantom{\rule{40px}{0ex}}\\ 8x& +& 3y& -& 6z& =1& \phantom{\rule{30px}{0ex}}{\text{(2)}}& \end{array}\phantom{\rule{0ex}{0ex}}\text{------------------------}\phantom{\rule{30px}{0ex}}-\phantom{\rule{50px}{0ex}}\phantom{\rule{0ex}{0ex}}\begin{array}{rrrrrlll}-5x& \phantom{+}& \phantom{0y}& +& 3z& =2& \phantom{\rule{30px}{0ex}}{\text{(5)}}& \phantom{\rule{60px}{0ex}}\end{array}$$

With equations ${\text{(4)}}$ and ${\text{(5)}}$, we can now eliminate $z$.

$$\begin{array}{rrrrrl}-3x& +& 2z& =2& \phantom{\rule{30px}{0ex}}{\text{(4)}}& \phantom{\rule{20px}{0ex}}{\text{\xd7 3}}\\ -5x& +& 3z& =2& \phantom{\rule{30px}{0ex}}{\text{(5)}}& \phantom{\rule{20px}{0ex}}{\text{\xd7 2}}\end{array}$$$$\begin{array}{rrrrrl}-9x& +& 6z& =6& \phantom{\rule{30px}{0ex}}{\text{(4)}}& \phantom{\rule{40px}{0ex}}\\ -10x& +& 6z& =4& \phantom{\rule{30px}{0ex}}{\text{(5)}}& \end{array}\phantom{\rule{0ex}{0ex}}\text{------------------------}\phantom{\rule{30px}{0ex}}-\phantom{\rule{50px}{0ex}}\phantom{\rule{0ex}{0ex}}\begin{array}{rrrrrl}\phantom{+01}x& \phantom{+}& \phantom{0z}& =2& \phantom{\rule{30px}{0ex}}{\text{(6)}}& \phantom{\rule{45px}{0ex}}\end{array}$$

From equation ${\text{(6)}}$ we get $x=2$. Now we can substitute this value of $x$ to equation ${\text{(4)}}$ to get the value for $z$.

$$\begin{array}{rrrll}-3\left(2\right)& +& 2z& =2& \phantom{\rule{30px}{0ex}}{\text{(4)}}\\ -6& +& 2z& =2& \\ & & 2z& =2+6& \\ & & 2z& =8& \\ & & z& =8\xf72& \\ & & z& =4& \end{array}$$Finally, we can substitute the values of $x$ and $z$ to equation ${\text{(1)}}$ to get $y$.

$$\begin{array}{rll}2+y-4& =1& \phantom{\rule{30px}{0ex}}{\text{(1)}}\\ y& =1-2+4& \\ y& =3& \end{array}$$Hence the solution to the system of linear equations is $x=2$, $y=3$, $z=4$.

First, let's re-arrange equation ${\text{(1)}}$ such that only 1 variable is on the left hand side.

$$\begin{array}{rl}x=1-y+z& \phantom{\rule{30px}{0ex}}{\text{(1)}}\end{array}$$Now let's substitute this $x$ to equation ${\text{(2)}}$.

$$\begin{array}{rll}8\left(1-y+z\right)+3y-6z& =1& \phantom{\rule{30px}{0ex}}{\text{(2)}}\\ 8-8y+8z+3y-6z& =1& \\ -5y+2z& =1-8& \\ -5y+2z& =-7& \phantom{\rule{30px}{0ex}}{\text{(4)}}\end{array}$$Similarly, substitute $x$ to equation ${\text{(3)}}$.

$$\begin{array}{rll}-4\left(1-y+z\right)-y+3z& =1& \phantom{\rule{30px}{0ex}}{\text{(3)}}\\ -4+4y-4z-y+3z& =1& \\ 3y-z& =1+4& \\ 3y-z& =5& \phantom{\rule{30px}{0ex}}{\text{(5)}}\end{array}$$Now let's re-arrange equation ${\text{(5)}}$ so that only 1 variable is on the left hand side.

$$\begin{array}{rl}z=3y-5& \phantom{\rule{30px}{0ex}}{\text{(5)}}\end{array}$$Next, substitute this value of $z$ to equation ${\text{(4)}}$.

$$\begin{array}{rll}-5y+2\left(3y-5\right)& =-7& \phantom{\rule{30px}{0ex}}{\text{(4)}}\\ -5y+6y-\mathrm{10}& =-7& \\ y& =-7+10& \\ y& =3& \end{array}$$Now that we have found $y$, we can substitute this to equation ${\text{(5)}}$ to find $z$.

$$\begin{array}{rll}z& =3\left(3\right)-5& \phantom{\rule{30px}{0ex}}{\text{(5)}}\\ z& =9-5& \\ z& =4& \end{array}$$Finally, we can substitute the value of $y$ and $z$ to equation ${\text{(1)}}$ to get the value of $x$.

$$\begin{array}{rll}x& =1-3+4& \phantom{\rule{30px}{0ex}}{\text{(1)}}\\ x& =2& \end{array}$$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.

$$\{\begin{array}{rrrr}x& +& y& =3\\ 2x& -& y& =-3\end{array}$$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.

The system of linear equations defined by equations ${\text{(1)}}$, ${\text{(2)}}$ and ${\text{(3)}}$ can be expressed in matrix form as follows.

$$\begin{array}{rl}AB& =C\\ \left(\begin{array}{rrr}1& 2& -1\\ 8& 3& -6\\ -4& -1& 3\end{array}\right)\left(\begin{array}{c}x\\ y\\ z\end{array}\right)& =\left(\begin{array}{c}1\\ 1\\ 1\end{array}\right)\end{array}$$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$.

$$\begin{array}{rl}{A}^{-1}AB& ={A}^{-1}C\\ B& ={A}^{-1}C\end{array}$$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.

$$\begin{array}{rl}{A}^{-1}& =\left(\begin{array}{rrr}-3& 2& 3\\ 0& 1& 2\\ -4& 3& 5\end{array}\right)\\ B& =\left(\begin{array}{rrr}-3& 2& 3\\ 0& 1& 2\\ -4& 3& 5\end{array}\right)\left(\begin{array}{c}1\\ 1\\ 1\end{array}\right)\\ B& =\left(\begin{array}{c}2\\ 3\\ 4\end{array}\right)\end{array}$$Hence the solution set is $x=2$, $y=3$, $z=4$.

The system of linear equations defined by equations ${\text{(1)}}$, ${\text{(2)}}$ and ${\text{(3)}}$ can be expressed in augmented matrix form as follows.

$$A=\left(\begin{array}{rrrrr}1& 1& -1& \text{|}& 1\\ 8& 3& -6& \text{|}& 1\\ -4& -1& 3& \text{|}& 1\end{array}\right)$$By performing a series of row operations (Gaussian elimination), we can reduce the above matrix to its row echelon form.

$$A=\left(\begin{array}{rccll}1& 0.375& -0.75& \text{|}& 0.125\\ 0& 1& -0.4& \text{|}& 1.4\\ 0& 0& 1& \text{|}& 4\end{array}\right)$$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 Gauss-Jordan Elimination).

$$A=\left(\begin{array}{rrrrr}1& 0& 0& \text{|}& 2\\ 0& 1& 0& \text{|}& 3\\ 0& 0& 1& \text{|}& 4\end{array}\right)$$By doing the Gauss-Jordan 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 Gauss-Jordan Elimination page.

Confused and have questions? We’ve got answers. With Chegg Study, you can get step-by-step solutions to your questions from an expert in the field.

*See also: matrix, Gauss-Jordan elimination, Geometric Linear Transformation*