Sub topic 4
When does a system have one, none, or infinitely many solutions?
Assume you can expand brackets, rearrange linear expressions, and work with fractions. A system of linear equations is a set of equations that must be true at the same time. Here, we study two equations in two variables:
\[ a1x+b1y=c_1 \]
\[ a2x+b2y=c_2 \]
A solution is an ordered pair \((x,y)\) that satisfies both equations.
The three possibilities
Each linear equation represents a straight line on a graph.
- Lines that cross once give one solution.
- Parallel, different lines give no solution.
- The same line gives infinitely many solutions.
The quickest algebraic test uses the determinant:
\[ D=a1b2-a2b1 \]
| Condition | Meaning | Number of solutions |
|---|---|---|
| \(D\ne0\) | The lines have different slopes | One |
| \(D=0\), but the equations are not fully proportional | Parallel different lines | None |
| All parts of one equation are proportional to the other | The same line | Infinitely many |
When \(D=0\), compare the complete rows:
\[ (a1,b1,c1)\quad\text{and}\quad(a2,b2,c2) \]
If the coefficients are proportional but the constants are not, there is no solution. If the coefficients and constants are all proportional, there are infinitely many solutions.
Worked examples
One solution
Consider:
\[ x+y=10 \]
\[ x-y=2 \]
Here, \(a1=1,b1=1,a2=1,b2=-1\).
\[ D=(1)(-1)-(1)(1)=-2 \]
Since \(D\ne0\), there is exactly one solution. Adding the equations gives \(2x=12\), so \(x=6\). Substitution gives \(y=4\).
No solution
Consider:
\[ 2x+3y=7 \]
\[ 4x+6y=20 \]
The left side of the second equation is twice the left side of the first, but \(20\ne2(7)\). The equations require the same expression to equal both \(14\) and \(20\). Therefore, no solution exists.
Infinitely many solutions
Consider:
\[ 2x+3y=7 \]
\[ 4x+6y=14 \]
The second equation is exactly twice the first. It adds no new information. Every point on the first line satisfies both equations, so infinitely many solutions exist.
def solve_2x2(a1, b1, c1, a2, b2, c2):
det = a1 * b2 - a2 * b1
if det == 0:
return None
x = (c1 * b2 - c2 * b1) / det
y = (a1 * c2 - a2 * c1) / det
return x, y
print(solve_2x2(1, 1, 10, 1, -1, 2))This prints (6.0, 4.0). A None result means there is no unique solution. You must then compare the constants to distinguish no solution from infinitely many solutions.
Exercise
Classify the system \(3x-2y=5\) and \(6x-4y=10\).
Show answer
Infinitely many solutions, because the second equation is twice the first.