Solving a System of Linear Equations with Python and Matrices

Rhett Allain
Python in Plain English
6 min readApr 29, 2024

--

Photo:Rhett Allain. A DC circuit problem

This is part of a series that I like to call “things that I will forget if I don’t write it down”. It’s how to solve a system of linear equations with Python and matrices. Yes, it’s true that there are multiple ways to solve a system of equations — but using this way is useful for some other things (solving differential equations).

A Circuit Problem

--

--

Physics faculty, science blogger of all things geek. Technical Consultant for CBS MacGyver and MythBusters. WIRED blogger.