A7 · Lesson 8 · Elimination
Solving by elimination, and when a circuit has no answer
Connect a 5 V battery and a 6 V battery directly in parallel, ideal ones with no internal resistance, and ask a circuit simulator for the voltage. It refuses: "singular matrix". The equations contradict each other, and no voltage can satisfy both. Elimination, the standard way to solve linear systems, discovers exactly that kind of contradiction on its way to the answer.
Play
- The lines are and . Where they cross is the solution.
- Make . What happens to the lines? Now also make .
- Watch the number in the strip as the lines turn parallel. It's the determinant of the system, the subject of the next lesson.
Predict
Elimination on and subtracts twice the first equation from the second. What's left?
: a contradiction, so there is no solution. The second equation's left side is exactly twice the first's, but its right side isn't twice 3. The two lines are parallel and never meet. If the right side had been 6, elimination would leave : the same line twice, and infinitely many solutions.
Name it
Gaussian elimination
Write the system as an augmented matrix, the coefficients with the right-hand side alongside, and use the first equation to clear from those below it, then the second to clear , and so on:
Each step subtracts a multiple of one row from another: here row 2 minus 2 × row 1, row 3 plus row 1, then row 3 plus row 2. The result is upper triangular, and back substitution finishes it from the bottom: , then gives , then gives .
The diagonal numbers you divide by, here 2, −8 and 1, are the pivots. Things go wrong when a pivot is zero and can't be fixed by swapping rows:
- A row becomes (nonzero): no solution. The equations contradict each other.
- A row becomes : infinitely many solutions. One equation added nothing new, so one unknown is free.
In circuits both have a physical meaning:
- No solution: two ideal voltage sources in parallel that disagree, or ideal current sources in series that disagree. Real sources have internal resistance, which removes the contradiction.
- Infinitely many: part of the circuit floats, with no connection to ground, so its voltages are known only relative to each other. Adding a ground reference fixes it.
Elimination takes about operations for equations, so a thousand-node circuit takes under a billion: well under a second on a laptop. Simulators also exploit the fact that most entries of are zero.
Worked example
Solve , , by elimination.
Show the solution
- Clear from row 2. Row 2 minus 2 × row 1:
- Clear from row 3. Row 3 minus row 1:
- Clear . Subtract those two:
- Back-substitute.
Answer , and .
Worked example
What does elimination do to , ?
Show the solution
- Eliminate. Row 2 minus 2 × row 1 gives
- Read it. The equations contradict each other: the lines are parallel and never meet.
Answer elimination ends in , so there's no solution.
Worked example
Solve , by elimination.
Show the solution
- Spot the zero pivot. Written in order, the first equation has no term: the first pivot would be 0, and you can't divide by it.
- Exchange the two rows. Now the system is already triangular.
- Back-substitute.
- What a zero pivot means. A zero in a pivot position only means the rows are in an unlucky order; the system is singular only if no exchange can fix it.
Answer and , after one row exchange.
Check
To clear from row 2 using row 1, you subtract times row 1 from row 2. With row 1 starting with 3 and row 2 starting with 1, what is ?
Check
Back-substitute: , , .
(a)
What is ?
(b)
What is ?
(c)
What is ?
Check
A 5 V and a 6 V ideal voltage source are connected in parallel. What does the circuit's system of equations have?
Check
Elimination leaves a row reading . What does that mean?
Check
Solve , by elimination.
(a)
What is ?
(b)
What is ?
Check
Solve , .
Step 1
Subtract 2 × row 1 from row 2. What is ?
Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.
Step 2
Back-substitute: what is ?
Explain why
Explain what a circuit simulator's "singular matrix" error usually means physically, giving one example.
It means the circuit's equations don't pin down a unique answer: either they contradict each other or they leave something undetermined. A common example is a part of the circuit with no path to ground, whose voltages are only defined relative to each other, so infinitely many sets of node voltages satisfy the equations. Another is two ideal voltage sources in parallel with different values, which no node voltage can satisfy.
Practice
Keep practicing
6 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.