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
Current time:0:00Total duration:4:39

Video transcript

use substitution to solve for x and y and we have a system of equations here the first equation is 2 y is equal to X plus 7 and the second equation here is X is equal to y minus 4 so what we want to do when they say substitution what we want to do is substitute one of the variables with an expression so that we have an equation and only one variable and we can solve for it let me let me show you what I'm talking about let me rewrite this first equation 2y is equal to X plus 7 and we have the second equation over here that X is equal to Y minus 4 so if we're looking for an x and a y that satisfies both constraints what we could say is well look if the x and y's have to satisfy both constraints both of these constraints have to be true so X must be equal to Y minus 4 so anywhere in this top equation where we see an X anywhere we see an X we say well look that X by the second constraint has to be equal to Y minus 4 so everywhere where we see it X we can substitute it with a Y minus 4 so let's do that so if we substitute y minus 4 for X in this top equation the top equation becomes 2y is equal to instead of an X the second constraint set tells us that X needs to be equal to Y minus 4 so instead of an X we'll write a Y minus 4 and then we have a plus 7 we have a plus 7 all I did here is I substituted all I did is I substituted Y minus 4 for X the second constraint tells us that we need to do it y minus 4 needs to be equal to X or X needs to be equal to Y minus 4 the value here is now we have an equation one equation with one variable we can just solve for y so we get 2y is equal to Y and then we have minus 4 plus 7 so Y plus 3 we can subtract Y from both sides can subtract Y from both sides of this equation the left-hand side 2y minus y is just Y Y is equal to these cancel out Y is equal to 3 and then we could go back and substitute into either of these equations to solve for X this is easier right over here let's substitute right over here X needs to be equal to y minus 4 so we could say that X we could say that X is equal to 3 minus 4 3 minus 4 which is equal to negative 1 so a solution the solution to this system is X is equal to negative 1 and Y is equal to 3 and you can verify that it works in this top equation right over here 2 times 3 is 6 which is indeed equal to negative 1 plus 7 now I want to show you that over here we substituted we had an expression that was or we had an equation that explicitly solved for X so we were able to substitute the X is what I want to show you is we could have done it the other way around we could have solved for y and then substitute it for the Y's so let's do that and we could have substituted from one constraint into the other constraint or vice versa either way we would have gotten the same exact answer so instead of saying X is equal to Y minus 4 in that second equation if we add 4 to both sides of this equation we get X we get X plus 4 is equal to Y this and this is the exact same constraint I just added 4 to both sides of this to get this constraint over here and now since we've solved this equation explicitly for y we can use the first constraint the first equation and everywhere where we see a Y we can substitute it with X plus 4 so it's 2 times instead of 2 times y we can write 2 times X plus 4 2 times X plus 4 is equal to X plus 7 we can distribute this 2 so it gets 2x Plus 8 is equal to X plus 7 we can subtract X from both sides of this equation and then we can subtract 8 from both sides of this equation subtract 8 the left-hand side these that cancels out we're just left with an X on the right-hand side that cancels out and we are left with a negative 1 then we can substitute back over here we have Y is equal to X plus 4 or so Y is equal to negative 1 plus 4 which is equal to three so once again we got the same answer even though this time we substitute it for y instead of substituting for X hopefully you found that interesting