# General algebraic method of balancing chemical reaction equations

Apart from the three already described methods, there is also a general method, often less user friendly - but thanks to its systematic approach perfect for use in computer programs. That's the method EBAS - our chemical reaction equation balancer - uses.

Let's try an algebraic method for

H_{3}BO_{3} → H_{4}B_{6}O_{11} + H_{2}O

It can be rather easily balanced by inspection, but let's try a more systematic approach.

What does 'balanced' mean? It means that for every element, there is the same number of atoms on both sides of the reaction equation. Our reaction has three coefficients a, b and c:

**a**H_{3}BO_{3} → **b**H_{4}B_{6}O_{11} + **c**H_{2}O

Using coefficients a, b and c we can tell that we have 1×a atoms of boron on the left (one atom per each H_{3}BO_{3} molecule), and 6×b + 0×c on the right (6 atoms of boron per each H_{4}B_{6}O_{11} molecule and no boron in water). This gives us following equation:

1×a = 6×b + 0×c

We can write similar equations for the remining elements - hydrogen:

3×a = 4×b + 2×c

and oxygen:

3×a = 11×b + c

As there are no free terms in this set of equations, it has a trivial solution (a = b = c = 0) which we are not interested in. We have three equations, and three unknowns - nothing particularly difficult to solve. Quite often you will end with many more equations and many more unknows. Such equation sets is not a thing that you may want to solve manually, although when balancing chemical equations in most cases it can be done relatively easy, as most equations don't contain all unknowns. In this case we have very simple equation a = 6×b that we can use to substitute 6×b for a in the second and third equation to get:

18×b = 4×b + 2×c

18×b = 11×b + c

After some rearranging:

7×b = c

7×b = c

Both equations are identical. In algebra it usually means that the set of equations doesn't have a unique solution, but in the case of chemical equations we have one additional information - all coefficients must be integer and they must be the smallest ones. To find them we can assume one of the coefficients to be 1:

b = 1

If so

a = 6

c = 7

and indeed

**6**H_{3}BO_{3} → H_{4}B_{6}O_{11} + **7**H_{2}O

is the balanced reaction equation.

This first example doesn't look convincing - why do we have to solve set of equations when the reaction equation can be easily balanced by other means? Good point - but what if the reaction can be not easily balanced?

P_{2}I_{4} + P_{4} + H_{2}O → PH_{4}I + H_{3}PO_{4}

Try for a moment. Looks easy but soon gets surprisingly hard and the coefficients become pretty high, which makes you wonder if you have not made some mistake (see some balancing hints at the bottom of that page). What about general, algebraic method?

We need five coefficients, and there are only four equations (one for each element present) - but it shouldn't bother us, as we know that we have additional information that works as an additional equation.

**a**P_{2}I_{4} + **b**P_{4} + **c**H_{2}O → **d**PH_{4}I + **e**H_{3}PO_{4}

Setting up equations:

P: 2×a + 4×b = d + e

I: 4×a = d

H: 2×c = 4×d + 3×e

O: c = 4×e

Balances for iodine and oxygen make this set look much easier than expected. c = 4×e and d = 4×a are substitutions that we are about to use to reduce number of unknowns:

1^{st} equation: 2×a + 4×b = 4×a + e

3^{rd} equation: 8×e = 4×d + 3×e

So we have now after some canceling:

4×b = 2×a + e

4×a = d

5×e = 4×d

c = 4×e

For someone fluent in algebra it is obvious that we have already finished - it is now enough to assume that one of the variables equals 1 to calculate values of all others. Assuming a = 1 and simply substituting calculated values we have:

a = 1

b = 13/10

c = 64/5

d = 4

e = 16/5

These are hardly integer, but all we have to do is to find the smallest common denominator to have a list of integer coefficients in numerators. In this case the smallest common denominator is 10, so if we multiply all numbers by 10 we get:

a = 10

b = 13

c = 128

d = 40

e = 32

And you may check that these are the correct coefficients. Imagine finding them by inspection method!

It's also easy to use the algebraic method to balance redox reaction with charged species. Let's try it for

**a**Cr_{2}O_{7}^{2-} + **b**H^{+} + **c**Fe^{2+} → **d**Cr^{3+} + **e**H_{2}O + **f**Fe^{3+}

What equations do we have? Four balances of atoms:

Cr: 2a = d

O: 7a = e

H: b = 2e

Fe: c = f

But that's not enough to balance equation - we have six coefficients and four equations. For algebraic method we can have one equation less than variables - so we are still one equation short. However, charge has to be balanced as well, and that will give us last equation needed to balance reaction:

-2a + b + 2c = 3d + 3f

(note that sign of coefficients in the last equation depends on the charge sign). We are ready to solve. First of all, we know that

e = 7a

so

b = 14a

Let's get rid of b and d in the charge balance equation:

-2a + 14a + 2c = 6a + 3f

Sorting, and using c=f:

c = 6a

That's almost ready. Let's put a = 1 and calculate all other coefficients simply using already known values:

c = 6

d = 2

e = 7

b = 14

f = 6

and balanced equation takes form:

Cr_{2}O_{7}^{2-} + 14H^{+} + 6Fe^{2+} → 2Cr^{3+} + 7H_{2}O + 6Fe^{3+}

That's all. Not that hard.

Probably the most important characteristics of the algebraic method is that - contrary to the inspection method - it is guaranteed to give you an answer. If the reaction can be balanced, you will find coefficients. If the reaction can't be balanced - you will find it out seeing that there are more unknowns than independent equations (remember - one more is not a problem), or that equations are contradictory. With inspection method you will never have a proof that the equation can't be balanced.

There is an additional reason for this method to be important. Computers are very effective in solving sets of simultaneous equations, for example using method called Gauss elimination. What is difficult for humans is a perfect task for the number cruncher built in every processor. That's why EBAS is able to balance the so-called Blakley equation (20 unknowns in 19 equations) in a blink of an eye on a 25 year old PC.

Note that there are - although rare - cases, when reaction occurring in reality cannot be balanced with the algebraic approach. Some of these cases (together with explanation) are described in "failures" section.

Balancing hints for P_{2}I_{4} + P_{4} + H_{2}O → PH_{4}I + H_{3}PO_{4} reaction:

Contrary to what balancing by inspection rules suggest, start with balancing oxygen from phosphoric acid, then balance hydrogen, iodine, and finally phosphorus. Leaving oxygen and hydrogen to the end is asking for troubles.