If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Systems of equations with substitution

Walk through examples of solving systems of equations with substitution.
Let's work to solve this system of equations:
y=2x        Equation 1
x+y=24        Equation 2
The tricky thing is that there are two variables, x and y. If only we could get rid of one of the variables...
Here's an idea! Equation 1 tells us that 2x and y are equal. So let's plug in 2x for y in Equation 2 to get rid of the y variable in that equation:
x+y=24Equation 2x+2x=24Substitute 2x for y
Brilliant! Now we have an equation with just the x variable that we know how to solve:
x+2x=243x=24 3x3=243Divide each side by 3x=8
Nice! So we know that x equals 8. But remember that we are looking for an ordered pair. We need a y value as well. Let's use the first equation to find y when x equals 8:
y=2xEquation 1y=2(8)Substitute 8 for xy=16
Sweet! So the solution to the system of equations is (8,16). It's always a good idea to check the solution back in the original equations just to be sure.
Let's check the first equation:
y=2x16=?2(8)Plug in x = 8 and y = 1616=16Yes!
Let's check the second equation:
x+y=248+16=?24Plug in x = 8 and y = 1624=24Yes!
Great! (8,16) is indeed a solution. We must not have made any mistakes.
Your turn to solve a system of equations using substitution.
Use substitution to solve the following system of equations.
4x+y=28
y=3x
x=
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3/5
  • a simplified improper fraction, like 7/4
  • a mixed number, like 1 3/4
  • an exact decimal, like 0.75
  • a multiple of pi, like 12 pi or 2/3 pi
y=
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3/5
  • a simplified improper fraction, like 7/4
  • a mixed number, like 1 3/4
  • an exact decimal, like 0.75
  • a multiple of pi, like 12 pi or 2/3 pi

Solving for a variable first, then using substitution

Sometimes using substitution is a little bit trickier. Here's another system of equations:
3x+y=9       Equation 1
5x+4y=32       Equation 2
Notice that neither of these equations are already solved for x or y. As a result, the first step is to solve for x or y first. Here's how it goes:
Step 1: Solve one of the equations for one of the variables.
Let's solve the first equation for y:
3x+y=9Equation 13x+y+3x=9+3xAdd 3x to each sidey=9+3x
Step 2: Substitute that equation into the other equation, and solve for x.
5x+4y=32Equation 25x+4(9+3x)=32Substitute -9 + 3x for y5x36+12x=3217x36=3217x=68x=4Divide each side by 17
Step 3: Substitute x=4 into one of the original equations, and solve for y.
3x+y=9The first equation3(4)+y=9Substitute 4 for x12+y=9y=3Add 12 to each side
So our solution is (4,3).

Let's practice!

1) Use substitution to solve the following system of equations.
2x3y=5
y=x1
x=
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3/5
  • a simplified improper fraction, like 7/4
  • a mixed number, like 1 3/4
  • an exact decimal, like 0.75
  • a multiple of pi, like 12 pi or 2/3 pi
y=
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3/5
  • a simplified improper fraction, like 7/4
  • a mixed number, like 1 3/4
  • an exact decimal, like 0.75
  • a multiple of pi, like 12 pi or 2/3 pi

2) Use substitution to solve the following system of equations.
7x2y=13
x2y=11
x=
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3/5
  • a simplified improper fraction, like 7/4
  • a mixed number, like 1 3/4
  • an exact decimal, like 0.75
  • a multiple of pi, like 12 pi or 2/3 pi
y=
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3/5
  • a simplified improper fraction, like 7/4
  • a mixed number, like 1 3/4
  • an exact decimal, like 0.75
  • a multiple of pi, like 12 pi or 2/3 pi

3) Use substitution to solve the following system of equations.
3x4y=2
5=5x+5y
x=
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3/5
  • a simplified improper fraction, like 7/4
  • a mixed number, like 1 3/4
  • an exact decimal, like 0.75
  • a multiple of pi, like 12 pi or 2/3 pi
y=
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3/5
  • a simplified improper fraction, like 7/4
  • a mixed number, like 1 3/4
  • an exact decimal, like 0.75
  • a multiple of pi, like 12 pi or 2/3 pi

Want to join the conversation?

  • mr pants green style avatar for user u
    This article is filled with errors in explanation. It lacks to explain why this is this and why this is here. It can get confusing and half of the time the user is trying to figure out the whole thing by himself and the article just show the answers. If you get a question wrong and hit show solution it doesn't show you explanations that go with the steps.
    (74 votes)
    Default Khan Academy avatar avatar for user
  • aqualine seedling style avatar for user isse_sam000
    When do we need to use this in real life?
    (45 votes)
    Default Khan Academy avatar avatar for user
  • spunky sam blue style avatar for user Streety
    Props to all the homies in the struggle (the comment section) actually asking and answering questions that are relevant to the topic full heartedly. Just a little thank you.
    (51 votes)
    Default Khan Academy avatar avatar for user
  • piceratops sapling style avatar for user michael.blaine
    I'm having trouble understanding this. Can someone clarify this topic for me? Thank you!
    (19 votes)
    Default Khan Academy avatar avatar for user
    • leafers ultimate style avatar for user joshh
      Usually you just need to figure out which would be the easiest of the equations to isolate a variable. Often times there will be one equation that leaves you with a nice expression for a single variable after you rearrange the formula. Other times if you try to rearrange to isolate a certain variable, you will have fractions which can be a pain to deal with.

      For example:

      -3x -4y = 2

      -5 = 5x + 5y

      Just by looking at these, which do you think would be the easier equation to solve for?

      You should be able to tell that the second equation would be much simpler to rearrange to isolate a variable, and in this case, it's nice because we can solve for x or y juist as easily.

      If we were to try to solve for the first equation, we would end up getting a fraction in either case for x or y. You could still solve for both x and y this way, but it would be more difficult to deal with.

      I hope this helps with at least figuring out what to look for!
      (9 votes)
  • male robot donald style avatar for user Nicholas P.
    welp this helped me a little bit
    (20 votes)
    Default Khan Academy avatar avatar for user
  • leafers ultimate style avatar for user Erik Van de Ven
    Thank you so much for this amazing website. I'm Dutch and we don't have 12 grades like the USA. After 6th grade, depending on our "level" we go the some high school which best suits our capabilities I guess you could say. We do some tests at the end of 6th grade and the results, in combination with the school's advice we go to vmbo, havo or vwo (middle, high, preparatory
    scientific).

    I went to middle. I've never been taught such equations, and now I am able to solve them, which are part of the higher degrees of eduction, which is fantastic!
    (16 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user 10017672
    How will this be helpful in real life situations?
    (11 votes)
    Default Khan Academy avatar avatar for user
    • winston baby style avatar for user Jay
      It doesn't necessarily matter whether this will be useful in real life, the main point of doing any type of complicated math is to train your brain to use different ways of thinking to come to solutions. However, if you choose to take jobs in engineering, financial managing, computer programming, etc. you will need to have a good understanding of linear equations. :)
      (15 votes)
  • blobby green style avatar for user gabaikangwe321
    x=y+2,55
    2x=5y

    Substitute please
    (11 votes)
    Default Khan Academy avatar avatar for user
    • duskpin tree style avatar for user abiramirathnav
      x = y + 2.55
      2x = 5y
      By substituting the first equation to the second equation we get:
      2(y+2.55) = 5y
      Now distribute:
      2y + 2.55 = 5y
      Then we combine like terms:
      2.55 = 5y - 2y
      which is 2.55 = 3y.
      We then finally divide 3 and 2.55 to get y.
      2.55/3 = y
      y = 0.85. So y equals 0.85. Now we can find x easily.
      x = 0.85 + 2.55
      x = 3.40
      (3 votes)
  • primosaur sapling style avatar for user sheivakayvan97
    -5=5x+5y when you divide it by 5 I don't understand how the equation then becomes x=-1-y when you are dividing by a positive 5 :(
    (6 votes)
    Default Khan Academy avatar avatar for user
    • leafers ultimate style avatar for user Barbara
      Two things are happening - first, divide by positive 5, then manipulate the equation to get x by itself.
      So take the original equation and divide each term on both sides by positive 5. As long as we divide each term by the same non-zero number, the two sides will remain equal.
          -5 = 5x + 5y
      -1 = x + y

      Now to get x by itself, we can subtract y from both sides.
      -1      = x + y
      -1 - y = x + y - y
      -1 - y = x


      Hope that helps.
      (18 votes)
  • blobby green style avatar for user 10017672
    Is this helpful in real life
    (12 votes)
    Default Khan Academy avatar avatar for user