Sub topic 4
When does a system have one, none, or infinitely many solutions?
This chapter assumes you can solve two equations in two unknowns by substitution or elimination, as in the previous chapter. It also assumes you are comfortable with ratios and with the idea that a linear equation in x and y is a straight line on a graph. Here you learn to decide how many solutions a system has before you solve it. In CAT this decides questions of the form "for what value of k does the system have no solution?".
The three possible outcomes
Take a system of two linear equations:
- a1·x + b1·y = c1
- a2·x + b2·y = c2
Each equation is a straight line. Two lines in a plane can relate in only three ways, so a system has exactly one of three outcomes:
| Lines | Number of solutions | Name |
|---|---|---|
| Cross at a single point | Exactly one | Consistent and independent |
| Parallel, never meet | None | Inconsistent |
| The same line | Infinitely many | Consistent and dependent |
A system with at least one solution is called consistent. A system with no solution is inconsistent. A system never has exactly two or three solutions, because two distinct lines meet at most once.
The ratio test
The slope of the line a·x + b·y = c is −a/b, so the lines have equal slopes when a1/a2 = b1/b2. Comparing three ratios gives the standard test:
| Condition | Result |
|---|---|
| a1/a2 ≠ b1/b2 | One unique solution |
| a1/a2 = b1/b2 ≠ c1/c2 | No solution |
| a1/a2 = b1/b2 = c1/c2 | Infinitely many solutions |
Read the test in two stages. First compare the x and y coefficients. If their ratios differ, the lines have different slopes and must cross, and you are done. If the ratios agree, the lines have the same slope, and only the constants decide whether they are the same line or two separate parallel lines.
Why the ratio test works
Suppose a1/a2 = b1/b2 = m. Then the left side of the first equation is m times the left side of the second. If the constants follow the same rule, c1 = m·c2, the equations say the same thing and every point on the line is a solution. If c1 ≠ m·c2, the same expression would have to equal two different numbers, which is impossible.
For example, take x + y = 2 and 2x + 2y = 4. Doubling the first equation gives the second, so they are the same line. Take x + y = 2 and 2x + 2y = 5 instead. Doubling the first gives 2x + 2y = 4, which contradicts 5, so there is no solution.
The determinant form
Ratios break down when a coefficient is zero, because you would divide by zero. The cross-multiplied form avoids this. Define
det = a1·b2 − a2·b1
The condition a1/a2 = b1/b2 is the same as a1·b2 = a2·b1, which is det = 0. So:
- det ≠ 0 means a unique solution.
- det = 0 means no unique solution, so you must check the constants to separate "none" from "infinite".
When det = 0, the system is dependent exactly when both numerators of the elimination formulas vanish: c1·b2 − c2·b1 = 0 and a1·c2 − a2·c1 = 0. The code below uses this check. It assumes each equation has at least one nonzero coefficient on x or y.
def classify(a1, b1, c1, a2, b2, c2):
"""Classify a1*x + b1*y = c1 and a2*x + b2*y = c2."""
det = a1 * b2 - a2 * b1
if det != 0:
return "unique"
same_line = (c1 * b2 - c2 * b1 == 0) and (a1 * c2 - a2 * c1 == 0)
return "infinite" if same_line else "none"
print(classify(1, 1, 10, 1, -1, 2)) # unique (x = 6, y = 4)
print(classify(1, 1, 2, 2, 2, 4)) # infinite
print(classify(1, 1, 2, 2, 2, 5)) # noneThe output is unique, infinite, none, in that order.
Worked examples with a parameter
CAT questions rarely hand you numbers to classify. They give an unknown k and ask which value produces a given outcome.
Example 1: no solution
For what value of k does 2x + 3y = 7 and 4x + ky = 10 have no solution?
- Compare a1/a2 = 2/4 = 1/2.
- Set b1/b2 = 3/k equal to 1/2. This gives k = 6.
- Check the constants: c1/c2 = 7/10, which is not 1/2.
Since all three ratios are not equal, k = 6 gives no solution. For any k ≠ 6 the system has a unique solution. If the second constant were 14 instead of 10, then c1/c2 = 7/14 = 1/2, and k = 6 would give infinitely many solutions.
Example 2: infinitely many solutions
Find k so that 3x + 4y = 12 and 6x + 8y = k has infinitely many solutions. The ratio a1/a2 = 1/2 already equals b1/b2 = 4/8. For the constants to match, 12/k = 1/2, so k = 24. Any other k gives no solution.
Example 3: a parameter in the coefficients
Classify kx + y = 2 and x + ky = 3 for different k.
- det = k·k − 1·1 = k² − 1.
- The determinant is zero when k = 1 or k = −1. For every other k, the solution is unique.
- At k = 1 the system is x + y = 2 and x + y = 3. The ratios are 1, 1 and 2/3, so there is no solution.
- At k = −1 the system is −x + y = 2 and x − y = 3. The ratios are −1, −1 and 2/3, so there is no solution.
So this system has no value of k that gives infinitely many solutions. Always check each special value separately, because a determinant of zero tells you only that the solution is not unique.
for k in (2, 1, -1):
print(k, classify(k, 1, 2, 1, k, 3))This prints 2 unique, 1 none and -1 none.
Special cases and common errors
- Homogeneous systems. If both constants are zero (a1·x + b1·y = 0 and a2·x + b2·y = 0), the point (0, 0) is always a solution, so "no solution" is impossible. The system has either only the trivial solution (det ≠ 0) or infinitely many (det = 0).
- Missing terms. If an equation has no y term, write b = 0 and use the determinant form. Ratios with a zero denominator are meaningless.
- Skipping the constant check. Many students stop at a1/a2 = b1/b2 and answer "no solution". That is wrong when the constants also match, because then the lines coincide.
- Reducing to a single equation. If one equation is a multiple of the other, you really have one equation in two unknowns, so there are infinitely many real solutions. In a question that restricts x and y to positive integers, the count may be finite, so read the question's wording before answering.
- More than two equations. Solve any two that have a unique solution, then substitute into the third. If it satisfies the third equation, the system is consistent. If not, there is no solution.
Connection to later chapters
The same pattern, a condition on coefficients that separates cases, returns with quadratics, where the discriminant decides whether there are two, one or no real roots. The CAT shortcuts chapter also uses this chapter's test to eliminate answer options quickly.
Exercise
For what value of k does the system 5x + 2y = 9 and 10x + ky = 15 have no solution? Does any value of k give infinitely many solutions?
Show answer
The ratio a1/a2 = 5/10 = 1/2. Setting b1/b2 = 2/k equal to 1/2 gives k = 4. Then c1/c2 = 9/15 = 3/5, which is not 1/2, so k = 4 gives no solution. Because the constants do not match, no value of k gives infinitely many solutions. For every k other than 4 the solution is unique.
Exercise
Classify x + 2y = 3 and 2x + 4y = 6, then change only the constant 6 in the second equation to 7 and classify again. Finally, for what values of m is the system mx + 2y = 3 and 2x + my = 6 not uniquely solvable, and what happens at each?
Show answer
The first system has ratios 1/2, 2/4 and 3/6, which are all equal, so there are infinitely many solutions. With 7 as the constant, the ratio 3/7 differs from 1/2, so there is no solution. For the last part, det = m·m − 2·2 = m² − 4, which is zero at m = 2 and m = −2. At m = 2 the equations are 2x + 2y = 3 and 2x + 2y = 6, which have no solution. At m = −2 the equations are −2x + 2y = 3 and 2x − 2y = 6, whose ratios are −1, −1 and 1/2, so again there is no solution.