## Monday, April 18, 2011

### Balancing Chemical Equations

Consider the following unbalanced chemical equation:
We need to determine formula constants that will make the number of atoms of each element on both sides of the equation equal.  Right now, this equation says that there are 3+2 = 5 atoms of H on the left and 2 atoms of H on the right.  Just suppose that each atom was a part to a machine.  So, you disassemble H3PO4 and you get 3 H, 1 P and 4 O. From Ca(OH)2 you get 1 Ca, 2 O, and 2 H. We’re going to use these parts to make the stuff on the right. First, let’s make a parts list:

 Part Quantity Hydrogen (H) 5 Phosphorus (P) 3 Oxygen (O) 6 Calcium (Ca) 1

Looking at my list, I see I can make a whole bunch of H2O, but not any Ca3(PO4)2 – because I need at least another 2 Ca. At this point, we could do a bunch of trial and error until we finally get exactly the right number of parts to make the stuff on the right side of the equation without any parts left over. However, trial and error doesn’t generalize to hard problems very well, isn’t the easiest thing to program, and generally is not the best way. (It works great for simple cases though.)
Let’s rewrite the equation and introduce some variables (a, b, c, d) to indicate our unknowns:
Now, let’s make a parts list of a different sort than above – being sure to put our algebra caps on first:

 Part Left Side Quantity Right Side Quantity Hydrogen (H) Phosphorus (P) Oxygen (O) Calcium (Ca)

In order for this production to work properly we need the Left Side Quantities to be equal to the corresponding Ride Side Quantities. Now, that will give us 4 equations and 4 unknowns, so you’d think that we could solve it, but there is a snafu:  there are an infinite number of solutions and all zeros is one of those solutions.  First let’s write the equations:
From the second and fourth equation we can see that

Using the first equation and making substitutions for a and b we see that
Let’s rewrite what we’ve found, but in a different order:

The numbers in the denominators are the formula numbers we want.  That is to say, our balanced equation is:

Note, that if we had c over something (other than one) it would still be valid – we don’t need to have c by itself.  Perhaps I’ll show another example in a later post to make this clearer.