Preview

A lesson from Essential Linear Algebra for ML

£29/month

£29/month£29/month or £249/year · 30-day money-back guarantee

Get full access

Our content is best on a larger screen

Solving systems of two linear equations

Solutions of a system

Explanation

We've seen that a point lies on the graph of an equation exactly when its coordinates satisfy the equation. The graph of a linear equation in xx and yy is a straight line, and two straight lines drawn on the same axes usually cross at one point. That point lies on both lines, so its coordinates satisfy both equations.

System of two linear equations and its solution

Definition

A system of two linear equations in xx and yy is a pair of linear equations

{ax+by=cdx+ey=f\begin{cases} ax + by = c \\ dx + ey = f \end{cases}

where aa, bb, cc, dd, ee and ff are numbers.

A solution of the system is a pair of values (x,y)(x, y) that satisfies both equations.

For every system in this lesson the two lines cross at exactly one point, so the system has exactly one solution: the crossing point.

12345−1−2−3−4−512345−1−2−3−4−5
x
y
Choose a system to see its two lines. The black point marks where they cross.
x+y=3x−2y=−3
The lines cross at (1,2), so the solution of the system is
x=1, y=2.
x=−22x−y=−7
The lines cross at (−2,3), so the solution of the system is
x=−2, y=3.
2x+y=−4x−y=1
The lines cross at (−1,−2), so the solution of the system is
x=−1, y=−2.

Example

Decide whether each pair is a solution of the system

{2x+y=3x−3y=5\begin{cases} 2x + y = 3 \\ x - 3y = 5 \end{cases}
  1. (2,−1)(2, -1)
  2. (1,1)(1, 1)

Solution

  1. We substitute x=2x = 2 and y=−1y = -1 into the first equation:

    2(2)+(−1)=32(2) + (-1) = 3

    The first equation is true. We substitute the same values into the second equation:

    2−3(−1)=52 - 3(-1) = 5

    The second equation is also true. The pair satisfies both equations, so (2,−1)(2, -1) is a solution of the system.

  2. We substitute x=1x = 1 and y=1y = 1 into the first equation:

    2(1)+1=32(1) + 1 = 3

    The first equation is true. We substitute the same values into the second equation:

    1−3(1)=−21 - 3(1) = -2

    Since −2≠5-2 \neq 5, the second equation is false. The pair satisfies only the first equation, so (1,1)(1, 1) is not a solution of the system.

Practice questions

4 questions

Is (4,−1)(4, -1) a solution of the system

{x+2y=23x−y=11\begin{cases} x + 2y = 2 \\ 3x - y = 11 \end{cases}

Select the correct answer:

+ 3 more questions · unlocked with a subscription

Solving by substitution

Explanation

At a solution both equations hold, so an expression for one variable taken from one equation can replace that variable in the other. This is the substitution method:

The substitution method

Procedure

  1. Rearrange one equation to write one variable in terms of the other. A variable with coefficient 11 or −1-1 is the best choice, because making it the subject then needs no division.
  2. Substitute this expression into the other equation, which leaves an equation in one variable.
  3. Solve that equation.
  4. Back-substitute the value into the expression from step 1 to find the other variable.
  5. As a check, substitute the pair into both original equations. A solution makes both true.

Example

Solve the system by substitution:

{x+3y=72x−y=7\begin{cases} x + 3y = 7 \\ 2x - y = 7 \end{cases}

Solution

  1. In the first equation xx has coefficient 11, so we make xx the subject by subtracting 3y3y from both sides:

    x=7−3yx = 7 - 3y
  2. We substitute 7−3y7 - 3y for xx in the second equation, which leaves an equation in yy alone:

    2(7−3y)−y=72(7 - 3y) - y = 7
  3. We expand the bracket, collect the yy terms and solve:

    14−6y−y=714−7y=7−7y=−7y=1\begin{align*} 14 - 6y - y &= 7 \\ 14 - 7y &= 7 \\ -7y &= -7 \\ y &= 1 \end{align*}
  4. We back-substitute y=1y = 1 into the expression for xx from step 1, x=7−3yx = 7 - 3y:

    x=7−3(1)=4x = 7 - 3(1) = 4

    The solution is (4,1)(4, 1).

  5. As a check, we substitute x=4x = 4 and y=1y = 1 into both original equations, and each is true:

    4+3(1)=72(4)−1=7\begin{align*} 4 + 3(1) &= 7 \\ 2(4) - 1 &= 7 \end{align*}

Practice questions

5 questions

Solve the system:

{y=x−43x+2y=7\begin{cases} y = x - 4 \\ 3x + 2y = 7 \end{cases}

Select the correct answer:

+ 4 more questions · unlocked with a subscription

Memory is built by recalling, not by reading.

Every time you pull an answer from memory, the memory gets stronger. Reading doesn't do that. Nodeledge asks you questions on every step of every lesson, then asks again after days, weeks and months.

Get full access

£29/month or £249/year · 30-day money-back guarantee

See the learning path