
If there is only one solution, the chemical equation does not balance. This means the system has one solutions, or infinitely many. But if y ≠ 0 and By = 0 then B(my) = 0 for any scalar m. Obviously, x = 0 is a solution to the above matrix equation. In simple terms, the applet solves this system of equations and returns the answer. These equations may be put into matrix form, Bx = 0. Therefore there are m equations constraining the values of the a i. Then for a fixed j there must be the same number of this type of atom on either side of the equation so it follows that b 1,ja 1 + b 2,ja 2 +. Let b i,j denote the occurences of atom type j in c i. Suppose there are m different types of atoms involved in the reaction. Let the integer a i denote the number of occurences of c i on the left hand side of the balanced equation (or equivalently, the negation of the number of occurences on the right hand side of the balanced equation). List the compounds in the chemical reaction, and call them c 1, c 2. The applet above does this same process, except on a larger scale, using the tools of linear algebra. Therefore the balanced reaction is 2H 2 + O 2 -> 2H 2O. It is not the only one, but it is the "smallest" one that uses positive integers. Notice that a = 2, b=1 and c = 2 is a solution to this system. Since there are the same number of oxygen atoms on each side, b = 2 c. Then since there are the same number of hydrogen atoms on each side of the chemical equation, we know that a = c. Let's force the coefficient of H 2 to be a, the coefficient of O 2 to be b and the coefficient of H 2O to be c.

Using algebra, we will make a system of equations to solve the chemical equation. Less Technical Example of how the applet works:Ĭonsider this example: H 2 + O 2 -> H 2O. You will need to take linear combinations of the solutions yourself to get the arrow in the right place. It can do things that make no sense if there are multiple solutions. The program automatically tries to put the arrow in a sensible place so that the reaction balances properly.

In the language of linear algebra, the applet outputs a "basis" for all the solutions. You can get multiple solutions to a reaction if there is more than one way to balance it (where taking multiples of all the coefficients does not count as a separate way).
