Using Row Reduced Echelon Form in Balancing Chemical Equations

In an earlier paper published in the Journal of Natural Sciences Research in 2015 on how to balance chemical equations using matrix algebra, Gabriel and Onwuka showed how to reduce the resulting matrix to echelon form using elementary row operations. However, they did not show how elementary row operations can be used in reducing the resulting echelon matrix to row reduced echelon form. We show that the solution obtained is actually the nullspace of the matrix. Hence, the solution can be infinitely many. In addition, we show that instead of manually using row operations to reduce the matrix to row reduced echelon form, software environments like octave or Matlab can be used to reduce the matrix directly. In all the examples presented in this paper, we reduced all matrices to row reduced echelon form showing all row operations, which was not clearly stated in the Gabriel and Onwuka paper. Most importantly, with the availability of Mathematical software, we show that we do not need to carry out these row operations by brute force.


Introduction
According to Risteski [1], a chemical reaction is an expression showing a symbolic representation of the reactants and products that is usually positioned on the left and right hand sides of a particular chemical reaction.Substances that takes part in a chemical reaction are represented by their molecular formula and their symbolic representation is also regarded as a chemical reaction [2].A chemical reaction can either be reversible or irreversible.These differs from Mathematical equations in the sense that while a single arrow (in the case of an irreversible reaction) or a double arrow points in the forward and backward directions of both the reactants and products (in the case of a reversible reaction) connects chemical reactions [3], an equality sign links the left and right hand sides of a Mathematical equation."The quantitative and qualitative knowledge of the chemical processes which estimates the amount of reactants, predicting the nature and amount of products and determining conditions under which a reaction takes place is important in balancing a chemical reaction.Balancing Chemical reaction is an excellent demonstative and instructive example of the inter-connectedness between Linear Algebra and Stoichiometric principles" [4].
If the number of atoms of each type of element on the left is the same as the number of atoms of the corresponding type on the right, then the chemical equation is said to be balanced [3], otherwise it is not.The qualitative study of the relationship between reactants in a chemical reaction is termed Stoichiometry [5].Tuckerman [6] mentioned two methods for balancing a Chemical reaction: by inspection and algebraic.The balancing-by-inspection method involves making successive intelligent guesses at making the coefficients that will balance an equation equal and continuing until the equation is balanced [4].For simple equations, this procedure is straight forward.However, according to [7], there is need for a "step-by-step" approach which is easily applicable and can be mastered; rather than the haphazard hoping of inspection or a highly refined inspection.In addition, balancing-by-inspection method makes one to believe that there is only one possible solution rather than an infinite number of solutions which the method proposed in this paper illustrates.The algebraic approach circumvents the above loopholes provided in the inspection method and can handle complex chemical reactions.
The algebraic approach discussed in [6], involves putting unknown coefficients in front of each molecular species in the equation and solving for the unknowns.This is then followed by writing down the balance conditions on each element.After which he lets one of the unknowns to be one and takes turns to obtain the coefficients of the remaining unknowns.In the proposed approach, instead of setting one of the unknowns to zero, we write out the set of equations in matrix form, obtain a homogeneous system of equations.Since the system of equations is homogeneous, the solution obtained is in the nullspace of the corresponding matrix.We then perform elementary row operations on the matrix to reduce it to row reduced echelon form.We also show the use of software environments like Matlab/octave to reduce the corresponding matrix to row reduced echelon form using the rref command.This approach surpasses those in [4]; in the sense that we do not need to manually reduce the matrix to echelon form as shown in that paper.In that paper, they showed how the corresponding matrix is reduced to echelon form but did not use elementary row operations to convert it to row reduced echelon form.
In the next section, we state two well known results partaining echelon form and row reduced echelon form.

Methodolology
In this section, we state well known results about echelon form and row reduced echelon form.We will not bother about the algorithm as this is readily available in most Linear Algebra textbooks.Lemma 2.1.:The number of nonzero rows and columns are the same in any echelon form produced from a given matrix A by elementary row operations, irrespective of the sequence of row operations used.
Given an n m × matrix A , 1. Use Gauss elimination to produce an echelon form from A . 2. Use the bottom-most non zero entry 1 in each leading column of the echelon form, starting with the rightmost leading column and working to the left, so as to eliminate all non-zero entries in that column strictly above that entry one.Definition 2.1 An n m × matrix A is said to be in row reduced echelon from when: 1.It is in echelon form (with k non-zero rows, say) 2. The i th leading column equals i e , the i th column of the identity matrix of order p , for 1 i k ≤ ≤ .
The next result which can be found in [8], describes the uniqueness of the row reduced echelon form.It is the uniqueness of the row reduced echelon form that makes it a tool for finding the nullspace of a matrix.
Theorem 2.1 (Row Reduced Echelon Form): Each matrix has precisely one row reduced echelon form to which it can be reduced by elementary row operations, regardless of the actual sequence of operations used to produce it.

Worked Examples
Example 3.1.:Rust is formed when there is a chemical reaction between iron and oxygen.The compound that is formed is a reddish-brown scales that cover the iron object.Rust is an iron oxide whose chemical formula is Fe O , so the chemical formula for rust is Fe O Fe O .
In balancing the equation, let , p q and r be the unknown variables such that We compare the number of Iron (Fe) and Oxygen (O) atoms of the reactants with the number of atoms of the product.We obtain the following set of equations: The homogeneous system of equations becomes From the above, the matrix A is already in the echelon form U , with two pivots 1 and 2 but not in row reduced echelon form, even though there is a zero above the second pivot 2. However, to reduce it to row reduced echelon form R ; all the pivots must be one.Hence, we replace row two with half row two, that is Upon expanding, we have There are three pivot variables , p q and one free variable r .If we choose . To avoid fractions, we can also let 2 r = , so that 4, 3 p q = = and 2 r = .We remark that these are not the only solutions since there is a free variable r , the nullspace solution is infinitely many.Therefore, the chemical equation can be balanced as C H burns in oxygen to produce carbon (IV) oxide 2 CO and steam.The steam condenses to form droplets of water viz; Let the unknowns be , , p q r and s , such that We compare the number of Carbon (C), Hydrogen (H) and Oxygen (O) atoms of the reactants with the number of atoms of the products.We obtain the following set of equations: In homogeneous form, In the first step of elimination, replace row two by row two minus three times row one, i.e., 2 Exchange row two with row three or vice versa to reduce A to echelon form U ,

U
In the next set of operations that we will carry out to reduce U to R , we perform row operations that will change the entries above the pivots to zero; Replace row one by three times row two plus two times row three i.e., 2 and replace row one with three times row one plus row three ( ) The last operation that will give us R , is to reduce all the pivots to unity, that is replace row one with one-sixth row one, row two with one-sixth row two and row three with one-third row three to obtain The solution to = Ax 0 reduces to 0 R = x where x is actually the nullspace of A which is equivalent to the nullspace of R .Hence, Upon expanding, we have There are three pivot variables , , p q r and one free variable s .Let 3 s = , so that 7 1, 2 p q = = and 2 r = .We remark that this is not the only solution since there is a free variable s , the nullspace solution is infinitely many.Therefore, the chemical equation can be balanced as In balancing the equation, let , , p q r and s be the unknown variables such that We compare the number of Sodium (Na), Oxygen (O), Hydrogen (H) and Sulphur (S) atoms of the reactants with the number of atoms of the products.We obtain the following set of equations: . q r = Re-writing these equations in standard form, we have a homogeneous system = Ax 0 of linear equations with , , p q r and s The augmented system becomes [ ] Since the right hand side is the zero vector, we work with the matrix A because any row operation will not change the zeros.
Replace row 2 with row two minus row one i.e., 2 2 1 R R R ↔ − .Similarly, replace row three with row three minus row one i.e., 3 In the second set of row operations, we replace row three by two times row three minus row two or 3 and replace row four by four times row four minus row two or 4 In the third stage of the elimination process, we replace row four with 3 times row four plus row three i.e., 4 to yield the row echelon matrix or upper triangular U ,

U
We now reduce U to row reduced echelon form R as follows: First, we reduce the pivots to unity in rows two and three via 2 Replace row one by row one plus two times row three i.e., 1 and row two by row two plus half row three, that is . These two operations replaces all nonzeros above the pivots to zero resulting in the row reduced echelon form The solution to = Ax 0 reduces to 0 R = x where x is actually the nullspace of A which is equivalent to the nullspace of R .Hence, There are three pivot variables , , p q r and one free variable s .We set 2 s = , so that 2, 1 p q = = and 1 r = .We remark that this is not the only solution since there is a free variable s , the nullspace solution is infinitely many.Therefore, the chemical equation can be '"balanced" as We obtain the following set of equations for each of the elements: The corresponding matrix becomes In the same vein, the following row operations 3 reduces the above matrix to changes the nonzero entries above the pivots to zero so that U reduces to The row operations leads to the row reduced echelon form Therefore, the solution For simplicity, we equate s to one so that 1 p q r s = = = = .This actually shows that the equation was balanced in the first place.

Using Matlab or Octave rref Command
In this section, we use octave to reduce each of the matrices considered in the last section to row reduced echelon form.We remark that just as predicted by the theory, row exchanges does not change the outcome of row reduced echelon form.This means that if you interchange any of the row of each of the matrices in the four examples, the rref will be the same. .This gives the same R as in (1) as This gives the same R as in (2) as .This gives the same R as in (3) as .This gives the same R as in (4) as In the next example, we illustrate the power of the rref command.We write down the balance conditions on each element as Sodium: 2 p t = .Chlorine: p u = .

Conclusion
In this paper, we have shown how to balance chemical equations using row reduced echelon form.In actual fact, the echelon form alone could have been used and we still have the same solution but reducing it to rref makes the solution easily deduced.This paper improves on the work of Gabriel and Onwuka and we show that the octave/ Matlab rref command can be used to the correctness of the final output on the one hand or as a stand alone.

U
There are three pivots respectively 1, 4, 4 − − .Hence, to reduce the matrix to row reduced echelon form, we make sure the entries above the pivots are zero and then change the pivots to unity.The row operations 2 2 3