There are **many different ways** to solve a system of linear equations. Let's briefly describe a few of the most common methods.

**1. Substitution**

The first method that students are taught, and **the most universal method**, works by choosing one of the equations, picking one of the variables in it, and **making that variable the subject of that equation**. Then, we use this rearranged equation and substitute it for every time that variable appears in the other equations. This way, those other equations now have **one variable less**, which makes them easier to solve.

For example, if we have an equation `2x + 3y = 6`

and want to get `x`

from it, then we start by **getting rid of everything that doesn't contain** `x`

**from the left-hand side**. To do this, we have to subtract `3y`

from both sides (because we have that expression on the left). This means that the left side will be `2x + 3y - 3y`

, which is simply `2x`

, and the right side will be `6 - 3y`

. In other words, we have transformed our equation into `2x = 6 - 3y`

.

Since we want to get `x`

, and not `2x`

, we still need to **get rid of the** `2`

. To do this, we divide both sides by 2. This way, on the left, we get `(2x) / 2`

, which is just `x`

, and, on the right, we have `(6 - 3y) / 2`

, which is `3 - 1.5y`

. All in all, we obtained `x = 3 - 1.5y`

, and we can use this new formula to substitute `3 - 1.5y`

in for every `x`

in the other equations.

**2. Elimination of variables**

Solving systems of equations by elimination means that we're trying to **reduce the number of variables in some of the equations to make them easier to solve**. To do this, we start by transforming two equations so that they look similar. To be precise, we want to make the coefficient (the number next to a variable) of one of the equations variables **the opposite of the coefficient of the same variable in another equation**. We then add the two equations to obtain a new one, which doesn't have that variable, and so it is easier to calculate.

For example, if we have a system of equations,

`2x + 3y = 6`

, and

`4x - y = 3`

,

then we can try to make the coefficient of `x`

in the first equation to be the opposite of the coefficient in the second equation. In our case, this means that we want to transform the `2`

into the opposite of `4`

, which is `-4`

. To do this, we need to **multiply both sides of the first equation** by `-2`

, since `2 × (-2) = -4`

. This changes the first equation into

`2x × (-2) + 3y × (-2) = 6 × (-2)`

,

which is:

`-4x - 6y = -12`

.

Now we can add this equation to the second one (the `4x - y = 3`

) by adding the left side to the left side and the right to the right. This gives

`4x - y + (-4x - 6y) = 3 + (-12)`

,

which is:

`-7y = -9`

.

We've obtained a new equation with just one variable, which means that **we can easily solve** `y`

. We can then substitute that number into either of the original equations to get `x`

.

**3. Gaussian elimination method**

**This is the method used by our system of equations calculator.** Named after a German mathematician Johann Gauss, it is an algorithmic extension of the elimination method presented above. In the case of just two equations, it is exactly the same thing. However, solving systems of equations by regular elimination gets trickier and trickier with more and more equations and variables. **That's where the Gaussian elimination method comes in.**

Let's say that we have **four equations with four variables**. To find the solution to our system, we want to try to get the values of our variables one by one by eliminating all the other consecutively. To do this, we **take the first equation and the first of the variables**. We use its coefficient to **eliminate all the occurrences of that particular variable in the other three equations**, just as we did in the regular elimination. This way, we are left with the first equation the same as it was and three equations, now each with **only three variables**.

We now look at the first equation, give it a thumbs-up, and **leave it as it is until the very end**. We repeat the process for the other three equations. In other words, we **take the second variable and its coefficient from the second equation** to eliminate all occurrences of that variable in the last two equations. This leaves us with the first equation having four variables, the second having three, and the last two having **only two variables**.

Next, we declare the second equation to be nice and pretty and leave it be. We move on to the two remaining equations and take the third variable and its coefficient in the third equation to eliminate that variable from the fourth equality.

In the end, we obtain a system of four equations, in which **the first has four variables, the second has three, the third has two, and the last has only one**. This means that we can easily get the value of the fourth variable from the fourth equation (since it has no other variables). We then substitute that value to the third equation and get the value of the third variable (since it now has no other variables), and so on.

**4. Graphical representation**

Arguably the least used method, but a method nonetheless. It takes each of the equations in our system and **translates them to a function**. The points on the graph of such a function correspond to the coordinates that satisfy that equation. Therefore, if we want to solve a system of linear equations, then it is enough to find **all the points where the line cross on the graph**, i.e., the coordinates that satisfy all of the equations.

It can be, however, tricky. If we have just two equations and two variables, then the functions are lines on a two-dimensional plane. Therefore, we just need to find **the point where those two lines cross**.

For three variables, the functions are now in a three-dimensional space, and **are no longer lines but planes**. This means that we would have to draw three planes (which is tricky in itself) and then also find where those planes cross. And, if you think that's difficult, try to imagine **four variables and four dimensions**. If it comes to you naturally, please contact us, and we'll direct you to the nearest Nobel prize-type project or a neurologist for a thorough head check.

🙋 By describing them using the **slope-intercept form**, you can easily find the intersection between two lines. Read more about it in our slope intercept form calculator.

**5. Cramer's rule**

A fairly easy and very straightforward way to solve a system of linear equations. It does, however, **require a good understanding of matrices and their determinants**. As an encouragement, let us mention that it doesn't need any substitution, no playing around with the equations, it's just the good old **basic arithmetics**. For example, for a system of three equations with three variables, we plug in the coefficients from those equations to form four three-by-three matrices and calculate their determinants (what is a determinant?). We finish by dividing the appropriate values that we've just obtained to get the final solution.