Solving systems of two linear equations: Three methods

A solution to a system has to make both equations true at the same time. We can find that shared point by substituting, eliminating a variable, or graphing. We’ll use one example for each method.

Recognize a linear system in two unknowns

A linear equation in two variables has the form ax+by=c, with constant coefficients and at least one of a or b nonzero. Terms involving x2, xy, or x are not linear. For two such equations, a solution is an ordered pair (x,y) that satisfies both.

Two lines can cross at one point, be distinct and parallel with no solution, or coincide with infinitely many solutions. Each example below has one intersection.

Substitution: Replace one variable with an expression

y=x+32x-3y=10

The first equation already gives y in terms of x. Substitute the entire expression x+3 for y in the second equation, then distribute and combine like terms.

2x-3(x+3)=102x-3x-9=10-x=19x=-19

Now use the first equation to find y=-19+3=-16. The solution is (-19,-16). In the second equation, 2(-19)-3(-16)=-38+48=10, so the pair satisfies both equations.

Elimination: Make one pair of terms cancel

y=3x-4-x+2y=12

Rearrange the first equation as -3x+y=-4, then multiply it by 2 so both equations have a 2y term.

-6x+2y=-8

Subtract the second equation from this new equation. Subtract both sides of the second equation, so the two y-terms cancel.

(-6x+2y)-(-x+2y)=-8-12-5x=-20x=4

Then y=3(4)-4=8. The solution is (4,8), and checking the other equation gives -4+2(8)=12.

Graphing: Find where the two lines cross

x+3y=122x-y=5

Solve each equation for y. The first line has slope negative one third and y-intercept 4. The second has slope 2 and y-intercept negative 5.

y=-13x+4y=2x-5
Two lines intersect at approximately three point eight six, two point seven oneThe blue line falls from the y intercept four. The purple line rises from the y intercept negative five. Their intersection is twenty-seven sevenths, nineteen sevenths; its rounded label is placed above the crossing with a leader.0123456−505(3.86, 2.71)xyy = −x/3 + 4y = 2x − 5
Graphing shows the intersection; algebra gives its exact coordinates.

The plotted crossing is approximately (3.86, 2.71). To find the exact values, set the two expressions for y equal.

-13x+4=2x-59=73xx=277y=2(277)-5=197

The exact solution is (277,197). Substituting into the first equation gives 277+3(197)=12, and the second gives 2(277)-197=5.