# Solving linear systems by substitution | Algebra Basics | Khan Academy

In the last video, we saw what
a system of equations is. And in this video, I’m going
to show you one algebraic technique for solving systems of
equations, where you don’t have to graph the two lines and
try to figure out exactly where they intersect. This will give you an exact
algebraic answer. And in future videos,
we’ll see more methods of doing this. So let’s say you had
two equations. One is x plus 2y is equal to 9,
and the other equation is 3x plus 5y is equal to 20. Now, if we did what we did in
the last video, we could graph each of these. These are lines. You could put them in either
slope-intercept form or point-slope form. They’re in standard
form right now. And then you could graph each
of these lines, figure out where they intersect, and that
would be a solution to that. But it’s sometimes hard to
find, to just by looking, figure out exactly where
they intersect. So let’s figure out a way to
algebraically do this. And what I’m going to do is
the substitution method. I’m going to use one of the
equations to solve for one of the variables, and then I’m
going to substitute back in for that variable over here. So let me show you what
I’m talking about. So let me solve for x using
this top equation. So the top equation says x
plus 2y is equal to 9. I want to solve for x, so let’s
subtract 2y from both sides of this equation. So I’m left with x is
equal to 9 minus 2y. This is what this first equation
is telling me. I just rearranged
it a little bit. The first equation
is saying that. So in order to satisfy both of
these equations, x has to satisfy this constraint
right here. So I can substitute this
back in for x. We’re saying, this top equation
says, x has to be equal to this. Well, if x has to be equal
to that, let’s substitute this in for x. So this second equation
will become 3 times x. And instead of an x, I’ll write
this thing, 9 minus 2y. 3 times 9 minus 2y, plus
5y is equal to 20. That’s why it’s called the
substitution method. I just substituted for x. And the reason why that’s
useful is now I have one equation with one unknown,
and I can solve for y. So let’s do that 3 times 9 is 27. 3 times negative 2 is negative
6y, plus 5y is equal to 20. Add the negative 6y plus the 5y,
add those two terms. You have 27– let’s see, this will
be– minus y is equal to 20. Let’s subtract 27
from both sides. And you get– let me
write it out here. So let’s subtract 27
from both sides. The left-hand side, the 27’s
cancel each other out. And you’re left with negative y
is equal to 20 minus 27, is negative 7. And then we can multiply both
sides of this equation by negative 1, and we get
y is equal to 7. So we found the y value of the
point of intersection of these two lines. y is equal to 7. Let me write over here, so I
don’t have to keep scrolling down and back up.
y is equal to 7. Well, if we know y, we can
now solve for x. x is equal to 9 minus 2y. So let’s do that. x is equal to 9 minus 2
times y, 2 times 7. Or x is equal to 9 minus 14, or
x is equal to negative 5. So we’ve just, using
substitution, we’ve been able to find a pair of x
and y points that satisfy these equations. The point x is equal to negative
5, y is equal to 7, satisfy both of these. And you can try it out. Negative 5 plus 2 times 7,
that’s negative 5 plus 14, that is indeed 9. You do this equation. 3 times negative 5 is negative
15, plus 5 times y, plus 5 times 7. So negative 15 plus
35 is indeed 20. So this satisfies
both equations. If you were to graph both of
these equations, they would intersect at the point
negative 5 comma 7. Now let’s use our newly
found skill to do an actual word problem. Let’s say that they tell
us that the sum of two numbers is 70. And they differ– or maybe we
could say their difference– they differ by 11. What are the numbers? So let’s do this word problem. So let’s define some
variables. Let’s let x be the larger
number, and let y be the smaller number. I’m just arbitrarily creating
these variables. One of them is larger
than the other. They differ by 11. Now, this first statement, the
sum of the two numbers is 70. That tells us that x plus
y must be equal to 70. That second statement, that
they differ by 11. That means the larger number
minus the smaller number must be 11. That tells us that x minus
y must be equal to 11. So there we have it. We have two equations
and two unknowns. We have a system of
two equations. We can now solve it using
the substitution method. So let’s solve for x on this
equation right here. So if you add y to both
sides of this equation, what do you get? On the left-hand side, you just
get an x, because these cancel out. And then on the right-hand side,
you get x is equal to 11 plus y, or y plus 11. So we get x is equal
to 11 plus y using the second equation. And then we can substitute it
back into this top equation. So instead of writing x plus
y is equal to 70, we can substitute this in for x. We’ve already used the second
equation, the magenta one, now we have to use the
top constraint. So if we substitute this in, we
get y plus 11– remember, this is what x was, we’re
substituting that in for x– plus y is equal to 70. This is x. And that constraint was given to
us by this second equation, or by this second statement. I just substituted this x with
y plus 11, and I was able to do that because that’s the
constraint the second equation gave us. So now let’s just solve for y. We get y plus 11, plus
y is equal to 70. That’s 2y plus 11
is equal to 70. And then if we subtract 11 from
both sides, we get 2y is equal to– what is that? 59? You subtract 10 from
70, you get 60, so it’s going to be 59. So y is equal to 59 over 2. Or another way to write it,
you could write that as 59 over 2 is the same thing as–
let’s see– 25– 29.5. y is equal to 29.5. Now, what is x going
to be equal to? Well, we already figured out
x is equal to y plus 11. So x is going to be equal to
29.5– that’s what y is, we just figured that out– plus 11,
which is equal to– so you add 10, you get 39.5. You add another 1,
you get 40.5. And we’re done. If you wanted to find the
intersection of these two lines, it would intersect at
the point 40.5 comma 29.5. And you could have used this
equation to solve for x and then substituted in this one. You could have used this
equation to solve for y and then substituted in this one. You could use this equation
to solve for y and then substitute into that equation. The important thing is, is
you use both constraints. Now let’s just verify that
this actually works out. What’s the sum of these
two numbers? 40.5 plus 29.5, that
indeed is 70. And the difference between
the two is indeed 11. They’re exactly 11 apart. Anyway, hopefully you
found that useful.

## 72 Replies to “Solving linear systems by substitution | Algebra Basics | Khan Academy”

1. Josh75257 says:

I have a review packet in 8th grade for things from 7th grade, but some are new that we’ve never done before, and some are too complicated to remember over summer, so this is a lifesaver

2. VINITHA S says:

3. kristel styles says:

Thanks for this video💖😊

4. Randomly thing Likes holy cats says:

I love u

5. Peach Cobbler says:

What if the given is in y form?

6. Nicholas Gallas says:

What do u do when it is like 4x or 18x

7. CapG_kule_22 says:

This video was very very helpful, Thanks Khan

Thanks best explanation

9. jumpman370 says:

i have a grade 10 math test and don't know what to do
"pray for me"

10. rosslahive says:

Not just useful but entertaining.

11. Maffy Tan says:

I dont get it, from y= -7 turned into y= 7????? How????

12. Aishwarya Jangir says:

What if equations doesn't have a constant term means it is something like this :
A+2b=0,3a+b=0..
Can substitution occur here because I'm getting 0 value for both variables

13. aphrodite the shifter says:

I get how to do this, but my math teacher wants our systems to be in y= format instead of x=. She explained it on the board but she just acted like everybody knew how to do it and didn’t go into detail. Help??

14. RusselPH says:

thankss!!

15. sheily says:

thanks

16. Louise Ahazia says:

You can learn anything🙍🏾😬

17. H P says:

Great explanation! I'm glad I was able to find this video.

18. Samantha Santoso says:

I DONT GET IT

19. Amy Duenas says:

Who else thinks he sounds like @Marksman

20. Rivaan tyc says:

the "sum of 2 numbers is 70, and they differ by 11" problem can simply be solved by a single equation with a single variable like this:

x+x+11=70
2x+11=70, subtract 11 from both sides,
-11=-11
2x=59
x=29.5

the smaller number is 29.5, the larger one is 29.5 +11= 40.5. Done.

Not saying you video is bad, or anything, on the contrary, khan academy is really good, and you explain these things really good as well. Just saying that you could have used an equation that didn't already have a specific way of solving.

THANK YOU I LOVE YOU

I don't know if the people from khan academy know that they are actual gods that have saved so many of us. From the bottom of my heart, thank you.

23. A says:

I slacked off on a project and I dint get this so thanks I’m not gonna get an F now

24. Drew Shaw says:

great way to help explain math to people who struggle in the classroom and struggle to understand it

25. Battle_Bro says:

Bruh this better than my teacher

26. Sarah Osborn says:

27. LuidNathan says:

Thank you Khan Academy, you are the reason math is very easy.

28. Mn Fin says:

x + y = 6
x – y = 2
??? 🙁

29. AlecxeSL Films says:

Teacher khan, how do we graph??? XD!!!

30. Justin PH says:

I have a question, what do you do after you multiply the substituted numbers and then one variable-say like Y- has no other numbers, i mean you have 1 Y with numbers and then you have 1 Y that doesn't have a number…

31. Justin PH says:

What's the answer for this equation, i might need help hehehe

3x + 5y = 13
2x + y = 4

32. Dorothy Malo says:

Who is here cause they dont understand their math teacher? Thumbs up if you do!

33. Vortex says:

the traditional school system is soo old and makes things so hard, and the teachers only explain once and expect us to know everything, but every student has different needs

34. Jasper Quah says:

I don’t pay attemtion in class so this is Super helpful thx

35. Zan says:

apparently a logitech mic and 30fps is how i get through math

36. Banjo & Kazooie says:

My teacher Mr.Richards recommended me here, because I had a F, but he knew I was trying. This helped mate! (There is multiple Richard's in the world so I didn't censor it)

37. Nathaniel Manoj says:

Thank you do much, I didn't understand my math teacher but this helped a lot

38. sam brown says:

i want to cry

39. Mariah Noemi says:

I still don’t understand I’m really that dumb huh…

40. Alexis Mentzer says:

Thank you Khan Academy, you have helped me so much

41. Damonte Moten says:

His work was neat

42. Tejass Raveendran says:

I got a 91 in my Math Exam with he help of this video, thank you!

43. EZthe Legendary says:

i hope this guy goes straight to heaven. he helped me through middle school school and still helping me in high school. thank you khan

44. 88smileandnod says:

thank you for helping me understand!

45. dreaming meming says:

i have a test on all of the systems this morning. i’m at. 57%. wish me luck.

46. Cole Parker says:

why did you multiply by -1 at the end of the question

47. riyaan hussain says:

48. sagar Balhra says:

am sorry sir but apki language smj nahi aaarhi

49. Spencer Cavan says:

how do you know when you can multiply by -1 to make the 7 positive, would -7 be wrong?

50. Nene Coulibaly says:

Sal Khan is a good man. Thank God for Khan Academy.

51. jessie mayfield says:

At 3:18 where did the 11y go? Like he just skipped it I'm confused

52. Mariana No Swiping says:

AnD I still don’t understand

53. Emmanuel paloyo says:

Helped me a lot thank you very much

I was sleeping when my maths teacher was teaching this so thank you lmao

2:53 why is it negative 27

56. Camilly de Jesus says:

Wahh i dont urderatand english very much, but it went the thing more perfect that i have already seen♡

57. Boi Slaya says:

Soooooo khan for president or what? I never have wanted to thank someone more, Thank you!

58. Q QLOKE says:

For real though, without Khan Academy I would have failed Math last year and I wouldn't have been in grade 7. Khan Academy's short videos explains better than 45 minutes of Math class everyday. Thank you Khan Academy! <3

59. maria teresa herrera says:

thank you for helping me to solve my pbl…..

60. Brooke Bobbitt says:

Oh thank god I found this, I have a test tomorrow and I was full on panicking but now I understand how it works!!

61. BDA CROC says:

Ok but this much work is two minutes problems a page and I have to do like 10 problems a night meaning what 3 papers a night?

62. SPONGE TENTACION says:

Sir you forgot to add negative on y=-7
3:29

63. Mercedes L. Wright says:

At 3:14 when you gave negative y and add 1 to each side. He put positive 1s on each side . Wouldn't it be negative 1 since the y is negative

64. Avril Kawaii says:

65. Logan Shiraga says:

Thank you! I have a 83 % in my Honors math class which is a B- so I really needed this!😁

66. Greil Sutcliff says:

Thanks man!!

67. Ben Sherman says:

I have these two equations:

3x + 9y = -12

12x – 6y = 18

When I follow the method in this video, I get y = 0.714. However, upon checking the correct coordinates, x = 0.714!

I cannot understand why this is happening and where I'm going wrong! Can anyone help?

68. WitlessMean says:

so how does -6y + 5y just become -y ????

69. Vinny Games says:

i am going to smash my head into the nearest wall

70. Max de leon says:

If this is Algebra Basic..Then how hard would it be when it comes to Algebra Advance?!!

71. Kaahi Jamaal says:

Best teacher ever

72. Ian Broshar says:

Why can’t teachers just do this

73. Anthony Animates says:

why arent you my math teacher