Linear Algebra and Chemistry: Combustion in Excess Oxygen

Lab 4
Linear Algebra and Chemistry: Combustion in Excess Oxygen
Learning Goals
• Balance equations in chemistry for burning materials in the presence of excess oxygen
• Determine solutions of homogeneous linear equations
• Determine general solutions and particular solutions to balance chemical equations
Any student who has had a chemistry course will recall, fondly, the task of balancing chemical
equations. It just so happens that linear algebra methods may be employed to balance many types
of chemical equations. The linear algebra problem we use to do our chemistry problems is that of
finding the solutions of homogeneous linear equations. The particular chemistry problem that we
will consider in this exercise is that of burning certain materials in the presence of excess
oxygen. In particular, we wish to balance combustion equations. That is, if you burn different
elements like gasses or liquids, the combustion reaction requires oxygen, O2 , and usually results
in carbon dioxide, CO2 , and water, H 2O . The basic problem is, given a chemical compound X ,
balance the following equation
X + O2 → CO2 + H 2O
For example, let us try to burn acetylene (as in an acetylene torch), that is, choose X = C2 H 2 .
Then we must balance the following equation.
C2 H 2 + O2 → CO2 + H 2O
To do this we need to determine coefficients of the chemical equation so that the left and right
hand sides balance, that is, have the same number of molecules of each element. So we must
determine constants, say, α , β , γ , and δ so that
α C2 H 2 + β O2 → γ CO2 + δ H 2O
We will determine one equation for each of the three elements in the equation, C , H , and O .
For the element C , there is one term on the left side of the equation that contains C , and this
compound contains two carbon atoms and has the coefficient α . There is one term on the right
hand side that contains one C and has the coefficient γ . So, to balance the number of carbon
atoms on both sides of the equation, it must be true that 2α = γ , this is our carbon equation. For
the element H , hydrogen, there are α molecules with two hydrogen atoms on the left-hand side
of the equation and δ molecules with 2 hydrogen atoms each on the right hand side of the
equation. To balance the number of hydrogen atoms on each side of the equation, the hydrogen
equation, 2α = 2δ , must then be true. Similarly, to balance the number of atoms of the element
oxygen, O , the oxygen equation, 2 β = 2γ + δ , must be satisfied. Putting all of this together
results in the system of equations
1
Lab 4 Linear Algebra and Chemistry
C:
2α
γ
=
2δ
= 2γ + δ
2α
=
H : 2α
O : 2β
Equations by Element
⇒
2α
−γ
= 0
−2δ = 0
2 β −2γ −δ = 0
System of Equations
This is a homogeneous system of linear equations that may be formulated as a matrix equation
AX = B with
2 0 −1 0
0
A = 2 0 0 −2 , B = 0 ,
0 2 −2 −1
0
α
β
X=
γ
δ
with the matrix form of the equation given as
2 0 −1 0
2 0 0 −2
0 2 −2 −1
α
0
β
= 0
γ
0
δ
This system of equations is an underdetermined system of equations, which means that we will
have an infinite number of solutions. We usually desire the solution where each coefficient is a
whole number, the smallest such number. (Note: This problem is equivalent to determining a
particular linear dependency of the columns of the matrix operator for our problem, find values
c1 , c2 , c3 , c4 so that c1 X 1 + c2 X 2 + c3 X 3 + c4 X 4 = 0 . That is, for this problem, write the fourth
column of the matrix operator as a linear combination of the first three linearly independent
columns.)
To solve our matrix problem, we will call on MATLAB. The reduced row echelon form
of the matrix operator may be determined with the familiar rref command of MATLAB. The
MATLAB commands to enter the matrix and apply rref to the matrix follow.
A=[2 0 -1 0; 2 0 0 -2; 0 2 -2 -1]
A=
2 0 -1 0
2 0 0 -2
0 2 -2 -1
rref(A)
1.0000
0
0 -1.0000
0 1.0000
0 -2.5000
0
0 1.0000 -2.0000
The augmented matrix is row equivalent to
2
Lab 4 Linear Algebra and Chemistry
2 0
−1
0
0 −2
2 0
0 2 −2
−1
� 0 1 0 −2.5 �
1 0 0
~
−1
0 0 1
−2
The reduced row echelon form of the original problem determines the equivalent system of
equations from which the general solution may be found
α
β
γ
−δ
−2.5δ
= 0
= 0
−2δ
= 0
From, this system of equations, we may make the following observations
• There is one degree of freedom, that is, one free variable. This means that an arbitrary choice
of a value for one of the variables will allow us to determine the values of the other variables.
In particular, we may choose any value we wish for δ , the natural choice for our setup.
5
• If we choose δ = 1 , then it follows that γ = 2 , β = , and α = 1 .
2
• The general solution is
δ
α
5
β
δ
= 2 =δ
γ
2δ
δ
δ
•
1
5
2 , δ >0
2
1
If we choose δ = 2 , then we get the desired solution (aesthetically pleasing to those who
prefer whole numbers). Here, α = 2 , β = 5 , γ = 4 , δ = 2 , and the balanced equation is
2C2 H 2 + 5O2 → 4CO2 + 2 H 2O
•
Only one vector is required to describe Nul ( A) , a line in ℜ4 , so dimension of Nul ( A) = 1
1
5
Nul ( A) = δ 2 , δ > 0 ( positive real numbers )
2
1
Acknowledgements: I wish to thank Dr. Dan Adsmond and Ms. Kay W., Chemistry, Morehead
State University, for their contributions to correct chemical equations and assurance that the
problem discussion was both interesting and correct.
3
Lab 4 Linear Algebra and Chemistry
Exercises
Now it is your turn to do some burns.
A. Here follows a list of compounds, X in the combustion equation, the burnees, which may be
combusted by you, the burner. Your task is to determine, for each compound, the number of
oxygen molecules required for combustion and the number of resulting molecules of each of
carbon and water (i.e., balance the associated equations). For each of the compounds, write
down the matrix equation, the general solution of the matrix equation, and a correctly
balanced equation. Determine two different solutions to problems 1 and 4; indicate the value
of δ chosen for each solution. Use format rat to display of the last column of the rref result
of the augmented matrix as rational numbers.
1. Compound: C12 H 22O11 (sugar)
Chemistry equation to balance: ____________________________________________
a.) System of equations
c.) Augmented matrix
b.) Matrix form of equations
d.) rref result
e.) General solution
f.) Balanced equation for δ = _____
__ __________ + __ O2 → __ CO2 + __ H 2O
Balanced equation for δ = _____
__ __________ + __ O2 → __ CO2 + __ H 2O
g.) What is the nul space of A?
Dimension of Nul ( A) = ______. Nul ( A) =
4
Lab 4 Linear Algebra and Chemistry
2. Compound: C3 H 6O (finger nail polish remover)
Chemistry equation to balance: ____________________________________________
a.) System of equations
c.) Augmented matrix
b.) Matrix form of equations
d.) rref result
e.) General solution
f.) Balanced equation for δ = _____
__ __________ + __ O2 → __ CO2 + __ H 2O
3. Compound: C6 H12 (cyclohexane)
Chemistry equation to balance: ____________________________________________
a.) System of equations
c.) Augmented matrix
b.) Matrix form of equations
d.) rref result
e.) General solution
f.) Balanced equation for δ = _____
__ __________ + __ O2 → __ CO2 + __ H 2O
5