Skip to main content

Section 1.1 Systems of linear equations

Subsection 1.1.1 Systems and their solutions

Definition 1.1.1.

A linear equation in variables \(x_1, \ldots, x_n\) is an equation of the form \(a_1x_1 + \cdots + a_nx_n = b\text{,}\) where \(a_1, \ldots, a_n, b\) are constants.

We will sometimes say that an equation is a linear equation if it can be easily rearranged into an equation of the form above.

We may choose any letters that we wish for our variables. When we are working with an unknown number \(n\) of variables we often choose our variables to be \(x_1, \ldots, x_n\) or \(y_1, \ldots, y_n\text{.}\) If we are working with only three variables we are more likely to choose the variables to be \(x, y, z\) rather than \(x_1, x_2, x_3\text{.}\) Occasionally we will have reasons to use other letters.

The following are examples of linear equations in the variables \(x, y, z\text{:}\)

  • \(\displaystyle 4x+\pi y-3z=1 \)

  • \(\displaystyle x+z=0\)

  • \(\displaystyle x=2+y+z\)

Notice that the second equation is equivalent to \(x+0y+z=0\text{,}\) so we can consider this equation as either being in only the variables \(x, z\) or as being in the variables \(x, y, z\text{;}\) which one is intended will always be made clear from the context. The third equation can be rewritten as \(x-y-z=2\text{.}\)

The following equations in the variables \(x, y, z\) are not linear:

  • \(\displaystyle xy+z=2\)

  • \(\displaystyle x^2+y^2-z=0\)

  • \(\displaystyle \sin(x) + \cos(y) + \tan(z) = 3\)

Definition 1.1.4.

A system of linear equations is a finite collection of linear equations, all of which are in the same finite collection of variables. The number of variables does not need to be the same as the number of equations.

A solution to a system of linear equations is a choice of values for the variables that makes all of the equations true.

Here is a system of linear equations in the variables \(x, y, z\text{:}\)

\begin{gather*} x+y+z=2 \\ x-y=0 \end{gather*}

The assignment \(x=0, y=0, z=2\) is one solution to this system of equations. Another solution is \(x=1, y=1, z=0\text{.}\) Yet another solution is \(x=2, y=2, z=-2\text{.}\) The assignment \(x=3, y=2, z=-3\) is not a solution to this system.

If we re-write the second equation as \(x=y\) then we can substitute it into the first equation to get

\begin{equation*} 2y+z=2\text{,} \end{equation*}

which we can rearrange as \(z=2-2y\text{.}\) Now if we choose any value for \(y\text{,}\) and then take \(x=y\) and \(z=2-2y\text{,}\) then the first equation becomes \(y+y+(2-2y) = 2\) and the second equation becomes \(y-y=0\text{.}\) Both of these equations are true no matter what value we give to \(y\text{.}\) Therefore this system has infinitely many solutions. Even better, we know how to find all of the solutions: Pick any value at all for \(y\text{,}\) then choose \(x=y\) and \(z = 2-2y\text{,}\) and you will have a solution to this system; moreover, every solution to the system is of this form.

Here is a system of linear equations in the variables \(x, y\text{:}\)

\begin{gather*} x+y=0 \\ x-y=0 \end{gather*}

For this system the only solution is \(x=0, y=0\text{.}\) One way to see this is to re-write the second equation as \(x=y\text{.}\) We can then substitute this in to the first equation to obtain \(y+y=0\text{,}\) which means \(y=0\text{.}\) Then plugging this back into \(x=y\) we get \(x=0\text{.}\)

Here is a system of equations in variables \(x_1, x_2, x_3\text{:}\)

\begin{gather*} x_1+2x_2-x_3=0 \\ x_3=1 \\ x_1+2x_2 = 5 \end{gather*}

This system has no solutions. To see this, re-write the third equation as \(x_1 = 5-2x_2\text{.}\) Now substitute that, together with \(x_3 = 1\text{,}\) into the first equation to get

\begin{equation*} 5-2x_2+2x_2-1=0\text{.} \end{equation*}

Simplifying this equation gives us

\begin{equation*} 4=0\text{,} \end{equation*}

which is not true no matter what the values of \(x_1, x_2, x_3\) are.

The method of solving systems by rearranging equations and substituting them into other equations (such as we did in Example 1.1.5, Example 1.1.6 and Example 1.1.7) may already be familiar to you. While it is effective for small systems like these ones, it very quickly becomes impractical as the number of variables and the number of equations increases. We will see another, more efficient, method in Section 1.2.

So far we have seen that a system of linear equations may have infinitely many solutions, exactly one solution, or no solutions at all. We will eventually see that these are all of the possibilities, but we will need to develop many new ideas before we are ready to explain why that is the case.

Subsection 1.1.2 Augmented matrices

You might have noticed that the letters we choose for the variables in our systems essentially make no difference to the equations. For instance, the system

\begin{gather*} x-3y=4 \\ 2x+y=-2 \end{gather*}

is fundamentally the same as the system

\begin{gather*} r-3t=4 \\ 2r+t=-2 \end{gather*}

because the only difference between the two is the letters we chose for the variables.

In fact, the only important information about the system above is that in the first equation the first variable has coefficient \(1\text{,}\) the second variable has coefficient \(-3\text{,}\) and on the other side of the equals sign the constant is \(4\text{,}\) together with similar information for the second equation. Thus the following array of numbers, known as an augmented matrix, contains all of the relevant information about the system of equations:

\begin{equation*} \matr{cc|c}{1 \amp -3 \amp 4 \\ 2 \amp 1 \amp -2}\text{.} \end{equation*}

Definition 1.1.8.

The augmented matrix associated to the system of linear equations

\begin{gather*} a_{1, 1}x_1 + a_{1,2}x_2 + \cdots + a_{1, n}x_n = b_1\\ a_{2, 1}x_1 + a_{2,2}x_2 + \cdots + a_{2, n}x_n = b_2\\ \vdots\\ a_{m,1}x_1 + a_{m,2}x_2 + \cdots + a_{m,n}x_n = b_m \end{gather*}

is the matrix

\begin{equation*} \matr{cccc|c}{a_{1,1} \amp a_{1, 2} \amp \cdots \amp a_{1,n} \amp b_1 \\ a_{2,1} \amp a_{2, 2} \amp \cdots \amp a_{2, n} \amp b_2 \\ \vdots \amp \vdots \amp \ddots \amp \vdots \amp \vdots \\ a_{m,1} \amp a_{m,2} \amp \cdots \amp a_{m,n} \amp b_m}\text{.} \end{equation*}

In the augmented matrix of a system of linear equations the part of the matrix to the left of the vertical bar is called the coefficient matrix. In this part of the matrix the numbers are the coefficients of the variables, while the variables themselves are represented by the column positions. Thus the numbers in the second column of the coefficient matrix represent the coefficients of the second variable of the system. Notice that we do not write the variable letters in the matrix!

On the right side of the vertical line we have the constants from the equations. The vertical line itself represents the equals sign.

Consider this system of equations:

\begin{gather*} 3x-5y+z=15\\ x+y+z=0\\ x+3z=-2\\ y+17z=1\\ 5x+2z=1\\ y=3 \end{gather*}

The augmented matrix associated to this system is:

\begin{equation*} \matr{ccc|c}{3 \amp -5 \amp 1 \amp 15 \\ 1 \amp 1 \amp 1 \amp 0 \\ 1 \amp 0 \amp 3 \amp -2 \\ 0 \amp 1 \amp 17 \amp 1 \\ 5 \amp 0 \amp 2 \amp 1 \\ 0 \amp 1 \amp 0 \amp 3}\text{.} \end{equation*}

Exercises 1.1.3 Exercises

1.

Which of the following equations are linear?

  1. \(\displaystyle 2x-3y+4z =-10\)

  2. \(\displaystyle 2.123x_1+5.541x_2-9.101x_3 = 11.012\)

  3. \(\displaystyle x^2 +y^2 +z^2 =1\)

  4. \(\displaystyle \frac{1}{\sqrt{2}}x+4^3y = \sin\left(\frac{\pi}{3} \right)\)

  5. \(\displaystyle x +yz =3\)

Hint.
A linear equation is an equation of the form,
\begin{equation*} a_1 x_1 + a_2 x_2 + \ldots + a_n x_n = b. \end{equation*}
Where \(a_1, a_2, \ldots, a_n \) and \(b \) are scalars and \(x_1, x_2, \ldots, x_n \) are the variables of the equation.
Answer.
  1. Linear.

  2. Linear.

  3. Not linear.

  4. Linear.

  5. Not linear.

Solution.
  1. The equation \(2x -3y + 4z = -10 \) is a linear equation because it is of the form given in Hint 1.1.3.1.1 where \(2, -3, 4, -10 \) are scalars and \(x,y, z \) are variables.

  2. The equation \(2.123x_1+5.541x_2-9.101x_3 = 11.012\) is a linear equation because it is of the form given in Hint 1.1.3.1.1 where \(2.123, 5.541, 9.101, 11.012 \) are scalars and \(x_1,x_2, x_3 \) are variables.

  3. The equation \(x^2 +y^2 +z^2 =1\) is a not a linear equation because it is not of the form given in Hint 1.1.3.1.1. The equation contains the variables \(x,y, z \) squared.

  4. The equation \(\frac{1}{\sqrt{2}}x+4^3y = \sin\left(\frac{\pi}{3} \right)\) is a liner equation because it is of the form given in Hint 1.1.3.1.1 where \(\frac{1}{\sqrt{2}}, 4^3, \sin\left(\frac{\pi}{3}\right)\) are scalars and \(x,y \) are variables.

  5. The equation \(x +yz =3\) is a not a liner equation because it is not of the form given in Hint 1.1.3.1.1. The equation contains a product of the variables \(y, z. \)

2.

Consider the system of equations
\begin{align*} x + 2y +3z +4w \amp =4\\ x+y + z +w \amp =2\\ x+ 2y +2z +w \amp =2 \end{align*}
For each of the following tuples \((x,y,z,w)\) of real numbers, determine whether it is a solution of the first equation, second equation, and/or third equation. Which ones are solutions to the system of equations?
  1. \(\displaystyle (2,0,-2,2)\)

  2. \(\displaystyle (2,2,-2,0)\)

  3. \(\displaystyle (1,1,-1,1)\)

  4. \(\displaystyle (3,0,-1,1)\)

  5. \(\displaystyle (2,-2,2,0)\)

Hint 1.
A solution to an equation is a tuple of values that make the equation true when the values are substituted for their respective variables within the equation.
Hint 2.
A solution to a system of equations must satisfy all equations in the system.
Answer.
  1. The tuple \((2,0,-2,2) \) is a solution to the first and second equation but not the third equation. It is not a solution to the system of equations.

  2. The tuple \((2,2,-2,0) \) is a solution to the second and third equation but not the first equation. It is not a solution to the system of equations.

  3. The tuple \((1,1,-1,1) \) is a solution to all three equations and hence is a solution to the system of equations.

  4. The tuple \((3,0,-1,1) \) is a solution to the first and third equations but not the second equation. It is not a solution to the system of equations.

  5. The tuple \((2,-2,2,0) \) is a solution to all three equations and hence is a solution to the system of equations.

Solution.
  1. Substituting in \(x =2, y = 0, z=-2\) and \(w=2 \) into the equation:

    \begin{equation*} 2 + 2(0) + 3(-2) + 4(2) = 4 \end{equation*}
    This equation is true. Therefore \((2,0,-2,2) \) is a solution to the first equation. Similarly,
    \begin{equation*} 2 + 0 + (-2) + 2 = 2 \end{equation*}
    The above result is also true, therefore the tuple is a solution to the second equation. Lastly,
    \begin{equation*} 2 + 2(0) + 2(-2) +2 = 2 \end{equation*}
    The above result is false, because 0 is not equal to 2. Therefore, the tuple is not a solution of the last equation. The tuple \((2,0,-2,2) \) is not a solution to the system of equations because it is not a solution to all three equations.

3.

Graphically, find the solution to the system \(x+3y =1\) and \(x-y=3\text{.}\) That is, each of these equations is a line in the plane. Graph each line and see where they intersect.
Hint.
Two points make a line, so we may simply find two solutions of each equation, graph them, and connect the two solutions to form a line.
Answer.
The lines intersect at the point \((2.5, -.5) .\)
Solution.
We may start with the line \(x+3y =1.\) First notice that setting \(y = 0 \) gives \(x = 1. \) And setting \(x = 4 \) we get a whole number solution \(y = -1.\) The following graph is obtained by plotting these two solutions, \((1,0), (4,-1) \) and connecting them to form a line. Similarly, for the second equation we find the solutions \((0,-3), (3,0) \text{,}\) plot them on the same set of axes as the first line, and connect the two points to form a line. The solution to the system of equations is the point of intersection of the lines, which we can graphically approximate to be \((2.5, -.5) .\) We can check this solution by plugging it back into both equations.
\begin{gather*} 2.5 + 3(-.5) = 1\\ 2.5 - (-.5) = 3. \end{gather*}

4.

Graphically, find the point of intersection of the two lines \(3x+y =3\) and \(x+2y=1\text{.}\) That is, graph each line and see where they intersect.
Hint.
Referring to Hint 1.1.3.3.1, two points make a line, so we may simply find two solutions of each equation, graph them, and connect the two solutions to form a line.
Answer.
The lines intersect at the point \((1, 0) .\)
Solution.
We may start with the line \(3x+y =3.\) First notice that setting \(y = 0 \) gives \(x = 1. \) And setting \(x = 0 \) we get \(y = 3.\) The following graph is obtained by plotting these two solutions, \((1,0), (0,3) \) and connecting them to form a line. Similarly, for the second equation we find the solutions \((1,0), (0,.5) \text{,}\) plot them on the same set of axes as the first line, and connect the two points to form a line. The solution to the system of equations is the point of intersection of the lines, which we can graphically approximate to be \((1, 0) .\) We can check this solution by plugging it back into both equations.
\begin{gather*} 3(1) + 0 = 3\\ 1 - 0= 1. \end{gather*}

5.

Solve for the following system by back substitution.
\begin{align*} x+3y -2z \amp =5\\ y + 3z \amp =4\\ z \amp =1 \end{align*}
Hint.
Work your way from the bottom equation to the top. Try first Substituting the value of \(z \) into the second equation to solve for \(y \text{.}\)
Answer.
\begin{equation*} x=4,y=1,z=1 \end{equation*}
Solution.
Let's follow the hint and substitute \(z =1 \) in the second equation.
\begin{equation*} y + 3(1) = 4 \end{equation*}
Solving for \(y, \) by subtracting 3 from both sides, yields \(y = 1 .\) Now, we may substitute \(z= 1 \) and \(y = 1 \) into the first equation to solve for \(x\text{.}\)
\begin{equation*} x + 3(1) -2(1) = 5 \end{equation*}
Solving for \(x, \) by subtracting 1 from both sides, yields \(x = 4 \text{.}\) The solution to the system of equations is \(x=4,y=1,z=1\)

6.

Write the augmented matrix for each of the following systems of linear equations.
  1. \begin{align*} x - 3y \amp = 5\\ 2x + y \amp = 5 \end{align*}

  2. \begin{align*} x - 2y \amp = 0\\ y \amp = 5 \end{align*}

  3. \begin{align*} x - y + z \amp = \amp 2\\ x - z \amp = \amp 1\\ y + 2z \amp = \amp 0 \end{align*}

  4. \begin{align*} x + y \amp = \amp 1\\ y + z \amp = \amp 0\\ -x + z \amp = \amp 2 \end{align*}

Hint.
An augmented matrix of a system of \(n \) variables contains the coefficients of the variables in the first \(n-1 \) columns and contains the constant terms in the final column. The vertical bar separating the first \(n-1 \) columns from the final column serves as a reminder of the equal sign in the equations of the system.
Answer.
  1. \begin{equation*} \matr{cc|c}{1\amp -3\amp 5\\2\amp 1\amp 5} \end{equation*}

  2. \begin{equation*} \matr{cc|c}{1\amp -2\amp 0\\0\amp 1\amp 5} \end{equation*}

  3. \begin{equation*} \matr{ccc|c}{1\amp -1\amp 1 \amp 2 \\1\amp 0 \amp -1 \amp 1 \\ 0\amp 1 \amp 2 \amp 0} \end{equation*}

  4. \begin{equation*} \matr{ccc|c}{1\amp 1\amp 0 \amp 1 \\0\amp 1 \amp 1 \amp 0 \\ -1\amp 0 \amp 1 \amp 2} \end{equation*}