How to Solve a System of Equations

Learn substitution, elimination and matrix methods for solving linear systems, with a worked two-variable example.

A system of linear equations asks for values that make every equation true at the same time. Common methods are graphing, substitution, elimination and row reduction.

Substitution

Solve one equation for one variable, substitute that expression into the other equation, then back-substitute.

Elimination

Add or subtract multiples of the equations so one variable cancels. This is often the quickest hand method for a 2×2 system.

Worked example

For 2x + y = 5 and x − y = 1, add the equations to get 3x = 6, so x = 2. Substitute into x − y = 1 to get y = 1.

Matrix method

Write the coefficients and constants as an augmented matrix, then use row operations. This generalizes cleanly to three or more variables.