Sub topic 7
What a System of Equations Means
Prerequisites and scope
This chapter assumes you can solve a one-variable linear equation and plot points on the coordinate plane. You should also know that a linear equation in two variables, such as 2x + y = 7, has a straight line as its graph. The chapter explains what a system is and what its solution means. The methods for finding solutions (substitution and elimination) come in the next two chapters, so here you only use small systems that can be checked by hand.
What a system is
A system of equations is a set of two or more equations that use the same variables and must all be true at the same time. Consider this system:
- x + y = 7
- x - y = 1
Each equation alone has infinitely many solutions. For x + y = 7, the pairs (0, 7), (1, 6), (3, 4), and (5, 2) all work. For x - y = 1, the pairs (1, 0), (2, 1), (4, 3), and (5, 4) all work. The system asks for the pairs that satisfy both equations at once. Only (4, 3) does: 4 + 3 = 7 and 4 - 3 = 1.
A solution of a system is an ordered pair (or, with more variables, an ordered triple and so on) that makes every equation in the system true. A pair that satisfies only one equation is not a solution of the system.
Testing whether a pair is a solution
The definition gives you a direct test. Substitute the values into every equation. If any equation fails, the pair is not a solution.
def is_solution(x, y, equations):
"""equations is a list of (a, b, c) meaning a*x + b*y = c."""
return all(a * x + b * y == c for a, b, c in equations)
system = [(1, 1, 7), (1, -1, 1)]
print(is_solution(4, 3, system)) # True
print(is_solution(5, 2, system)) # False: 5 + 2 = 7 but 5 - 2 = 3, not 1The pair (5, 2) is a useful example of a common error. It satisfies the first equation, so it looks plausible, but it fails the second. On the GRE, answer choices often include a pair that satisfies only one equation. Checking both equations removes that trap.
The geometric meaning
Each linear equation in two variables graphs as a line. Every point on the line is a solution of that equation. A solution of the system must lie on both lines, so it is a point where the lines meet.
This picture explains the three possible outcomes. Two distinct lines in a plane can relate in exactly three ways.
| Relationship of the lines | Number of solutions | Example |
|---|---|---|
| Cross at one point | Exactly one | x + y = 7 and x - y = 1 |
| Parallel and distinct | None | x + y = 7 and x + y = 9 |
| Identical (same line) | Infinitely many | x + y = 7 and 2x + 2y = 14 |
There is no case with exactly two solutions. Two different lines cannot meet twice, so a linear system never has a finite count other than zero or one. This is a useful fact when a GRE question suggests that a system "has two solutions." For linear equations, that cannot happen.
Telling the three cases apart from the equations
You do not need to draw the lines. Write both equations as a1x + b1y = c1 and a2x + b2y = c2 and compare coefficients.
- If a1/a2 is different from b1/b2, the lines have different slopes and cross once.
- If a1/a2 = b1/b2 but this ratio differs from c1/c2, the lines are parallel and distinct. There is no solution.
- If a1/a2 = b1/b2 = c1/c2, the equations describe the same line. There are infinitely many solutions.
Slopes give the same information. Rewrite each equation as y = mx + b. Different slopes mean one solution. Equal slopes with different intercepts mean none. Equal slopes with equal intercepts mean infinitely many. The chapter on special cases returns to this with worked examples. For now, the point is that the solution count is a property of the pair of lines, not of any one equation.
How many equations do you need?
A useful rule of thumb is to count unknowns and equations. With two unknowns, you generally need two independent equations to pin down one pair. Independent means that neither equation is just a rescaled copy of the other, or a combination of the others.
The word "generally" matters. Two equations with two unknowns can still fail to give a unique solution if they are not independent or if they conflict.
| Equations | Unknowns | What usually happens |
|---|---|---|
| 1 | 2 | Infinitely many solutions (a whole line of them) |
| 2 independent | 2 | One solution |
| 2 dependent | 2 | Infinitely many solutions |
| 2 inconsistent | 2 | No solution |
| 3 | 2 | Often no solution, unless the third line passes through the crossing point |
Having as many equations as unknowns is necessary for a unique solution but is not sufficient. Independence is the second requirement.
A worked example: reading a system from a situation
A parking garage charges a flat fee plus an hourly rate. Parking for 2 hours costs $11, and parking for 5 hours costs $20. Let f be the flat fee and r the hourly rate in dollars.
- Translate each fact into an equation: f + 2r = 11 and f + 5r = 20.
- Each equation is a line in the (r, f) plane. The garage's real prices correspond to the one point on both lines.
- Subtract the first equation from the second: 3r = 9, so r = 3.
- Substitute into the first: f + 6 = 11, so f = 5.
The solution is r = 3 and f = 5. Check it in both equations: 5 + 2(3) = 11 and 5 + 5(3) = 20. Both hold.
The system structure is what makes this problem solvable. Either fact alone is consistent with many fee and rate combinations. The two facts together leave one.
Checking a solution
Always check in every original equation, not in a rearranged version you produced while solving. If you made an error while rearranging, a check against your own rearranged line will not catch it. Checking against the original statement will.
from fractions import Fraction
def solve_2x2(a1, b1, c1, a2, b2, c2):
"""Solve a1*x + b1*y = c1 and a2*x + b2*y = c2 using Cramer's rule."""
det = a1 * b2 - a2 * b1
if det == 0:
return None # no solution or infinitely many solutions
x = Fraction(c1 * b2 - c2 * b1, det)
y = Fraction(a1 * c2 - a2 * c1, det)
return x, y
print(solve_2x2(3, 2, 12, 1, -1, 1)) # (Fraction(14, 5), Fraction(9, 5))
print(solve_2x2(1, 2, 5, 2, 4, 10)) # None: same line
print(solve_2x2(1, 2, 5, 2, 4, 7)) # None: parallel linesThe function returns None when the determinant a1b2 - a2b1 is zero. That is the same condition as a1/a2 = b1/b2 in the coefficient test above, so it covers both the parallel and the identical case. It cannot tell them apart. To distinguish them, compare the constants as described earlier.
Common errors
- Checking only one equation. A pair must satisfy all equations. Test each one.
- Treating the variables as separate puzzles. In a system, x in the first equation and x in the second are the same number. Values found for x must be consistent across equations.
- Assuming equal counts guarantee a unique answer. Two equations and two unknowns can still give none or infinitely many solutions.
- Assuming a solution must be a whole number. The system 3x + 2y = 12 and x - y = 1 has the solution (14/5, 9/5). Do not reject a fraction because the answer "looks wrong."
- Confusing a solution of one equation with the solution of the system. Each line has infinitely many points. Only intersection points count.
Summary of the idea
A system asks for values that satisfy several equations simultaneously. In two variables, that means a point lying on every line involved. The geometry gives three outcomes (one solution, none, or infinitely many), and you can detect which one applies by comparing coefficients or slopes. Every solution you find must be verified against all of the original equations.
Exercise
Consider the system 2x + 3y = 12 and 4x + 6y = 18. Does it have one solution, no solution, or infinitely many? Explain using coefficient ratios, and say what the lines look like.
Show answer
Compare ratios: a1/a2 = 2/4 = 1/2 and b1/b2 = 3/6 = 1/2, so the slopes are equal. The constant ratio is c1/c2 = 12/18 = 2/3, which differs from 1/2. The lines are parallel and distinct, so the system has no solution. As a check, doubling the first equation gives 4x + 6y = 24, which conflicts with 4x + 6y = 18.
Exercise
Is (2, 5) a solution of the system x + y = 7 and 3x - y = 2? Is it a solution of x + y = 7 and 2x + y = 9?
Show answer
For the first system, x + y = 2 + 5 = 7 holds, but 3x - y = 6 - 5 = 1, not 2, so (2, 5) is not a solution. For the second system, x + y = 7 holds and 2x + y = 4 + 5 = 9 holds, so (2, 5) is a solution.