A Linear Algebra Perspective on High School Chemistry
Table of Contents
Recently, I was on a ski trip and the topic of chemistry came up, and I realized that high school stoichiometry seemed like a algorithm I should recognize.
In stoichiometry, you're given an equation like this:
We're trying to determine what the coefficients need to be for the equation to be balanced. From what I remember from high school, you just think really hard until you figure out what they need to be, and that's how you determine the coefficients.
Taking a more systematic approach, we can move everything over to the other side, giving
We can consider the balance for each element as an equation, and our coefficients as unknowns
Now it's just a problem of Gaussian elimination. This is a homogeneous linear system:
This is so exciting, because now you can use your favorite linear solver on this equation to determine the balance for the original chemical reaction.