A78 of 56
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

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 a1x+y=c1 and a2x+y=c2. Where they cross is the solution.
  • Make a1=a2. What happens to the lines? Now also make c1=c2.
  • 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 x+y=3 and 2x+2y=7 subtracts twice the first equation from the second. What's left?

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 x from those below it, then the second to clear y, and so on:

[21154−60−2−2729]→[21150−8−2−1208314]→[21150−8−2−120012]

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: z=2, then −8y−4=−12 gives y=1, then 2x+1+2=5 gives x=1.

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 0= (nonzero): no solution. The equations contradict each other.
  • A row becomes 0=0: 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 23n3 operations for n 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 G are zero.

Worked example

Solve x+y+z=6, 2x+3y+z=11, x+2y+3z=14 by elimination.

Show the solution
  1. Clear x from row 2. Row 2 minus 2 × row 1: y−z=−1
  2. Clear x from row 3. Row 3 minus row 1: y+2z=8
  3. Clear y. Subtract those two: 3z=9
  4. Back-substitute. z=3y=−1+3=2x=6−2−3=1

Answer x=1, y=2 and z=3.

Worked example

What does elimination do to x+y=3, 2x+2y=7?

Show the solution
  1. Eliminate. Row 2 minus 2 × row 1 gives 0=1
  2. Read it. The equations contradict each other: the lines are parallel and never meet.

Answer elimination ends in 0=1, so there's no solution.

Worked example

Solve 2y=4, 3x+y=5 by elimination.

Show the solution
  1. Spot the zero pivot. Written in order, the first equation has no x term: the first pivot would be 0, and you can't divide by it.
  2. Exchange the two rows. 3x+y=5,2y=4 Now the system is already triangular.
  3. Back-substitute. y=23x=5−2x=1
  4. 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 x=1 and y=2, after one row exchange.

Check

To clear x from row 2 using row 1, you subtract m times row 1 from row 2. With row 1 starting with 3 and row 2 starting with 1, what is m?

Check

Back-substitute: 4x+y+z=−4, 1y+z=0, 3z=9.

(a)

What is z?

(b)

What is y?

(c)

What is x?

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 000∣0. What does that mean?

Check

Solve x+y=4, x−y=2 by elimination.

(a)

What is y?

(b)

What is x?

Check

Solve x+y=p, 2x+3y=1.

Step 1

Subtract 2 × row 1 from row 2. What is y?

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°.

Explain why

Explain what a circuit simulator's "singular matrix" error usually means physically, giving one example.

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.