How to solve systems of equations: substitution, elimination, and graphing

A solution to a system has to satisfy both equations at the same time. Substitution, elimination, and graphing give us three common ways to find that shared solution. Let’s choose a method from the way the equations are written and then check the result.

Choose a method from the equations

Substitution is a natural choice when one variable is already isolated. Elimination is useful when multiplying or combining the equations can cancel a variable. Graphing shows the solution as the intersection of the two lines.

Example: Solve by substitution

x=y+23y-2x=15

The first equation already gives x in terms of y. Substitute y+2 for x in the second equation, then solve for y.

3y-2(y+2)=153y-2y-4=15y-4=15y=19

Put y=19 into x=y+2 to get x=21. The solution (21,19) checks in both equations: 21=19+2 and 3(19)-2(21)=15.

Example: Solve by elimination

x+3y=122x-y=5

Multiply the first equation by -2, then add the equations. The x terms cancel.

-2x-6y=-242x-y=5-7y=-19y=197

Substitute that value into the first equation to find x.

x+3(197)=12x=847-577=277

The solution is (277,197). We could also multiply the second equation by 3 and add, which would cancel y instead. The choice changes the arithmetic, not the solution.

Solve the same system by graphing

Write the two equations in slope-intercept form.

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

The first line starts at the y-intercept 4 and falls one unit for every three units to the right. The second starts at -5 and rises two units for every unit to the right.

Two lines cross at the exact solution of the systemThe blue line decreases from its y-intercept four. The purple line rises from its y-intercept negative five. Their intersection is twenty-seven sevenths, nineteen sevenths.123456−550xy(27/7, 19/7)y = −x/3 + 4y = 2x − 5
The intersection satisfies both equations. Elimination gives its exact coordinates.

The graph shows an intersection near (3.86,2.71). Elimination gives the exact coordinates (277,197). Substituting them into both original equations gives 12 in the first and 5 in the second, which confirms the shared solution.

When two lines are parallel and distinct, the system has no solution. When they are the same line, every point on that line satisfies both equations, giving infinitely many solutions.