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: -3x-4y=-2 & y=2x-5

Learn to solve the system of equations -3x - 4y = -2 and y = 2x - 5 using substitution. Created by Sal Khan.

Want to join the conversation?

  • duskpin seedling style avatar for user Micah Kendall
    why would we be shown up by talking birds? please help!
    (59 votes)
    Default Khan Academy avatar avatar for user
  • leafers seed style avatar for user MicaiahTheGOAT
    i get how to solve for y but how do you solve for x
    (11 votes)
    Default Khan Academy avatar avatar for user
  • aqualine ultimate style avatar for user kristina.arizini
    Every time there is a video about systems of equations with substitution there is always 2 equations. Could you find the values of x and y (if you had 2 unknown variables) with only one equation?
    (17 votes)
    Default Khan Academy avatar avatar for user
    • stelly blue style avatar for user Kim Seidel
      If you have one equation with 2 variables (or a linear equation like 2x + 5y = 20), there are an infinite set of solutions. This type of equation creates a line where each point on the line represents an (x, y) ordered pair that is a solution to the equation.

      When you have 2 equations with the same 2 variables, then you have a system of linear equations. The solution to the system is the point (or points) that the 2 linear equations have in common.

      Hope this helps.
      (3 votes)
  • female robot amelia style avatar for user BrainFog
    I am experiencing brain fog. I have a test tmrw. Any advice??
    (6 votes)
    Default Khan Academy avatar avatar for user
  • winston baby style avatar for user MJT
    …. um..…. question mark?
    (8 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Jonlaverdure5
    what is y=4x-3 and y=-3x-3? please explain the answer
    2x-8=y and 3x-2y=0
    y=x+6 and y=2x-7
    2x-y=3 and y=x+4?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • male robot hal style avatar for user Plotinus
      For the first one, y = 4x -3 and y = 3x -3, you can substitute "-3x-3" in for y. Now you have:

      -3x-3 = 4x - 3

      Move the x's to one side and the numbers to the other to get:
      7x = 0. So, x is 0.

      Plug that back in and you find that y = -3.

      use the same principle for the others
      (17 votes)
  • hopper happy style avatar for user RylieM
    what is 2x=16-8y but you have to substitute x+4y=25 how would you do this
    (5 votes)
    Default Khan Academy avatar avatar for user
    • mr pink green style avatar for user David Severin
      To substitute, you have two choices to isolate variables, in both equations, solving for x is the easiest. In the first equation, you could divide by 2 to get x=8-4y. If you have 8-4y+4y=25, you end up with 8=25, so there is no solution (lines parallel).
      If you subtract 4y in second equation, you get x=25-4y and substituting in first gives 2(25-4y)=16-8y, distribute to get 50-8y=16-8y, so when you add 8y to both sides, 50=16 which also gives no solution.
      This can be seen by getting both in slope intercept form:
      y=-1/4 x + 2 and y=-1/4 x + 25/4, both have same slope and different intercepts.
      (7 votes)
  • piceratops seedling style avatar for user Reuben Rummery
    What do you do if there is a third variable and you have to solve for it?
    I'm particularly having trouble with this equation with finding 'm'.

    3x + my = 5
    (m+2)x + 5y = m

    In addition i have to find 'm' when there are infinite solutions and no solution.

    sorry for the long question but i'm just not understanding this, would mean a lot if someone helped me out here.
    (4 votes)
    Default Khan Academy avatar avatar for user
    • cacteye blue style avatar for user Jerry Nilsson
      3𝑥 + 𝑚𝑦 = 5 ⇒ 𝑦 = −(3∕𝑚)𝑥 + 5∕𝑚

      (𝑚 + 2)𝑥 + 5𝑦 = 𝑚 ⇒ 𝑦 = −((𝑚 + 2)∕5)𝑥 + 𝑚∕5

      Viewing 𝑚 as a constant, each of the two equations describe a straight line.

      For the system to have infinitely many solutions, both lines must have the same slope AND the same 𝑦-intercept.

      For the system to have no solutions, the two lines must have the same slope, but different 𝑦-intercepts.

      So, first of all we want to know when the two lines have the same slope, which means we want to solve the equation
      −3∕𝑚 = −(𝑚 + 2)∕5

      Multiplying both sides by (−5𝑚) we get
      15 = 𝑚(𝑚 + 2)

      Distributing the 𝑚 and subtracting 15 from both sides we get
      𝑚² + 2𝑚 − 15 = 0, which has the two solutions
      𝑚 = −5, 𝑚 = 3

      Next, we want to know when the 𝑦-intercepts are equal:
      5∕𝑚 = 𝑚∕5

      Multiplying both sides by 5𝑚 we get
      𝑚² = 25 ⇒ 𝑚 = ±5

      So, if the system has infinitely many solutions, then 𝑚 = −5,
      and if the system doesn't have any solutions, then 𝑚 = 3
      (6 votes)
  • aqualine sapling style avatar for user MJ Johnson
    What would 250m = pc be? (p and c are both variables)
    (6 votes)
    Default Khan Academy avatar avatar for user
  • leafers tree style avatar for user Leafers
    what about something like this:


    I need to find what x and what y is. I am stuck. Can anyone explain how to do these problems please?
    (4 votes)
    Default Khan Academy avatar avatar for user
    • boggle blue style avatar for user Yagnesh Peddatimmareddy
      43x+6y+−6y=87+−6y(Add -6y to both sides)
      43x/43 = -6y+87/43
      x=-6/43y + 87/43

      Subsitute -6/43y + 87/43 for x in 20x-2y=74
      -206/43 y+1740/43 = 74 ( simplify both sides of the equation)
      -206/43 y +1740/43 + -1740/43 =74=-1740/43 (add(-1740)/43 to both sides)
      -206/43 y = 1442/43 ( divide both sides)
      x=-6/43 y+87/43
      x=-6/43(-7)+87/43 ( simplify)
      x=3 and y=-7
      (5 votes)

Video transcript

So that it's less likely that we get shown up by talking birds in the future, we've set a little bit of exercise for solving systems of equations with substitution. And so this is the first exercise or the first problem that they give us. -3x-4y=-2 and y=2x-5 So let me get out my little scratch pad and let me rewrite the problem. So this is -3x-4y=-2 and then they tell us y=2x-5. So, what's neat about this is that they've already solved the second equation. They've already made it explicitly solved for y which makes it very easy to substitute for. We can take this constraint, the constraint on y in terms of x and substitute it for y in this first blue equation and then solve for x. So let's try it out. So this first blue equation would then become -3x-4 but instead of putting a y there the second constraint tells us that y needs to be equal to 2x-5. So it's 4(2x-5) and all of that is going to be equal to -2. So now we get just one equation with one unknown. and now we just have to solve for x. So, let's see if we can do that. So, it's -3x and then this part right over here we have a -4, be careful, we have a -4 we want to distribute. We are going to multiply -4*2x which is -8x and -4*-5 is positive 20 and thats going to equal -2. And now we can combine all the x terms so -3x-8x, that's going to be -11x and then we have -11x+20=-2. Now to solve for x, we'll subtract 20 from both sides to get rid of the 20 on the left hand side. On the left hand side, we're just left with the -11x and then on the right hand side we are left with -22. Now we can divide both sides by -11. And we are left with x is equal to 22 divided by 11 is 2, and the negatives cancel out. x = 2. So we are not quite done yet. We've done, I guess you can say the hard part, we have solved for x but now we have to solve for y. We could take this x value to either one of these equations and solve for y. But this second one has already explicitly solved for y so let's use that one, so it says y = 2 times and instead of x, we now know that the x value where these two intersect, you could view it that way is going to be equal to 2, so 2 * 2 - 5 let's figure out the corresponding y value. So you get y=2(2)-5 and y = 4 - 5 so y = -1. And you can verify that it'll work in this top equation If y = -1 and x=2, this top equation becomes -3(2) which is -6-4(-1) which would be plus 4. And -6+4 is indeed -2. So it satisfies both of these equations and now we can type it in to verify that we got it right, although, we know that we did, so x=2 and y=-1. So, let's type it in... x=2 and y=-1. Excellent, now we're much less likely to be embarassed by talking birds.