You are on page 1of 25

MTH205: Linear Algebra II Lecture Notes

By
Dr Richard Olatokunbo Akinola
Department of Mathematics
University of Jos
P. M. B. 2084, Jos, Nigeria
roakinola@ gmail.com
2
Chapter 1

Using Row Reduced Echelon Form in


Balancing Chemical Equations

1.1 Introduction
According to Risteski [2] a chemical reaction is an expression showing a symbolic represen-
tation 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 [3]. 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 [4], 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 con-
ditions under which a reaction takes place is important in balancing a chemical reaction.
Balancing Chemical reactions is an excellent demonstative and instructive example of the
inter-connectedness between Linear Algebra and Stoichiometric principles’ [1].
If the number of atoms of each type of element on the left is the same as the number
of atoms of the corrresponding type on the right, then the chemical equation is said to be
balanced [4], otherwise it is not. The qualitative study of the relationship between reactants
in a chemical reaction is termed Stoichiometry [6]. Tuckerman [5] 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 [1]. 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 [5], involves putting unknown coefficients in front
of each molecular species in the equation and solving for the unknowns. This is then fol-
lowed 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 un-
knowns. In the proposed approach, instead of setting one of the unknowns to zero, we write

3
4 CHAPTER 1. BALANCING CHEMICAL EQUATIONS

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 Mat-
lab/octave to reduce the corresponding matrix to row reduced echelon form using the rref
command. This approach surpasses those in [1]; in the sense that we do not need to manu-
ally 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.

1.2 Theory
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 1.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 1.2.1. An n × m matrix A is said to be in row reduced echelon from when :
(a). It is in echelon form (with k non-zero rows, say)
(b). The ith leading column equals ei , the ith column of the identity matrix of order p, for 1 ≤ i ≤ k.
The next result which can be found in [9], 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 1.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.
Proof. See [9].

1.3 Worked Examples


Example 1.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 Fe2O3 , so the chemical formula for rust is
Fe + O2 −→ Fe2O3 .
Balance the equation.
1.3. WORKED EXAMPLES 5

In balancing the equation, let p, q and r be the unknown variables such that

pFe + qO2 −→ rFe2O3 .

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:

Fe : p = 2r
O : 2q = 3r,

The homogeneous system of equations becomes


 
  p  
1 0 −2   1 0 −2
q = 0, where A= .
0 2 −3 0 2 −3
r

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 R2 ↔ 12 R2 to yield,
 
1 0 −2
R= . (1.1)
0 1 − 23

Thus, Rx = 0 becomes  
  p
1 0 −2  
q = 0.
0 1 − 32
r
Upon expanding, we have

p − 2r = 0 or p = 2r
3 3
q − r = 0 or q = r,
2 2
the nullspace solution    
p 2
x =  q  =  32  r.
r 1
There are three pivot variables p, q and one free variable r. If we choose r = 1, then p =
2, q = 32 . To avoid fractions, we can also let r = 2, so that p = 4, q = 3 and r = 2. 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
3
2Fe + O2 −→ Fe2O3 ,
2
or
4Fe + 3O2 −→ 2Fe2O3 .
Example 1.3.2. : Ethane (C2 H6 ) burns in oxygen to produce carbon (IV) oxide CO2 and steam. The
steam condenses to form droplets of water viz;

C2 H6 + O2 −→ CO2 + H2 O,

balance the equation.


6 CHAPTER 1. BALANCING CHEMICAL EQUATIONS

Let the unknowns be p, q, r and s, such that

pC2 H6 + qO2 −→ rCO2 + sH2 O.

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:

C : 2p = r
H : 6p = 2s
O : 2q = 2r + s.

In homogeneous form,
   
  p 0
2 0 −1 0    
6 0 0 −2  q  = 0 .
 r  0
0 2 −2 −1
s 0
In the first step of elimination, replace row two by row two minus three times row one, i.e.,
R2 ↔ R2 − 3R1 to yield,
 
2 0 −1 0
∼ 0 0 3 −2 .
0 2 −2 −1
Exchange row two with row three or vice versa to reduce A to echelon form U,
 
2 0 −1 0
U = 0 2 −2 −1 .
0 0 3 −2

In the next set of operations that we will carry out to reduce U to R, we perform row oper-
ations 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., R2 ↔ 3R2 + 2R3 and replace row one with three times
row one plus row three (R1 ↔ 3R1 + R3 ) to yield
 
6 0 0 −2
∼ 0 6 0 −7
0 0 3 −2

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
1 0 0 − 31
 

R = 0 1 0 − 67  . (1.2)
2
0 0 1 −3
The solution to Ax = 0 reduces to Rx = 0 where x is actually the nullspace of A which is
equivalent to the nullspace of R. Hence,
 
 p
− 13  

1 0 0
q
0 1 0 − 76  
r = 0.
0 0 1 − 23 s
1.3. WORKED EXAMPLES 7

Upon expanding, we have

1 1
p− s = 0 or p= s
3 3
7 7
q− s = 0 or q= s
6 6
2 2
r− s = 0 or r = s,
3 3
the nullspace solution
  1
p 3
   
  7
q  
  6
x=
  =   s.
  
r 2
  3
   
s 1
There are three pivot variables p, q, r and one free variable s. Let s = 3, so that p = 1, q = 72
and r = 2. 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

7
C2 H6 + O2 −→ 2CO2 + 3H2 O.
2
Example 1.3.3. : Sodium hydroxide (NaOH) reacts with sulphuric acid (H2 SO4 ) to yield sodium
sulphate (Na2 SO4 ) and water,

NaOH + H2 SO4 −→ Na2 SO4 + H2O.

Balance the equation.

In balancing the equation, let p, q, r and s be the unknown variables such that

pNaOH + qH2 SO4 −→ rNa2 SO4 + sH2O.

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:

Na : p = 2r
O : p + 4q = 4r + s
H : p + 2q = 2s
S : 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

p − 2r = 0
p + 4q − 4r − s = 0
p + 2q − 2s = 0
q−r = 0,
8 CHAPTER 1. BALANCING CHEMICAL EQUATIONS

or     
1 0 −2 0 p 1 0 −2 0
1 4 −4 −1  q 
 
 = 0,
1 4 −4 −1
 where A= .
1 2 0 −2  r  1 2 0 −2
0 1 −1 0 s 0 1 −1 0
The augmented system becomes
 
1 0 −2 0 | 0
1 4 −4 −1 | 0
[A 0] =  .
1 2 0 −2 | 0
0 1 −1 0 | 0

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, R2 ↔ R2 − R1 . Similarly, replace row
three with row three minus row one i.e, R3 ↔ R3 − R1 . These first set of row operations
reduces A to  
1 0 −2 0
0 4 −2 −1
∼0 2 2 −2 .

0 1 −1 0
In the second set of row operations, we replace row three by two times row three minus
row two or R3 ↔ 2R3 − R2 and replace row four by four times row four minus row two or
R4 ↔ 4R4 − R2 to yield  
1 0 −2 0
0 4 −2 −1
∼ 0 0 6 −3 .

0 0 −2 1
In the third stage of the elimination process, we replace row four with 3 times row four plus
row three i.e, R4 ↔ 3R4 + R3 to yield the row echelon matrix or upper triangular U,
 
1 0 −2 0
0 4 −2 −1
U= 0 0 6 −3 .

0 0 0 0

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 R2 ↔ 41 R2 and R3 ↔ 61 R3 to obtain

1 0 −2 0
 
0 1 − 1 − 1 
∼ 2 4
0 0 1 − 1  .
2
0 0 0 0

Replace row one by row one plus two times row three i.e, R1 ↔ R1 + 2R3 and row two
by row two plus half row three, that is R2 ↔ R2 + 12 R3 . These two operations replaces all
nonzeros above the pivots to zero resulting in the row reduced echelon form R

1 0 0 −1
 
0 1 0 − 1 
R= 2
0 0 1 − 1  . (1.3)
2
0 0 0 0
1.3. WORKED EXAMPLES 9

The solution to Ax = 0 reduces to Rx = 0 where x is actually the nullspace of A which is


equivalent to the nullspace of R. Hence,
1 0 0 −1
  
p
0 1 0 − 1   q 
2  
0 0 1 − 1   r  = 0.

2
0 0 0 0 s

Upon expanding, we have


p−s = 0 or p=s
1 1
q− s = 0 or q= s
2 2
1 1
r− s = 0 or r = s,
2 2
the nullspace solution    
p 1
q  1 
x=  2
r = 1 s
2
s 1
There are three pivot variables p, q, r and one free variable s. We set s = 2, so that p = 2, q = 1
and r = 1. 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
2NaOH + H2 SO4 −→ Na2 SO4 + 2H2O.
Example 1.3.4. : Using row reduced echelon form, balance the following chemical reaction:
KHC8 H4O4 + KOH −→ K2 C8 H4O4 + H2O.
Let p, q, r and s be the unknown variables such that
pKHC8 H4O4 + qKOH −→ rK2 C8 H4O4 + sH2O.
We obtain the following set of equations for each of the elements:
K : p + q = 2r
H : 5p + q = 4r + 2s
C : 8p = 8r
O : 4p + q = 4r + s.
The corresponding matrix becomes
 
1 1 −2 0
5 1 −4 −2
A= .
8 0 −8 0 
4 1 −4 −1
The following row operations R2 ↔ R2 − 5R1 , R3 ↔ R3 − 8R1 and R4 ↔ R4 − 4R1 reduces
A to  
1 1 −2 0
0 −4 6 −2
∼0 −8 8
.
0 
0 −3 4 −1
10 CHAPTER 1. BALANCING CHEMICAL EQUATIONS

In the same vein, the following row operations R3 ↔ R3 − 2R2 and R4 ↔ 4R4 − 3R2 reduces
the above matrix to  
1 1 −2 0
0 −4 6 −2
∼0 0 −4 4  .

0 0 −2 2
Finally, R4 ↔ 2R4 − R3 reduces the matrix to echelon form
 
1 1 −2 0
0 −4 6 −2
U= 0 0 −4 4  .

0 0 0 0

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 R2 ↔ 4R2 + 6R3 , R1 ↔ 2R1 − R3 and R1 ↔ R1 + 81 R2 changes
the nonzero entries above the pivots to zero so that U reduces to
 
2 0 0 −2
0 −16 0 16 
∼ .
0 0 −4 4 
0 0 0 0

1 1
The row operations R1 ↔ 2 R1 , R2 ↔ − 16 R1 and R3 ↔ − 41 R1 leads to the row reduced
echelon form  
1 0 0 −1
0 1 0 −1
R= . (1.4)
0 0 1 −1
0 0 0 0
Therefore, the solution x to Rx = 0 becomes
   
p 1
 q  1
x=  r  = 1 s.
  

s 1

For simplicity, we equate s to one so that p = q = r = s = 1. This actually shows that the
equation was balanced in the first place.

1.4 Using Matlab or Octave rref function


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 inter-
change any of the row of each of the matrices in the four examples, the rref will be the same.

Example 1.4.1. : Type the matrix A = [1 0 − 2; 0 2 − 3] and R = rref(A). This gives the
same R as in (1.1) as  
1 0 −2
R= .
0 1 − 23
1.4. USING MATLAB OR OCTAVE RREF FUNCTION 11

Example 1.4.2. : A = [2 0 − 1 0; 6 0 0 − 2; 0 2 − 2 − 1] and R = rref(A). This


gives the same R as in (1.2) as
1 0 0 − 31
   
1 0 0 −0.3333
R = 0 1 0 −1.1667 = 0 1 0 − 76  .
0 0 1 −0.6667 0 0 1 − 23
Example 1.4.3. : A = [1 0 − 2 0; 1 4 − 4 − 1; 1 2 0 − 2; 0 1 −1 0] and
R = rref(A). This gives the same R as in (1.3) as
1 0 0 −1
 
0 1 0 − 1 
R= 2
0 0 1 − 1  .
2
0 0 0 0
Example 1.4.4. : A = [1 1 − 2 0; 5 1 − 4 − 2; 8 0 −8 0; 4 1 − 4 − 1] and
R = rref(A). This gives the same R as in (1.4) as
 
1 0 0 −1
0 1 0 −1
R= .
0 0 1 −1
0 0 0 0
In the next example, we illustrate the power of the rref command.
Example 1.4.5. : Consider balancing the following chemical reaction from [5]
NaCl + SO2 + H2O + O2 −→ Na2 SO4 + HCl.
Let the unknown coefficients be p, q, r, s, t, u such that
pNaCl + qSO2 + rH2O + sO2 −→ tNa2 SO4 + uHCl.
We write down the balance conditions on each element as
Sodium : p = 2t
Chlorine: p = u
Sulphur: q = t
Oxygen: 2q + r + 2s = 4t
Hydrogen: 2r = u.
After transposing, the above system of equations can be written in the form Ax = 0 as
 
  p
1 0 0 0 −2 0  
1 0 0 0 0 −1  q 
0 1 0 0 −1 0   r  = 0.
  
0 2 1 2 −4 0   s 
  
t
0 0 2 0 0 −1
u
Using Matlab or Octave R = rre f ( A) command, Ax = 0 reduces to Rx = 0 as
1
   
p
     
  p   1
1 0 0 0 0 −1   q  2 
0 1 0 0 0 −0.5    q    
   
  r   1
0 0 1 0 0 −0.5    = 0 or  r  =   u.
  s   2
0 0 0 1 0 −0.25      
t    
0 0 0 0 1 −0.5 s 1
u   4
   
t 1
2
12 CHAPTER 1. BALANCING CHEMICAL EQUATIONS

If we set u = 4, then p = 4, q = 2, r = 2, s = 1 and t = 2. The balanced equation becomes

4NaCl + 2SO2 + 2H2O + O2 −→ 2Na2 SO4 + 4HCl.


Chapter 2

Eigenvalues and Eigenvectors

Let A be an n by n matrix
Ax = λx

x 6= o is called the eigenvector corresponding to the eigenvalue λ

Ax = λIx
( A − λI ) x = o,
since x 6= o and ( A − λI ) x = o. This implies that A − λI must be singular and the solutions
x are infinitely many. Since (A − λI) is singular, its determinant must be zero. Hence
characteristic polynomial
= det( A − λI ) = | A − λI |
Eigenvalues are the roots of the characteristic polynomial. The Characteristic equation is
det( A − λI ) = 0. x is sometimes called a right eigenvector of A. The left eigenvector of A is
the eigenvector of A T . That is
A T y = λy, y 6= o
or
y T A = λy T .

2.0.1 How to find Eigenvalues and Eigenvectors


1. Find the characteristic polynomial = det( A − λI ) of A.

2. Find the roots of the characteristic polynomial.

3. For each eigenvalue, solve the equation ( A − λI ) x = o. Since the determinant is zero,
there are solutions other than x = o, those are the eigenvectors.

The set of all eigenvectors of A is called the eigenspace of A. It is often defined as the
nullspace of ( A − λI ).

Definition 2.0.1. When the characteristic polynomial of an n by n matrix is written in the form

det( A − λI ) = (λ1 − λ)m1 (λ2 − λ)m2 · · · (λq − λ)mq

with λi 6= λ j for 1 ≤ i 6= j ≤ q and m1 + m2 + m3 + · · · + mq = n, mi is called the algebraic


multiplicity of the eigenvalue λi . A simple eigenvalue is an eigenvalue of algebraic multiplicity one.

13
14 CHAPTER 2. EIGENVALUES AND EIGENVECTORS

Definition 2.0.2. Let vλ = nullspace( A − λI ). The dimension of the eigenspace vλ is its geometric
multiplicity.
Definition 2.0.3. If the algebraic multiplicity of A is greater than the geometric multiplicity, then
the matrix is defective.
Theorem 2.0.1. Nonzero eigenvectors belonging to district eigenvalues are linearly independent.
Proof. The proof is by induction: Let v1 , v2 , · · · , vk be nonzero eigenvectors of A. For k = 1,
this is immediate because an eigenvector cannot be zero, c1 v1 = o. Assume the result holds
for k − 1 eigenvalues. Consider the linear combination

c1 v1 + c2 v2 + · · · + ck−1 vk−1 + ck vk = o, (2.1)

where the ci0 s are scalars. Multiply (2.1) by the matrix A

A(c1 v1 + c2 v2 + · · · + ck−1 vk−1 ) = c1 Av1 + c2 Av2 + · · · + ck−1 Avk−1 + ck Avk


= c 1 λ 1 v 1 + c 2 λ 2 v 2 + · · · + c k −1 λ k −1 v k −1 + c k λ k v k = o
By multiplying (2.1) by λk , we also have c1 λk v1 + c2 λk v2 + · · · + ck−1 λk vk−1 + ck λk vk = o.
Subtract this from the previous equation,the term involving vk cancel and we are left with
the equation
c 1 ( λ 1 − λ k ) v 1 + · · · + c k −1 ( λ k −1 − λ k ) v k −1 = o
This is a linear combination of the first k − 1 eigenvectors. By the induction hypothesis, this
is true if all the coefficients are zero. That is

c1 (λ1 − λk ) = 0, c2 (λ2 − λk ) = 0, · · · , ck−1 (λk−1 − λk ) = 0.

Since the eigenvalues were assumed to be distinct, λ j 6= λk when j 6= k. This implies that
c1 = c2 = · · · = ck−1 = 0. By substituting this back into equation (2.1), ck vk = o and so
ck = 0. because vk 6= o. We have proved that (2.1) holds if and only if c1 = c2 = · · · = ck = 0
, which implies the linear independence of the eigenvectors v1 , v2 , · · · , vk−1 , vk .

Crucial
The general formula for the determinant of an n by n matrix entries aij :

det A = ∑(signπ )aπ(1),1.aπ(2),2 · · · aπ(n),n (2.2)


π

The sum is over all possible permutations π of the rows of A . The ’sign’ of the permutation,
written, sign π, equals the determinant of the corresponding permutation matrix P, so sign
π = det P = +1 If the permutation is composed of an even number of row exchanges and
−1, if composed of an odd number. For example, the six terms is the well known formula:
a11 a12 a13
a21 a22 a23 = a11 a22 a33 + a31 a12 a23 + a21 a32 a13 − a11 a32 a23 − a21 a12 a33 − a31 a22 a13 .
a31 a32 a33

For 3 by 3 determinant corresponds to the six possible permutations of a rowed matrix.


           
1 0 0 0 1 0 0 0 1 0 1 0 0 0 1 1 0 0
0 1 0 , 0 0 1 , 1 0 0 , 1 0 0 , 0 1 0 , 0 0 1 .
0 0 1 1 0 0 0 1 0 0 0 1 1 0 0 0 1 0
15

Theorem 2.0.2. (Characteristics Polynomials) Let A be n by n matrix . Then

(a). det( A − λI ) is a polynomial of exact degree n in the variable λ, this is called the characteristic
polynomial f A (λ) of A. The characteristics polynomial of A is

f A (λ) = det( A − λI ) = cn λn + cn−1 λn−1 + · · · + c1 λ + c0 (2.3)

(b). The coefficient of λn in f A (λ) equals (−1)n .

(c). The coefficient of λn−1 in f A (λ) equals (−1)n−1 tr ( A), Where tr ( A) (the trace of A) is the
sum of the entries on the main diagonal of A.

(d). The constant term of f A (λ) equals det A

(a). Let f A ( A) = det( A − λI ) = cn λn + cn−1 λn−1 + · · · + c1 λ + c0 .


 
a11 a12 · · · a1n
 a21 a22 · · · a2n 
A =  .. ..  .
 
..
 . . . 
an1 an2 · · · ann

Then  
a11 − λ a12 ··· a1n
 a21 a22 − λ · · · a2n 
| A − λI | =  .. .
 
.. ..
 . . . 
an1 an2 ··· ann − λ
The fact that f A (λ) is a polynomial of degree n is a consequence of the general determinental
formula (2.2) . Indeed, every term is prescribed by a permutation π of the rows of the matrix,
and equals plus or minus a product of n distinct matrix entries including one from each row
and one from each column. The term corresponding to the identity permutation is obtained
by multiplying the diagonal entries together, which in this case is

f A (λ) = det( A − λI ) (2.4)


= ( a11 − λ)( a22 − λ) · · · ( ann − λ) (2.5)
= (−1)n λn + (−1)n−1 ( a11 + a22 + · · · + ann )λn−1 + · · · (2.6)

All of the other terms have at most n − 2 diagonal factors aii − λ and so are polynomials of
degree less than or equal to n − 2 in λ.
(b). By comparing coefficients
cn = (−1)n
(c). cn = (−1)n−1 ( a11 + a22 + · · · + ann ) = (−1)n tr ( A)
(d). The constant term is any polynomial f (λ) can be found as f (0)
since f A (λ) = det( A − λI )
f A (0) = det( A − 0I ) = det A
Examples
  of Theorem 0.0.2
a b
A=
c d
det A = ad − bc
16 CHAPTER 2. EIGENVALUES AND EIGENVECTORS

tr ( A) = a + d

Characteristics Polynomial f (λ) = A − λI

a−λ b
=
c d−λ

Characteristics equation f (λ) = 0

= ( a − λ)(d − λ) − bc

= ad − aλ − dλ + λ2 − bc

= λ2 − ( a + d)λ + ad − bc

= λ2 − λtr ( A) + det( A)

( a+d)± ( a+d)2 −( ad−bc)
λ1,2 = 2
√ 2
tr ( A)± (trA) −det A
= 2

By the fundamental theorem of Algebra, every polynomial of degree n − 1 can be com-


pletely factored. We can write the characteristics polynomial in factored form.

f A (λ) = (−1)n (λ − λ1 )(λ − λ2 ) · · · (λ − λn ) (2.7)

The numbers λ1 , λ2 , · · · , λn , some of which may be repeated are the roots of the characteris-
tic equation f A (λ) = 0 , and hence the eigenvalues of the matrix A.

Observe that:

f A (0) = (−1)n (0 − λ1 )(0 − λ2 ) · · · (0 − λn )

= (−1)2n (λ1 , λ2 , · · · , λn )

= λ1 , λ2 , · · · , λ n ∀n ∈ N

If we multiply out (2.7) explicitly and equate the result to the characteristic polynomial (??)
, we find that its coefficients

c n = λ1 , λ2 , · · · , λ n , cn−1 = (−1)n−1 (λ1 + λ2 + · · · + λn ).

Comparison with our previous formulae for the coefffients c0 and cn−1 leads to the following
result.

Theorem
The sum of the eigenvalues of a matrix equals its trace.
2.1. EIGENVECTORS AND DIAGONALIZABILITY 17

λ1 + λ2 + · · · + λn = tr ( A) = a11 + a22 + · · · + ann

The product of the eigenvalues equals its determinant


λ1 , λ2 , · · · , λn = det A

Theorem 2.0.3. (Cayley - Hamilton Theorem)


Every matrix is a zero of its characteristic polynomial. //
Proof: Assignment
 
1 3
Example : A =
2 1
f A (λ) = det( A − λI ) = λ2 − 2λ − 5

A is a zero of f A (λ) since

f A (λ) =
 2      
1 3 1 3 1 0 0 0
−2 −5 =
2 1 2 1 0 1 0 0

2.1 EIGENVECTORS AND DIAGONALIZABILITY


A square matrix A is said to be diagonalizable if there exists a nonsingular matrix S and a
diagonal matrix

Λ = diag(λ1 , λ2 , · · · , λn ) such that


 
λ1
−1
 λ2 
S AS = Λ =  ,
 
..
 . 
λn
or equivalently A = SΛS−1 .

Note : We call S the ”eigenvector matrix” and Λ the ” eigenvalue matrix”.

Theorem 2.1.1. Let A be a square n by n matrix with n linearly independent eigenvectors. If these
eigenvectors are the columns of a matrix S, then S−1 ΛS is a diagonal matrix Λ . The eigenvalues of
A are on the diagonal of Λ:

Proof. S is formed by putting the eigenvectors xi in its column. compute AS by columns:


     
AS = A x1 x2 · · · x n = Ax1 Ax2 · · · Ax n = λ1 x1 λ2 x2 · · · λn x n .
18 CHAPTER 2. EIGENVALUES AND EIGENVECTORS

Now, we split the last matrix into SΛ via


 
λ1
    λ2 
λ1 x 1 λ2 x 2 · · · λn x n = x1 x2 · · · xn  .
 
..
 . 
λn

Therefore; AS = SΛ or S−1 AS = Λ or A = SΛS−1 . S is invertible because its columns (the


eigenvectors) were assumed to be linearly independent.

Remarks

1. If the matrix A has no repeated eigenvalues.


the eigenvalues λ1 , λ2 , · · · λn are distinct, then its n eigenvectors are automatically indepen-
dent. Any matrix with distinct eigenvalues can be diagonalized.

2. The diagonalizing matris S is not unique.

3. Not all matrices are diagonalizable

4. Defective matrices are not diagonalizable. The standard example of a ” defective ma-
trix ” is
 
0 1
Its eigenvalues are λ1 = λ2 = 0 , since it is triangular with zeros on the diagonal:
0 0
 
−λ 1
det( A − λ) = det = λ2
0 −λ
 
1
All eigenvectors of A are multiples of the vectors
0
     
0 1 0 c
x= or x=
0 0 0 0

Its algebraic multiplicity is 2 but geometric multiplicity is one. It is not diagonalizable.

Examples
 
1 −1
1. A = λ1 = 2, λ2 = 3
2 4
   
1 1
x1 = and x2 =
−1 −2
 
1 1
S=
−1 −2

     
2 1 1 −1 1 1 2 0
S−1 AS = =
−1 1 2 4 −1 2 0 3
2.1. EIGENVECTORS AND DIAGONALIZABILITY 19

 
0 −1
2. K = ; det(k − λI ) = λ2 + 1 = 0 λ1 = i and λ2 = − i
1 0
    
− i −1 a 0
( k − λ1 I ) x 1 = =
1 −i b 0

− ai − b = o,

a − ib = 0 =⇒ a = ib
 
1
x1 =
−i

Similarly;
    
i −1 a 0
( k − λ2 I ) x 2 = =
1 i b 0
 
1
x2 =
i
   
1 1 −1 i 0
S= and S KS =
−i i 0 −i

 
0 −1 −1
3. A = 1 2 1 ; det(k − λI ) = −λ3 + 4λ2 − 5λ + 2 = −(λ − 12 )(λ − 2) = 0
1 1 2
λ1 = λ2 = 1 and λ3 = 2
     
−1 −1 −1
x 1 =  1 , x2 =  0  and x3 =  1 
0 1 1

The eigenvector matrix


   
−1 −1 −1 −1 0 −1
S= 1 0 1  and S−1 = −1 −1 0 
0 1 1 1 1 1

     
−1 0 −1 0 −1 −1 −1 −1 −1 1 0 0
S−1 AS = −1 −1 0 1 2 1  1 0 1  = 0 1 0
1 1 1 1 1 2 0 1 1 0 0 2
20 CHAPTER 2. EIGENVALUES AND EIGENVECTORS

2.2 POWERS OF MATRICES : Ak


The eigenvalues of A2 are λ2 1 , λ2 2 , · · · , λ2 n are every eigenvector of A is also an eigenvector
of A2 . If Ax = λx, A2 x = A( Ax ) = A(λx ) = λAx = λ(λx ) = λ2 x. Thus λ2 is an eigenvalue
of A2 with the same eigenvector x . The same result can be obtained by diagonalization.
Eigenvalues of A2

(S−1 AS)(S−1 AS) = (Λ)(Λ) = (Λ)2

λ1 2
 
 λ2 2 
( S −1 A 2 S ) = ( Λ )2 = 
 
.. 
 . 
λn 2
or
A2 = (SΛS−1 )(SΛS−1 ) = SΛ(S−1 S)ΛS−1 = (SΛ)(ΛS−1 ) = SΛ2 S−1

In the same vein

Ak = (SΛS−1 )(SΛS−1 )(SΛS−1 ) · · · (SΛS−1 )

= SΛ(S−1 S)Λ(S−1 S)Λ(S−1 S) · · · (SΛS−1 )

Each S−1 cancels an S except for the first S and the Last S−1
=⇒
Ak = SΛk S−1
.

HOMEWORK
 
4 3
If A= then Find A100 by diagonalizing A.
1 2
2.2. POWERS OF MATRICES : AK 21

TUTORIAL TWO
1. Find the eigenvalues and eigenvectors of the following matrices

1 − 32
       
1 −2 3 1 1 2
( a ). A = ( b ). F = 1 1 ( c ). ( d ).
−2 1 2 −6
−1 1 −1 1

 
  4 0 0 0  
3 −1 0  1 2 −1 −1
 −1 2 −1 3 0 0
( e ). ( f ). 
 −1 1
 ( g ). A =  −2 1 1 
2 0
0 −1 3 1 0 1
1 −1 1 1

 
0 c −b
( h ).  − c 0 a 
b −a 0
2(a). Find the eigenvalues of the rotation matrix
 
cos θ − sin θ
R=
sin θ cos θ
2(b). For what values of θ are the eigenvalues real.

2(c). Repeat 2(a) for  


cos θ sin θ
F=
sin θ − cos θ
22 CHAPTER 2. EIGENVALUES AND EIGENVECTORS

TUTORIAL THREE
(1). Choose a, b, c such that det( A − λI ) = 9λ − λ3 . Then the eigenvalues are −3, c, 3
 
0 1 0
A = 0 0 1
a b c
(2). Compute the eigenvalues and corresponding eigenvectors of
 
1 4 4
A = 3 −1 0
0 2 3
(b). Compute the trace of A and check that it equals the sum of the eigenvalues.

(c). Find the determinant of A and check that it is equal to the product of the eigenval-
ues

(3). Suppose that λ is an eigenvalue of A.

(a). Prove that cλ is an eigenvalue of cA

(b). Prove that λ + d is an eigenvalue of A + dI

(c). More generally, cλ + d is an eigenvalue of B = cA + dI for scalers c and d.

(d). Prove that if λ 6= 0 is a nonzero eigenvalue of A , then 1


λ is an eigenvalue of A−1

(e). In (d) above, what happens if A has 0 as an eigenvalue


 
a b
(4). Let A = be a 2 by 2 matrix.
c d
(a). Prove that A satisfies its own characteristic equation, meaning

f A ( A) = A2 − Atr ( A) + det( A) I = 0

((trA) I − A)
(b). Prove the inverse formula; A−1 = det A
 
2 1
(c). Check the Cayley-Hamitton theorem for A =
−3 2
2.2. POWERS OF MATRICES : AK 23

TUTORIAL FOUR
5
Diagonalize
 the
 following matrices
 and find A .  
3 −9 5 −4 −4 −2
(1). (2). A = (3). K =
2 −6 2 −1 5 2
 
    0 0 1 0
−2 3 1 3 3 5 0 0 0 1
(4). A =  0 1 6 (5). C =  5 6 5  (6). K=
1

0 0 0
0 0 3 −5 −8 −7
0 1 0 0
 
2 1 −1 0  
 −3 −2 0 2 5 5
1 
(7). A=
 0
 (8). B = 0 2 0 
0 1 2 
0 −5 −3
0 0 1 −1

Diagonalize the following complex matrices


 
    −i 0 1
i 1 2−i 2+i  − i 1 −1
1 i 3−i 1+i
1 0 −i
24 CHAPTER 2. EIGENVALUES AND EIGENVECTORS
References

[1] Gabriel C. I and Onwuka G. I: Balancing of Chemical Equations using Matrix Algebra.
Journal of Natural Sciences Research, Vol3, No. 5, 29–36, 2015.

[2] Risteski I. B: Journal of the Chinese Chemical Society, 56: 65–79, 2009.

[3] Roa C. N. R: University General Chemistry: An introduction to Chemistry science.


Rajiv Beri for Macmillian India Ltd, 17–41, 2007.

[4] Lay D. C: Linear Algebra and its Applications, 17–120, 2006.

[5] Tuckerman M. E: http://www.nyu.edu/classes/tuckerman/adv.chem/lectures/lecture 2/node3.


2011.

[6] Hill J. W., Mecreary T. W., Kolb D. K: Chemistry for changing times. Pearson Education
Inc., 123–143, 2000.

[7] Hutchings L., Peterson L., Almasude A: The Journal of Mathematics and Science: Col-
laborative Explorations 9: 119–133, 2007.

[8] Guo C: Journal of Chemical Education Vol74, 13-65, 1997.

[9] Ben Noble, James W. Daniel : Applied Linear Algebra, Third Edition pp. 90–97, 103, 140–
149, 1988.

25

You might also like