A system of linear equations is two (or more) linear equations that have to be true at the same time. Geometrically, each linear equation in two variables draws a straight line in the $xy$-plane, and the “system” asks where those lines meet. Two non-parallel lines meet at exactly one point, and the coordinates of that point are the solution.
At school you almost always meet these as $2 \times 2$ systems — two equations, two unknowns — and the two methods you are expected to know are substitution and elimination. They give the same answer; the difference is purely how much arithmetic you have to do.
The standard form
Write each equation as
$$ax + by = c.$$
A system is then a pair like
$$\begin{cases} 2x + 3y = 12 \\ x - y = 1. \end{cases}$$
Get into the habit of writing the equations one above the other with the $x$’s above the $x$’s and the $y$’s above the $y$’s. Most arithmetic mistakes in elimination come from misalignment.
Method 1 — substitution
Pick one equation and isolate one variable in terms of the other. From the second equation above, $x = y + 1$. Substitute that into the first:
$$2(y + 1) + 3y = 12 \implies 2y + 2 + 3y = 12 \implies 5y = 10 \implies y = 2.$$
Then back-substitute: $x = y + 1 = 3$. The solution is $(x, y) = (3, 2)$, and you should always check by plugging the pair back into both original equations.
Substitution is the right tool when one of the four coefficients is already $1$ or $-1$, because then isolating a variable is free. If all four coefficients are large, elimination is faster.
Method 2 — elimination
Multiply each equation by whatever constant turns the coefficient of one variable into matching values, then subtract one equation from the other so that variable cancels. Same example:
$$\begin{cases} 2x + 3y = 12 \\ x - y = 1. \end{cases}$$
Multiply the second equation by $2$ to match the $x$ coefficients: $2x - 2y = 2$. Subtract that from the first:
$$(2x + 3y) - (2x - 2y) = 12 - 2 \implies 5y = 10 \implies y = 2.$$
Same answer. Then plug back into either original equation to find $x$.
The two special cases
Not every system has a unique solution. Two cases occasionally come up.
No solution — parallel lines
If the two equations describe parallel lines (same slope, different intercepts), they never meet, and the system has no solution. Algebraically you spot this when you eliminate a variable and end up with a contradiction like $0 = 7$. Example:
$$\begin{cases} x + y = 2 \\ x + y = 5. \end{cases}$$
Subtract the first from the second: $0 = 3$. Nonsense, so no solution.
Infinitely many solutions — the same line written twice
If the two equations are scalar multiples of each other, they describe the same line, and every point on that line is a solution. Algebraically you spot this when elimination collapses to $0 = 0$:
$$\begin{cases} x + y = 2 \\ 2x + 2y = 4 \end{cases} \implies 0 = 0.$$
The solution is the entire line $x + y = 2$, usually written parametrically: $x = t,\; y = 2 - t$ for any real $t$.
The mistakes I see most often
1. Subtracting only part of the second equation
When you write $(2x + 3y) - (2x - 2y)$, the minus sign distributes over both terms in the second bracket. The result is $5y$, not $1y$. Forgetting to flip the sign on the $-2y$ is the single most common arithmetic mistake. Always rewrite the subtraction as “add the negative of everything in the second equation” before you do the arithmetic.
2. Stopping after one variable
Once you have $y = 2$, you are halfway done, not done. Plug back into one of the originals to get $x$. A surprisingly large number of homework answers say “$y = 2$” and stop.
3. Not checking the answer
Plug $(x, y)$ back into both original equations. It takes ten seconds and catches almost every error you could have made.
What to do with $3 \times 3$ systems
The methods extend, but the bookkeeping gets ugly fast. The standard technique is Gaussian elimination: use elimination to remove $x$ from the second and third equations, then $y$ from the third, until you have an upper-triangular system you can solve from the bottom up. By the time you are doing $4 \times 4$ systems by hand, you should be using matrix methods (the calculator above does $2 \times 2$; matrix calculators are a separate piece we have not built yet).
Where this comes up later
Solving systems of linear equations is the central operation in linear algebra, which is the foundation of essentially all of applied mathematics, from economics to neural networks. The mechanics you learn here on $2 \times 2$ systems are the same mechanics that scale up to the millions of equations a real-world solver tackles.
References
- Stewart, J., Redlin, L., Watson, S. Algebra and Trigonometry, Cengage, ch. 5 (Systems of Equations and Inequalities).
- Wikipedia: System of linear equations, Gaussian elimination.
- Khan Academy: Systems of equations.