- Education and Science»
How to Solve Linear Equations with 2 Variables
Solving for two variables given two equations
This is a high school level algebra problem and usually appears in the form;
Solve for both X and Y
Now the trick to this problem is two realize that you can only solve an equation one variable at a time and so we have to find away to express one of these equations using only a single variable, either Y or X, it doesn't matter. Let's say we decide to express the second equation so that it only has X variables (we could have started with the other equation or chosen Y, so there are actually four different path you could take to solve this problem) We want to express the second equation only in terms of X so we have to figure out what expression in terms of X is equal to Y, to do this we'll manipulate the first equation.
We have to get Y alone so,
2X+Y=8, subtract 2X from both sides
Now we know what Y equals in terms of X, so we go back to our first equation, where we are trying to express the whole equation only in terms of X, we replace Y with -2X+8 because we have determined this to be equal to Y
So it just gets inserted where X was, and we solve for Y
3X+2(-2X+8)=12, distribute the 2 into the binomial (-2X+8)
3X+-4X+16=12, Combine like terms and subtract 16 from both sides
-X=-4, multiply both sides by -1
Now that we have a concrete value for X, we simply plug that value back into either equation to solve for Y, so
So, X=4 and Y=0
To check our work we simply plug both values back into each equation to make sure it works
2X+Y=8, plug in 4 for X and 0 for Y
8=8, so that one checks out, just to be sure we'll do the same with the other equation
3X+2Y=12, so plug in 4 for X and 0 for Y
12=12, so that checks out also and verifies that our values X=4 and Y=0 are correct
This example illustrates the basic concept with very simple algebra, if the equation become more complex, the basic idea remains the same (Express one equation in terms of only one variable by solving the other equation for Y or X and plugging that back into the first equation. If we solve for Y then we'll be expressing the first equation with all X's making it solvable, or if we solve for X then we'll be expressing the first equation with all Y's making it solvable.
Go ahead and try it by solving 3X+2Y=12 for X or Y,(in other words get either X or Y alone) and then plugging that value into 2X+Y=8, if you do it right you'll get the same answer with all four possible approaches. This concept remains the same with more advanced algebra. The only difference is that the manipulation of the equations will become more complex and require you to remember all those rules for playing with algebraic equations.
If those is unclear feel free to post a comment and I'll try to help.