Lecture 4
Solving simple stoichiometric equations
a1FeS2 11O2 a2 Fe2O3 a3SO2
a1 2a2
a1 2a2 0a3 0
2a1 a3
2a1 0a2 a3 0
22 3a2 2a3
0a1 3a2 2a3 22
The Gauß scheme
A linear system of equations
1 2 0 a1 0
2 0 1 a 2 0
0 3
2 a3 22
a1a2 2a2 0a3 0
2a1 0a2 a3 a3 0
0a1 3a2 2a1a3 22
Multiplicative elements.
A non-linear system
Matrix algebra deals essentially with linear linear systems.
x a0 a1u1 a2u2 a3u3 ... anun
Solving a linear system
1 2 0 a1 0
2 0 1 a 2 0
0 3
2 a3 22
a1 0 1 2 0
a 2 0 / 2 0 1
a 22 0 3
2
3
The division through a vector or a matrix is not defined!
a11 a12
b1
; B
A
a
a
22
21
b2
a11b1 a12b2
c1
C
A B
a
b
a
b
21 1 22 2
c2
C c1 b1 a11 a12
/
B c2 b2 a21 a22
c1 a11b1 a12b2
c2 a21b1 a22b2
2 equations and four unknowns
Determinants
1 2
A
3
4
1 2
A
2
4
2 1 4 3 2
a
A 11
a21
a12
a22
a
DetA A 11
a21
0 1 4 2 2
a
A d
g
a12
a11a22 a21a12
a22
b
e
h
c
f
i
Det A: determinant of A
A
B
1
4
3
The determinant of linear
dependent matrices is zero.
Such matrices are called singular.
Det A
2
5
2
3
6
3
-6
Det B
A
2
4
8
3
6
9
0
B
1
4
7
Det A
1
2
7
2
8
14
0
3
6
9
1
4
6
Det B
2
5
9
0
3
6
12
Higher order determinants
det A (1)i j aij detSubMAij
n
for any i =1 to n
Laplace formula
j 1
1 2 3
A 2 4 6
7 8 9
4
SubMA11
8
6
2
; SubMA12
9
7
2 3
1
; SubMA22
SubMA21
8 9
7
2 3
1
; SubMA32
SubMA31
4 6
2
6
2
; SubMA13
9
7
3
1
; SubMA23
9
7
4
8
2
8
3
1 2
; SubMA33
6
2
4
det A 1(4 * 9 8 * 6) 2(2 * 9 7 * 6) 3(2 * 8 7 * 4) 2(2 * 9 8 * 3) 4(1* 9 7 * 3) 6(1* 2 7 * 2)
7(2 * 6 4 * 4) 8(1* 6 2 * 3) 9(1* 4 2 * 2) 0
The matrix is linear dependent
The number of operations raises with the faculty of n.
For a non-singular square matrix
the inverse is defined as
A A 1 I
A 1 A I
A matrix is singular if it’s
determinant is zero.
a
A 11
a21
a12
a22
a
DetA A 11
a21
Singular matrices are those where some rows or
columns can be expressed by a linear
combination of others.
Such columns or rows do not contain additional
information.
They are redundant.
1 2 3
A 2 4 6
7 8 9
r2=2r1
a12
a11a22 a21a12
a22
Det A: determinant of A
1 2 3
A 4 5 6
6 9 12
r3=2r1+r2
A linear combination of vectors
V k1V1 k2V2 k3V3 ... kn Vn
A matrix is singular if at least one
of the parameters k is not zero.
The augmented matrix
1 2 3
4 5
1 2 3 4 5
Augm A 2 4 6 ; B 3 7 C ( A : B) 2 4 6 3 7
7 8 9
1 6
7 8 9 1 6
The trace of a square matrix is the sum of its diagonal entries.
An insect species at
three locations has the
following abundances
per season
1 2 3 n
Trace A 2 4 6 aii 1 4 9 14
7 8 9 i 1
The diagonal entries (trace) of
the dot product of AB’ contain
The predation rates per
the total numbers of insects
season are given by
per site kept by predators
0.3 0.4 0.34 0.1
10 50 60 5
B 0.2 0.25 0.25 0.05
A 34 60 74 8
0.34 0.55 0.56 0.2
25 45 48 3
43.9 29.75 66.5
C AB' 60.16 40.7 87.6
42.12 28.4 60.73
The inverse of a 2x2 matrix
a
A 11
a12
a21
a22
a22
1
A
a11a22 a12 a21 a12
Determinant
1
a21
a11
The inverse of a square matrix only exists
if its determinant differs from zero.
Singular matrices do not have an inverse
The inverse of a diagonal matrix
a11
0
A
...
0
1
a11
0
1
A
...
0
0
0
... ...
... ann
0 ...
a22 ...
...
0
0
1
a22
...
0
0
... 0
... ...
1
...
ann
...
(A•B)-1 = B-1 •A-1 ≠ A-1 •B-1
The inverse can be unequivocally calculated by the Gauss-Jordan algorithm
Systems of linear equations
3 x 4 y 10
2 x 5 y 12
x
10 * 5 12 * 4
3 *12 2 *10
0.285714 ; y
2.285714
3*5 2 * 4
3*5 2 * 4
Determinant
a12
a11 a12
a
Det 11
a11a22 a21a12
a21 a22
a21 a22
x a12
a11 x
Det
Det
y a22 xa22 ya12 ; y
a21 y a11 y a21 x ;
x
a12 a11a22 a21a12
a12 a11a22 a21a12
a
a
Det 11
Det 11
a21 a22
a21 a22
Solving a simple linear system
1
a1FeS2 11O2 a2 Fe2O3 a3SO2
1
1 2 0 1 2 0 a1 a1 a1 1 2 0 0
2 0 1 2 0 1 a 2 I a 2 a 2 2 0 1 0
0 3
2 0 3
2 a3 a3 a3 0 3
2 22
4FeS2 11O2 2Fe2O3 8SO2
The general solution of a linear system
1 0 ...
0 1 ...
A 1A I
Identity matrix I
... ... ...
1
XA B
0 0 ...
Only possible if A is not singular.
IX XI X
If A is singular the system has no solution.
AX B A 1AX A 1B
3x 2 y 4 z 10
3x 3 y 8 z 12
9 x 0.5 y 2.3z 1
Systems with a unique solution
The number of independent equations
equals the number of unknowns.
2
4
3
3
8
3
9 0.5 2.3
1
0
0
...
1
2
4
3
3
8
3
9 0.5 2.3
X: Not singular
10 x 0.3819
12 y 4.5627
1 z 0.0678
2
4 10
3
3
8 12
3
9 0 .5 2 .3 1
The augmented matrix Xaug
is not singular and has the
same rank as X.
The rank of a matrix is
minimum number of
rows/columns of the largest
non-singular submatrix
A matrix is linear independent if none of the row or column vectors can be
expressed by a linear combinations of the remaining vectors
A linear combination of vectors
A k1V1 k2V2 k3V3 ... kn Vn
A matrix of n-vectors (row or columns) is called linear dependent if it is possible to express
one of the vectors by a linear combination of the other n-1 vectors.
1 2 3
A 2 4 6
7 8 9
r2=2r1
1 2 3
A 4 5 6
6 9 12
r3=2r1+r2
The matrices are linear dependent
If a vector V of a matrix is linear dependent on the other vecors, V does not contain additional
information. It is completely defined by the other vectors. The vector V is redundant.
k1V1 k2 V2 k3V3 ... kn Vn k1V1 k2 V2 k3V3 ... kn Vn 0
k1 , k2 , k3 ...kn 0
Linear independence
How to detect linear dependency
k 1 0
2 3 1 2k1 3k 2 1k3 0
2k1 4k 2 6(2k1 3k 2 ) 0 10k1 14k 2 0
190
A 2 4 6 2k1 4k 2 6k3 0
11k1
k1 0 k 2 0
7
k
8
k
9
(
2
k
3
k
)
0
11
k
19
k
0
14
1
2
1
2
1
2
7 8 9 7k 8k 9k 0
k3 0
1
2
3
k 1 2k 2
k 2k
6k1 12k 2
k1 2k 2 7k3 0
1 2 3
2k1 4k 2 8( 1 2 ) 0
0
k
2
k
0
k
2
7
7
7
A 2 4 6 2k1 4k 2 8k3 0
7
1
k2 1
k 2k
12k1 24k 2
2
7 8 9 3k 6k 9k 0 3k1 6k 2 9( 1 2 ) 0
0 k1 2k 2 0
k
0
1
2
3
3
7
7
7
7
Any solution of k3=0 and k1=-2k2 satisfies the above equations. The matrix is linear
dependent.
If a matrix A is linearly independent, then any submatrix of A is also linearly independent
The rank of a matrix is the maximum number of
linearly independent row and column vectors
1 2 3
1 2 3
RankA 2 4 6 2 RankA 4 5 6 2
7 8 9
6 9 12
1 2 3 4
2 4 6 8
RankA
1
4 8 12 16
8 16 24 32
a1 2a 2 a 3 2a 4 5
2a1 3a 2 2a 3 3a 4 6
3a1 4a 2 4a 3 3a 4 7
5a1 6a 2 7a 3 8a 4 8
2x1 6x 2 5x 3 9x 4 10 2
2x1 5x 2 6x 3 7x 4 12
2
4x1 4x 2 7x 3 6x 4 14 4
5x1 3x 2 8x 3 5x 4 16
5
2x1 3x 2 4x 3 5x 4 10 2
4x1 6x 2 8x 3 10x 4 20
4
4x1 5x 2 6x 3 7x 4 14 4
5x1 6x 2 7x 3 8x 4 16
5
6
5
5
6
4
7
3
8
3
9 x1
7 x2
6 x3
5
x4
4
10
12
14
16
x1
x2
7 x3
8
x4
5
Infinite number of 6solutions
8 10
5
6
6
7
3
No solution
6
4
8
5
6
6
7
2x1 3x 2 4x 3 5x 4 10 2
4x1 6x 2 8x 3 10x 4 12
4
4x1 5x 2 6x 3 7x 4 14 4
5x1 6x 2 7x 3 8x 4 16
5
2x1 3x 2 6x 3 9x 4 10 2
2x1 4x 2 5x 3 6x 4 12 2
4x1 5x 2 4x 3 7x 4 14
4
3
5 x1
10 x 2
7 x3
8
x4
10
20
14
16
10
12
14
16
x1
9
10
x2
5 6
12
x3
14
4 7
x
4
3
4
5
10
x1
12
6
8
10
x2
14
5
6
7
x3
6
7
8
16
x
4
16
12 14 16
6
Infinite number of4 solutions
5
2x1 3x 2 4x 3 5x 4 10
2
4x1 6x 2 8x 3 10x 4 12
4
4x1 5x 2 6x 3 7x 4 14
4
5
5x1 6x 2 7x 3 8x 4 16
10x1 12x 2 14x 3 16x 4 16
10
No solution
2x1 3x 2 4x 3 5x 4 10
2
4x1 6x 2 8x 3 10x 4 12
4
4x1 5x 2 6x 3 7x 4 14
4
5
5x1 6x 2 7x 3 8x 4 16
10x1 12x 2 14x 3 16x 4 32
10
3
4
6
8
5
6
6
12
7
14
Infinite number of solutions
5
x1
10
x2
7
x3
8
x
4
16
10
12
14
16
32
Consistent
Rank(A) = rank(A:B) = n
Consistent
Rank(A) = rank(A:B) < n
Inconsistent
Rank(A) < rank(A:B)
Consistent
Rank(A) = rank(A:B) < n
Inconsistent
Rank(A) < rank(A:B)
Consistent
Rank(A) = rank(A:B) = n
A X B A 1 A X A 1 B X A 1 B
Consistent system
Solutions extist
rank(A) = rank(A:B)
Single
solution extists
rank(A) = n
Inconsistent system
No solutions
rank(A) < rank(A:B)
Multiple
solutions extist
rank(A) < n
n1KOH n2Cl2 n3 KClO3 n4 KCl n5 H 2O
n1 n3 n4
n1 n3 n4 0
n1 3n3 n5
n1 3n3 n5
n1 2n5
n1 2n5
2n2 n3 n4
2n2 n3 n4 0
We have only four
equations but five
unknowns.
The system is
underdetermined.
n1
1
1
1
0
Inverse
0
-0.5
0
-1
n2
0
0
0
2
n3
-1
-3
0
-1
0
1
0
0.5
-0.33333 0.333333
0.333333 0.666667
1
1
1
0
n4
-1
0
0
-1
0
0.5
0
0
1 1 n1 0
0 3 0 n2 1
n5
0 0
0 n3
2
2 1 1 n4 0
0
A
0
1
2
0
N*n5
2
1
0.333333
1.666667
n1
n2
n3
n4
n5
6
3
1
5
3
The missing value is found by dividing the vector through its
smallest values to find the smallest solution for natural numbers.
6KOH 3Cl2 KClO3 5KCl 3H 2O
n1Mga1Sia 2 n2 Na3 H a 4Bra5 n3Sia6 H a7 n4 Na8 H a9 n5 Mga10 Bra11
Equality of
atoms involved
n1a1 n5 a10
n1a2 n3 a6
n2 a3 n4 a8
n2 a4 n4 a9 n3 a7
n2 a5 n5 a11
Including
information on
the valences of
elements
a1 2a2
a4 a3 a5
a7 4 a 6
a8 4(a9 1)
a10 2a11
We have 16 unknows but without
experminetnal information only 11 equations.
Such a system is underdefined.
A system with n unknowns needs at least n
independent and non-contradictory equations
for a unique solution.
a1 a11
If ni and ai are unknowns we have a non-linear situation.
We either determine ni or ai or mixed variables such that no multiplications occur.
n1a1 n5 a10
n1a2 n3 a6
n2 a3 n4 a8
n2 a4 n4 a9 n3 a7
n2 a5 n5 a11
a1 2a2
a4 a3 a5
a7 4 a 6
a8 4(a9 1)
a10 2a11
a1 a11
0
n1 0 0 0 0
n1 0 0 0 0 n3
0 0 n2 0 0
0
0
0 0 0 n2 0
0 0 0 0 n2
0
2 1 0 0 0
0
0 0 1 1 1 0
0 0 0 0 0 4
0
0 0 0 0 0
0 0 0 0 0
0
0
1 0 0 0 0
0
0
0
n5
0 a1 0
0
0
0
0
0 a 2 0
0
0
n4
0
0 a3 0
0 n3
0
n4
0 a 4 0
0
0
0
0
n5 a5 0
0
0
0
0
0 a6 0
0
0
0
0
0 a7 0
1
0
0
4
0 a8 0
0
1
4
0
0 a9 4
0
0
0
1
2 a10 0
0
0
0
0
1 a11 0
The matrix is singular because a1, a7, and a10 do
not contain new information
Matrix algebra helps to determine what information is needed
for an unequivocal information.
n1Mga1Sia 2 n2 Na3 H a 4Bra5 n3Sia6 H a7 n4 Na8 H a9 n5 Mga10 Bra11
From the knowledge of the salts we get n1 to n5
n1Mga1Sia 2 n2 Na3 H a 4Bra5 n3Sia6 H a7 n4 Na8 H a9 n5 Mga10 Bra11
Mg2 Si 4Na3 H a 4Bra5 SiHa7 4Na8 H a9 2MgBr2
a4 3a3 a5
a3 a8
4 a 4 a 7 4 a9
4a5 4
a8 1
a9 3
3
1
0
0
0
0
1 1
0
0
4
0
0
1
0
0
0
0
a3
a4
a5
a7
a8
a9
Inverse
0 a3 0
0 1 0 a4 0
1 0 4 a5 0
0 0
0 a7 1
0 1
0 a8 1
0 0
1 a9 3
0
0
We have six variables and six
equations that are not
contradictory and contain
different information.
The matrix is therefore not
singular.
a3
-3
1
0
0
0
0
a4
1
0
4
0
0
0
a5
-1
0
0
1
0
0
a7
0
0
-1
0
0
0
a8
0
-1
0
0
1
0
a9
0
0
-4
0
0
1
0
1
0
4
0
0
1
3
0
12
0
0
0
0
0
-1
0
0
0
1
1
4
0
0
1
3
0
12
1
0
0
0
0
-4
0
1
A
0
0
0
1
1
3
a3
a4
a5
a7
a8
a9
Mg2 Si 4NH 4Br SiH4 4NH 3 2MgBr2
1
4
1
4
1
3
Linear models in biology
The logistic model of population growth
r 2
N rN N c
K
t
1
2
3
4
N
1
5
15
45
We need four
measurements
r
4 1r 1 c
K
r
10 5r 25 c
K
r
30 15r 225 c
K
1 1 r
4 1
10 5 15 1 r / K
30 15 225 1 c
K denotes the maximum possible density
under resource limitation, the carrying
capacity.
r denotes the intrinsic population growth
rate. If r > 1 the population growths, at r < 1
the population shrinks.
K 1.286 / 0.036 36
Population growth
N 1.286 N
t
1
2
3
4
5
6
7
8
9
10
1.286 2
N 2.679
36
N
1
4.928571
13.07635
26.46055
38.15409
37.8974
38.00788
37.96091
37.98099
37.97242
N
3.928571
8.147777
13.3842
11.69354
-0.25669
0.110482
-0.04698
0.02008
-0.00856
0.003656
We have an overshot.
In the next time step the population should
decrease below the carrying capacity.
N
K
Overshot
K/2
N (t 1) N (t ) N (t )
N (t 1) N 1.286N
1.286 2
N 2.679
36
Fastest
population
growth
t