3 minutes read

Linear equations are an effective tool in many mathematical and computational problems. Numerous processes can be described with their help, and they are the most easily solved. There are various ways of solving them, both approximately and exactly. Here we are going to introduce the so-called substitution method. You can use it to solve simple systems by hand. It can also help understand more advanced and general methods.

Let's look at an example:

{2x3y=34y3x=7\begin{cases} 2x - 3y = 3\\ 4y - 3x = -7 \end{cases}If you look carefully you will notice, that the pair x=9x = 9 and y=5y = 5 is a solution of this system, because it satisfies both of those equations. But how can we obtain this result without guessing? And how can we show that this is the one and only solution? Let’s figure it out.

The idea of the method

The key idea here is that the solution of a system indeed satisfies all the equations. But before describing the method, let’s call to mind how to solve a linear equation for one variable in terms of others. Consider the first equation from the example

2x3y=32x - 3y = 3Remember that multiplication of both sides of the equation by the same nonzero number does not change its solutions, as well as adding the same terms to both sides. That's why you can do something like this:

12(2x3y)=123x32y=32x32y+32y=32+32yx=32+32y\frac{1}{2}\cdot(2x - 3y) = \frac{1}{2}\cdot3\\[1.5mm] x - \frac{3}{2}y = \frac{3}{2}\\[1.5mm] x - \cancel{\frac{3}{2}y} + \cancel{\frac{3}{2}y} = \frac{3}{2} + \frac{3}{2}y \\ [1.5mm] x = \frac{3}{2} + \frac{3}{2}yNotice that we managed to isolate xx in the left part of the equation, and everything else is on the right side. This procedure is called solving an equation for xx in terms of yy. Obviously, it could be done to any linear equation. For example, if we solve

x1+2x23x3x4=5x_{1} + 2x_{2} - 3x_{3} - x_{4} = 5for x3x_{3} in terms of x1x_{1}, x2x_{2}, and x4x_{4}, the result will be

x3=13x1+23x213x453x_{3} = \frac{1}{3}x_{1} + \frac{2}{3}x_{2} - \frac{1}{3}x_{4} - \frac{5}{3}(Check it!) As you can see, the algorithm is very simple:

  1. Divide the whole equation by the coefficient before the required variable. That way you obtain coefficient 11 before it (if it is already 11 skip this step).
  2. Move all the terms except the required variables to the other side of the equation.

Obviously, you can change the sequence of these steps.

Let's get back to the systems. As it was remarked, if a system has a solution, it satisfies all of its equations. Look at the example again

{2x3y=34y3x=7\begin{cases} 2x - 3y = 3\\ 4y - 3x = - 7 \end{cases}The point here is that when we are solving this system, the variables xx are set to be equal in both equations (with yy it is the same). As we are not changing the set of solutions of the first equation (and therefore of the whole system) let’s solve it for xx in terms of yy. Now we have the following

{x=32+32y4y3x=7\begin{cases} x = \frac{3}{2} + \frac{3}{2}y\\ 4y - 3x = - 7 \end{cases}Here you can use the expression for xx in the second equation (just change xx for 3/2+3y/23/2 + 3y/2):

4y3(32+32y)=74y - 3\left(\color{red}\frac{3}{2} + \frac{3}{2}y\color{black}\right) = - 7The process of replacement of a variable with the expression (marked in red) is called substitution. As you see, this is the equation of a single variable yy, which can be trivially solved:

4y9292y=712y=52y=54y - \frac{9}{2} - \frac{9}{2}y = -7\\[1.5mm] -\frac{1}{2}y = - \frac{5}{2}\\[1.5mm]\\ \boxed{y = 5}So, now you have yy. But you already have the expression for xx in terms of yy:

x=32+32y=32+325=9x = \frac{3}{2} + \frac{3}{2}y = \frac{3}{2} + \frac{3}{2}\cdot 5 = 9And now you have the solution. Notice, that it is, obviously, the single solution, as every step of our method hasn’t changed the set of solutions, and there is no other pair of numbers that could be obtained through these steps.

Algorithm Description

In the previous section, you looked at substitution method application for a very simple system, which had one determined solution. Here we will try to describe the whole algorithm for an arbitrary system. Don't be confused, as we are going to give some examples in the following section. Let's say you have a system of nn equations with nn variables (x1x_{1},x2x_{2},…,xnx_{n})

  1. So the first step is to assume that the system has indeed a unique solution.
  2. Solve one of the equations of the system (for example the first one) for one of its variables in terms of others (for simplicity, we assume that x1x_{1} is expressed from the first equation).
  3. Substitute the expression for x1x_{1} to all the other equations. Now all the equations except the first contain only variables x2x_{2}, x3x_{3}, …, xnx_{n}. That means that now we have a system of n1n - 1 equations with n1n - 1 variables.
  4. Repeat the previous steps for this system. For example, express x2x_{2} in terms of x3,x_{3}, x4x_{4}, … , xnx_{n} from the second equation and substitute it to others.
  5. Continue this procedure until you reach xnx_{n}. If the system has the one and only solution, on this last step you will obtain the numerical value of xnx_{n}.
  6. As xn1x_{n-1} is expressed only in terms of xnx_{n}, knowing the value of xnx_{n} you can calculate xn1x_{n - 1}.
  7. You can continue this way, as each of the variables is expressed only in terms of previous ones, which are calculated in a previous step.
  8. After doing all these calculations, we obtain the solution of the system.

Here or there you can run across a subtlety. If the system has no solutions, you will end up with some untruthful equality (like 2=32 = 3) on the last step of 5. Or you can end up with some identity (like 1=11 = 1), which, of course, means that the system has infinitely many solutions.

Examples of application of the method

1) Let's look at an example

{3x+y+z=4x+2yz=62x+2y+z=1\begin{cases} 3x + y + z = 4\\ x + 2y - z = 6\\ -2x + 2y +z = 1 \end{cases}It does not matter in which order we are expressing the variables, therefore begin with solving the first equation for zz in terms of xx and yy:

z=4y3xz = \color{orange}4 - y - 3x\color{black}(We've chosen to solve for zz because the calculations are the simplest in this case). Now we are substituting this expression to the remaining equations:

{x+2y(4y3x)=62x+2y+(4y3x)=1{4x+3y=105x+y=3\begin{cases} x + 2y - (\color{orange} 4 - y - 3x\color{black}) = 6\\ -2x + 2y + (\color{orange} 4 - y - 3x\color{black}) = 1 \end{cases}\\[2mm] \begin{cases} 4x + 3y = 10\\ -5x + y = -3 \end{cases}Now you have a system of two equations. Let's repeat the same procedure for yy (we are solving the second equation for it):

y=5x3y = \color{blue}5x - 3\color{black}Now substituting it to the first equation we obtain:

4x+3(5x3)=104x + 3(\color{blue}5x - 3\color{black}) = 10This is an equation of one variable. Solving it gives us xx:

4x+15x9=1019x=19x=14x + 15x - 9 = 10\\ 19x = 19\\ \boxed{x = 1}Use this value to calculate yy from the blue substitution:

y=5x3=53y=2y = 5x - 3 = 5 - 3 \Longrightarrow \boxed{y = 2}Lastly, using both values x=1x = 1 and y=2y = 2, we find zz from the orange substitution:

z=4y3x=423z=1z = 4 - y - 3x = 4 - 2 -3 \Longrightarrow \boxed{z = -1}The solution of the system is (1,2,1).(1,2,-1).

2) Another example:

{t1+2t2+3t3=14t1+5t2+6t3=27t1+8t2+9t3=3\begin{cases} t_{1} + 2t_{2} + 3t_{3} = 1\\ 4t_{1} + 5t_{2} + 6t_{3} = 2\\ 7t_{1} + 8t_{2} + 9t_{3} = 3 \end{cases}Let's try to repeat the same algorithm. Firstly, solve the first equation for t1t_{1} (again, as you see, this is the easiest way to begin):

t1=12t23t3t_1 = \color{green}1 -2t_{2} - 3t_{3}\color{black}Substituting:

{4(12t23t3)+5t2+6t3=27(12t23t3)+8t2+9t3=3{3t26t3=26t212t3=4\begin{cases} 4(\color{green}1 - 2t_{2} - 3t_{3} \color{black}) + 5t_{2} + 6t_{3} = 2\\ 7 (\color{green}1 - 2t_{2} - 3t_{3} \color{black}) + 8t_{2} + 9t_{3} = 3 \end{cases} \Longrightarrow \begin{cases} - 3t_{2} - 6t_{3} = -2\\ - 6t_{2} - 12t_{3} = -4\\ \end{cases}Now solving the second equation for t2t_{2}:

t2=232t3t_{2} = \color{purple}\frac{2}{3} - 2t_{3}\color{black}Substituting it to the second equation:

6(232t3)12t3=44+12t312t3=44=4- 6 \left(\color{purple} \frac{2}{3} - 2t_{3}\color{black}\right) - 12t_{3} = - 4\\ -4 + \color{red}\cancel{\color{black} 12t_{3}} \color{black} - \color{red}\cancel{\color{black}12t_{3}}\color{black} = -4\\ - 4 = - 4This is an identity, therefore the system has an infinite set of solutions. Moreover, here we can find the solutions for two of the variables in terms of one other, for example for t1t_{1} and t2t_{2} in terms of t3t_{3}. To do that, substitute the expression for t2t_{2} in expression for t1t_{1}:

{t1=12(232t3)3t3t2=232t3t3=t3{t1=13+t3t2=232t3t3=t3\begin{cases} t_{1} = 1 - 2\left(\color{purple}\frac{2}{3} - 2t_{3}\color{black}\right) - 3t_{3}\\ t_{2} = \frac{2}{3} - 2t_{3}\\ t_{3} = t_{3} \end{cases} \Longrightarrow \begin{cases}t_{1} = -\frac{1}{3} + t_{3}\\ t_{2} = \frac{2}{3} - 2t_{3}\\ t_{3} = t_{3} \end{cases}We added the last line to highlight the fact that now the system is solved in terms of t3t_{3}. For each value of t3t_{3} we obtain one particular solution. For example, if t3=0t_{3} = 0, then the solution is (13,23,0)\left(-\frac{1}{3},\frac{2}{3},0\right), if t3=13t_{3} = \frac{1}{3}, then (0,0,13)\left(0,0,\frac{1}{3}\right) et cetera. The set of solutions could also be rewritten in terms of t1t_{1} or t2t_{2}. However, we are not going to describe this method of solving SLE further. Note that it is very important for continuing the study of linear algebra, especially when it comes to SLEs in which the number of variables and equations are different.

3) For the last example, let's see what's going to happen if a system doesn't have solutions:

{a+3b=72a6b=1\begin{cases} - a + 3b = 7\\ 2a - 6b = -1 \end{cases}As always, solve the first equation for aa:

a=3b7a = \color{navy}3b - 7\color{black}Substitute to the second equation:

2(3b7)6b=16b146b=114=12(\color{navy}3b - 7\color{black}) - 6b = -1\\ \color{red}\cancel{\color{black}6b}\color{black} - 14 - \color{red}\cancel{\color{black}6b}\color{black} = -1\\ -14 = - 1This is a contradiction, therefore this system doesn't have any solutions.

Conclusion

  • Solving an equation for one of its variables in terms of others is a way to derive an expression for this variable using all the other variables in an equation.
  • To solve a system of linear equations (or to show that it doesn't have solutions), first, reduce the number of variables solving the equations successively (in the about-mentioned sense) and substituting the received expressions in the remaining equations until you find the value for the last of the variables (or until you obtain truthful or untruthful identity). Secondly, if you find this particular value, procure the series of reverse substitutions until you find all the values.
  • If you obtain an untruthful identity, that means the system doesn't have any solutions.
  • If, on the contrary, you obtain a truthful identity, then the system has an infinite set of solutions and these solutions can be parametrized with the help of some of the variables.
2 learners liked this piece of theory. 0 didn't like it. What about you?
Report a typo