A7 · Lesson 45 · The pseudoinverse
The best answer for any matrix
Only square matrices with nonzero determinants have inverses. Least squares handled tall matrices with independent columns. That leaves the awkward cases: wide matrices with infinitely many solutions, and rank-deficient ones that have too many and too few at once. The SVD settles all of them with one rule, the pseudoinverse . It gives the least-squares answer, and among all least-squares answers, the shortest. Circuits obey the same rule: currents split among parallel paths in the way that dissipates the least power.
- Every point on the line is a solution of . The second dot is one of them; slide it along with .
- Its length is smallest at the point marked , where the arrow from the origin meets the line at a right angle.
- Change . The line moves, and the shortest solution moves with it, always along the direction .
Predict
Which solution of is shortest?
, with length . The others have lengths 5, 2.5 and 3.16. The shortest solution is the one perpendicular to the line of solutions, which means it lies along the row : it's in the row space, with no part in the null space.
Name it
Definition
Write the SVD as , with nonzero singular values. The pseudoinverse inverts the nonzero ones and leaves the zeros alone:
What is
minimizes , and among all minimizers it has the smallest length. It lies in the row space of , and is the projection of onto the column space.
Three special cases:
- invertible : ;
- independent columns (tall, rank ): , the least-squares formula;
- independent rows (wide, rank ): , the minimum-norm solution of an underdetermined system.
Small singular values
A singular value near zero turns into a huge , so noise in along that direction is amplified enormously. Two fixes:
- truncation: treat below a threshold as zero;
- Tikhonov regularization (ridge): minimize , which replaces with . Large singular values are hardly changed, and small ones are damped by the factor .
Circuits minimize power
Maxwell showed that the currents in a resistor network are the ones that, among all current patterns obeying KCL, dissipate the least power . That's a weighted minimum-norm problem. For two parallel resistors sharing a current , minimizing with gives the current divider .
Worked example
Find the shortest solution of .
Show the solution
- Pseudoinverse. has one independent row, so
- Shortest solution.
- Why it's shortest. Every other solution adds a null-space vector , which is perpendicular to , so by Pythagoras it can only add length:
Answer the shortest solution is .
Worked example
Find for and .
Show the solution
- Invert the singular values. is already its own SVD, with singular values 1 and 0. Inverting the 1 and keeping the 0 gives so .
- The best residual. No can match , since always has a zero second entry, so the residual is at least 4. Every achieves that residual.
- The shortest choice. The pseudoinverse picks , the shortest. It solves what can be solved and sets the rest to zero.
Answer .
Worked example
A 3 mA current enters two parallel resistors, 1 kΩ and 2 kΩ. Show that the actual split dissipates the least power.
Show the solution
- The actual split. The current divider gives = 2 mA in the 1 kΩ resistor and 1 mA in the 2 kΩ.
- Its power. Kilohms times milliamps squared give milliwatts:
- Any other split. Take and : more, for every .
- An equal split. That's , which costs 6.75 mW.
Answer the actual 2 mA and 1 mA split dissipates 6 mW, and any other split dissipates mW, which is more.
Check
Find the shortest solution of .
(a)
What is ?
(b)
What is ?
Check
is the single column . What is the second entry of , a 1 × 2 row?
Check
A matrix's smallest singular value is 0.001. Noise of size 0.001 in along the matching direction changes by how much?
Check
Tikhonov regularization with = 0.0001 is applied. By what factor is the singular value 0.1's contribution scaled, compared with the plain pseudoinverse?
Check
2 mA divides between 1 kΩ and 4.7 kΩ in parallel so as to dissipate the least power. How much flows in the 1 kΩ resistor?
Write units the way you normally would: 1.5 mA, 1500 µA and 0.0015 A are the same answer.
Check
Find the minimum-norm solution of from .
Step 1
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
What is ?
Step 3
What is the length of the solution?
Explain why
Why is the minimum-norm solution the one in the row space?
Every solution of is one particular solution plus a null-space vector, and the row space and the null space are perpendicular. So any solution splits into a row-space part and a null-space part, and the row-space part is the same for all of them, because two solutions differ only by a null-space vector. By Pythagoras, the length squared is the row-space part squared plus the null-space part squared. The shortest solution has no null-space part at all. The pseudoinverse builds its answer from the with nonzero , which span the row space, so it gives that solution directly.
Practice
Keep practicing
7 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.