Member-only story
Systems Of Linear Equations And Gaussian Elimination
What “Singular Matrix” Really Means, Explained With a Daily Commute
Least squares explained with twenty noisy receipts. See how fitting a line becomes a small linear system, and how a lost dwarf planet started it all.
Open your email and search for “your ride receipt.” You’ll find a little pile. Same app, same city, prices all over the place, and one from 1:14 am with a tip of exactly 40 cents that you have no memory of leaving.
Free reading link here
That pile is hiding a secret. Most ride apps work out a fare the same way, a starting fee plus a price per kilometre plus a price per minute. So three receipts give you three equations with three unknown prices, and if you solve them, you’ve worked out the app’s pricing.
Python does it in one line.
Try the same trick on a month of commute receipts, though, and numpy, the maths library behind most Python data work, stops with two words. Singular matrix. Ask two other popular libraries and they don’t complain at all. They each hand back an answer, the answers don’t match, and neither one mentions the other exists. Keep that in mind, because we’re coming back for it.








