Академический Документы
Профессиональный Документы
Культура Документы
Heath, p 617
Additional reference: Excel for Chemists, E J Billo, John Wiley, p 73 & 205
Solving Systems of Linear Equations using Matrix Operations:
Technologists, engineers and even business men are required to solve systems of linear
equations. Chemical applications include material balance problems and deconvolution of
overlapping UV/Vis spectra. For example, after taking measurements across a distillation
column, the following set of linear equations were generated.
0.75D + 0.02U = 12
0.25D + 0.98U = 88
where D = kg/hr Distillate, U = kg/hr Underflow
To solve for the values of D and U, the student may use the familiar process of rearranging one
equation in terms of one unknown, then substituting this unknown into the other equation to
obtain one equation in one unknown, which is solvable. This process is adequate for simple
problems, but for more complex systems of equations, involving numerous equations and
unknowns, matrix operations are often used.
In the chemistry lab a matrix is a multi-component chemical mixture/solution but in
mathematical terms, a matrix is simply a rectangular array of numbers. The coefficients and
constants of a set of linear equations are written in rectangular arrays (matrices). Then row-bycolumn multiplications are performed to solve for the variables (unknowns). These row-bycolumn operations (algorithms) are tedious when performed by hand, but are easily performed by
scientific calculators and computer software such as MS Excel. [An algorithm is simply an
explicit series of steps.]
General Procedure for Solving Linear Equations with Matrices:
1. Convert the system of equations into two matrices; a matrix of the coefficients of the
variables and a matrix of the constants, for example:
2x 2y = 4
3x + 5y = 14
2.
4
and
5
14
A
B
2
3
Page 1
b A
d C
B
(aA bC)
D
(cA dC)
(bB bD)
(cB dD)
1
C
A
C
D
0
With 3 3 matrices,
1
0
D
0
1
0
0
0
d
a b D
c d c
b
D 1 0 where: D = ab-bc and D 0
a 0 1
D is called the Determinant of a matrix.
It is beyond the scope of this course to spend time studying these or other matrix operations.
Fortunately, finding the inverse of a matrix of coefficients and multiplying it by a matrix of
constants is easily performed by MS Excel.
Solving Systems of Linear Equations using Matrix Operations in MS Excel:
It is necessary to obtain one independent equation for each unknown. This can be represented by
a square matrix. For example: 3 equations for 3 unknowns yields a 3 3 matrix, 4 equations
for 4 unknowns yields a 4 4 matrix, etc.
Independent equations relate different properties of a system. Multiplying an equation by a
constant produces a new equation but not an independent equation.
In general:
AX = B
Rearranging gives:
X=A-1B
Page 2
The equation, X=A-1B, means that multiplying the inverse of a coefficient matrix (A-1) by the
constants matrix (B) yields the matrix of solutions for the unknowns (X), e.g., (x,y,z).
Creating an Inverse Matrix of a 33 Matrix in Excel:
With the coefficient matrix in cells A2:C4 and with the constants matrix in cells D2:D4,
select an array area of empty cells (33), then choose Insert, Function, Math & Trig,
MINVERSE, OK, click the collapse button, select the cells of the coefficients matrix,
Enter, CTRL + SHIFT + ENTER (instead of clicking OK, otherwise a single value
rather than a matrix of values will be returned).
Obtaining the Solution Matrix, i.e., X=A-1B:
Select an array area (3 1), Insert, Function, Math & Trig, MMULT, OK, click the
collapse button, select the A-1 array, click the collapse button for Array 2, select the array
of constants, Enter, CTRL + SHIFT, + ENTER
OR
Without displaying A-1, select an array area for the solution matrix, X (3 1).
In the formula bar type:
=MMULT(MINVERSE(A2:C4),D2:D4) Then CTRL + SHIFT + ENTER.
The syntax of this combined calculation derives from the syntax of the individual
functions:
MMULT(array1, array2) which multiplies two matrices and
MINVERSE(array) which returns the inverse of a matrix
Page 3
A plant engineer wishes to calibrate the flow meters in the Distillate and Underflow of a
distillation column that is used to purify methanol in a mixture of alcohols. He asks a chemical
technologist for assistance. The engineer sets the column Feed rate at 100 lb/min. The
technologist obtained samples from the Feed, Distillate and Underflow of the distillation column
and analyzed them by Gas Chromatography to determined the concentrations shown in the table
below. What are the flow rates of distillate and underflow? Solve this using matrices.
Feed
Distillate
Underflow
Methanol (%w)
50.0
96.0
38.5
Ethanol (%w)
30.0
2.0
37.0
1-Propanol (%w)
20.0
2.0
24.5
Page 4
Analysis of Spectra of Mixtures: (Reference: Excel for Chemists, E J Billo, John Wiley, p343)
If the spectra of pure components are available/obtainable, the spectrum of a mixture of
components can be analyzed to determine the concentrations of the individual components. If
the mixture contains N components, then absorbance measurements at N suitable wavelengths
are needed to solve the set of N linear equations in N unknowns.
In spectrophometric analysis, we try to select a unique wavelength for each analyte. This is not
always possible. Impurities (not always removable) cause positive interference if they absorb at
the same wavelength as the analyte. It is not uncommon for a student to report a product
recovery of 110%. Clearly this is incorrect. It may be due to analytical error but is often due to
the presence of more than one compound absorbing at the chosen wavelength. Visible and UV
scans often reveal broad absorption bands and hence several bands may overlap. The absorbance
of overlapping bands are additive. The Beer-Lambert law (A = elc) provides the basis of our
calculation. We will use 1 cm cells so the term, l, can be dropped from the equation.
Consider the case of Co+2 and Ni+2. Co has max at 510 nm and Ni at 394 nm. Both species
produce broad absorption bands overlapping the others at both values of max. Since their visible
spectra overlap, the total absorbance measured at either max will be given by the following
equations:
Atotal = ACo + ANi
Atotal = eCoconc Co + eNiconc Ni
Note that there are 2 unknowns in this equation: conc Co and conc Ni, so we need a second
equation (2 equations for 2 unknowns).
The molar extinction coefficients (molar absorptivities), eCo and eNi, are calculated after
measuring the absorbance of prepared, single-component, standard solutions at both
wavelengths
The absorbance of the mixed solution (Atotal) is then read at both wavelengths. This will
provide data to generate 2 independent equations for the 2 unknowns (the concentrations
of Co and Ni in the mixture).
Write the 2 equations and their corresponding matrices and solve for the concentrations
of Co and Ni in the mixture by matrix inversion and matrix multiplication.
This can be applied to 3, 4, or more component systems as well. One good example is
that of m-nitroaniline, azobenzene and benzoic acid. Apply this to your organic lab and
show your work by handing in the spread sheet and scans with your lab report.
Page 5