Lecture 4

22
2 3 3 2 2 2 2 1 11 SO a O Fe a O FeS a 3 2 3 1 2 1 2 3 22 2 2 a a a a a a 22 2 3 0 0 0 2 0 0 2 3 2 1 3 2 1 3 2 1 a a a a a a a a a 22 0 0 2 3 0 1 0 2 0 2 1 3 2 1 a a a Lecture 4 The Gauß scheme A linear system of equations 22 2 3 0 0 0 2 0 0 2 3 1 2 1 3 3 2 1 3 2 2 1 a a a a a a a a a a a a Matrix algebra deals essentially with linear linear systems. Multiplicative elements. A non-linear system Solving simple stoichiometric equations n n a a a a a u u u u x ... 3 3 2 2 1 1 0

description

Lecture 4. Solving simple stoichiometric equations. A linear system of equations. The Gauß scheme. Multiplicative elements . A non-linear system. Matrix algebra deals essentially with linear linear systems. Solving a linear system. - PowerPoint PPT Presentation

Transcript of Lecture 4

Page 1: Lecture  4

23322221 11 SOaOFeaOFeSa

32

31

21

23222

2

aaaaaa

22230002002

321

321

321

aaaaaaaaa

2200

230102021

3

2

1

aaa

Lecture 4

The Gauß scheme A linear system of equations

22230002002

3121

3321

3221

aaaaaaaaaaaa

Matrix algebra deals essentially with linear linear systems.

Multiplicative elements.A non-linear system

Solving simple stoichiometric equations

nnaaaaa uuuux ...3322110

Page 2: Lecture  4

2

1

222121

212111

2

1

2221

1211 ;

cc

babababa

bb

aaaa

CBA

BA

2221

1211

2

1

2

1 /aaaa

bb

cc

BC

2221212

2121111

babacbabac

The division through a vector or a matrix is not defined!

2 equations and four unknowns

230102021

/2200

3

2

1

aaa

Solving a linear system

2200

230102021

3

2

1

aaa

Page 3: Lecture  4

4321

A

4221

A

23412 22410

122122112221

1211

2221

1211

aaaaaaaa

Det

aaaa

AA

A

Det A: determinant of A

A B1 2 3 1 2 34 5 6 2 4 63 2 3 7 8 9

Det A -6 Det B 0

A B1 2 3 1 2 34 8 6 4 5 67 14 9 6 9 12

Det A 0 Det B 0

The determinant of linear dependent matrices is zero.

Such matrices are called singular.

Determinants

ihgfedcba

A

Page 4: Lecture  4

n

jijij

ji SubMa1

det)1(det AA

Higher order determinants

4221

;6231

;6432

8721

;9731

;9832

8742

;9762

;9864

987642321

333231

232221

131211

SubMASubMASubMA

SubMASubMASubMA

SubMASubMASubMA

A

for any i =1 to n

0)2*24*1(9)3*26*1(8)4*46*2(7)2*72*1(6)3*79*1(4)3*89*2(2)4*78*2(3)6*79*2(2)6*89*4(1det

A

The matrix is linear dependent

The number of operations raises with the faculty of n.

Laplace formula

Page 5: Lecture  4
Page 6: Lecture  4

For a non-singular square matrix the inverse is defined as

IAAIAA

1

1

987642321

A

1296654321

A

r2=2r1 r3=2r1+r2

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.

nnkkkk VVVVV ...332211

A linear combination of vectors

A matrix is singular if it’s determinant is zero.

122122112221

1211

2221

1211

aaaaaaaa

Det

aaaa

AA

A

Det A: determinant of AA matrix is singular if at least one of the parameters k is not zero.

Page 7: Lecture  4

The augmented matrix

619877364254321

):(617354

;987642321

BACBAAugm

The trace of a square matrix is the sum of its diagonal entries.

14941987642321

1

n

iiiaTrace A

An insect species at three locations has the following abundances

per season

348452587460345605010

A

2.056.055.034.005.025.025.02.01.034.04.03.0

B

The predation rates per season are given by

60.7340.7

43.9ABC

4.2812.426.8716.605.6675.29

'

The diagonal entries (trace) of the dot product of AB’ contain

the total numbers of insects per site kept by predators

Page 8: Lecture  4

1112

2122

21122211

1

2212

2111

1aaaa

aaaa

aaaa

A

A

(A•B)-1 = B-1 •A-1 ≠ A-1 •B-1

nn

nn

a

a

a

a

aa

1...00............

0...10

0...01

...00............0...00...0

22

11

1

22

11

A

A

Determinant

The inverse of a 2x2 matrix The inverse of a diagonal matrix

The inverse of a square matrix only exists if its determinant differs from zero.

Singular matrices do not have an inverse

The inverse can be unequivocally calculated by the Gauss-Jordan algorithm

Page 9: Lecture  4

12521043

yxyx

Systems of linear equations

285714.24*25*310*212*3;285714.0

4*25*34*125*10

yx

122122112221

1211

2221

1211 aaaaaaaa

Detaaaa

Determinant

;;12212211

2111

2221

1211

21

11

12212211

1222

2221

1211

22

12

aaaaxaya

aaaa

Det

yaxa

Dety

aaaayaxa

aaaa

Det

ayax

Detx

Page 10: Lecture  4

2200

230102021

230102021

230102021 1

3

2

1

3

2

1

3

2

11

aaa

aaa

aaa

I

Solving a simple linear system

23222 82114 SOOFeOFeS

23322221 11 SOaOFeaOFeSa

Page 11: Lecture  4

BAXIAA

BAAXABAX

1

1

11

XXIIX

I

1...00............0...100...01

Identity matrix

Only possible if A is not singular.If A is singular the system has no solution.

The general solution of a linear system

13.25.091283310423

zyxzyxzyx

Systems with a unique solution

The number of independent equations equals the number of unknowns.

3.25.09833423

13.25.091283310423

X: Not singular 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

0678.05627.43819.0

11210

3.25.09833423 1

zyx

Page 12: Lecture  4

987642321

A

1296654321

A

A matrix is linear independent if none of the row or column vectors can be expressed by a linear combinations of the remaining vectors

r2=2r1 r3=2r1+r2

The matrices are linear dependent

nnkkkk VVVVA ...332211

A linear combination of vectors

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.

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.

0...,,0......

321

332211332211

n

nnnn

kkkkkkkkkkkk VVVVVVVV

Linear independence

Page 13: Lecture  4

How to detect linear dependency

02

2

0202

0724

712

0712

76

0)72

7(963

0)72

7(842

09630842072

987642321

3

12

21

21

21

21

21

2121

2121

321

321

321

k

kk

kk

kkkk

kk

kk

kkkk

kkkk

kkkkkkkkk

A

Any solution of k3=0 and k1=-2k2 satisfies the above equations. The matrix is linear dependent.

The rank of a matrix is the maximum number of linearly independent row and column vectors

2987642321

ARank 2

1296654321

ARank 1

322416816128486424321

ARank

If a matrix A is linearly independent, then any submatrix of A is also linearly independent

000

01419011

0191101410

0)32(9870)32(642

098706420132

987642132

3

2

1

1121

21

2121

2121

321

321

321

kkk

kkkkkk

kkkkkkkk

kkkkkkkkk

A

Page 14: Lecture  4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

a 2a a 2a 52a 3a 2a 3a 63a 4a 4a 3a 75a 6a 7a 8a 8

Page 15: Lecture  4

1 2 3 4 1

1 2 3 4 2

31 2 3 4

41 2 3 4

1 2 3 4

1 2 3 4

1 2 3

2x 6x 5x 9x 10 x2 6 5 9 102x 5x 6x 7x 12 x2 5 6 7 12

x4x 4x 7x 6x 14 4 4 7 6 145 3 8 5 16x5x 3x 8x 5x 16

2x 3x 4x 5x 104x 6x 8x 10x 204x 5x 6x

1

2

34

41 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4

x2 3 4 5 10x4 6 8 10 20x7x 14 4 5 6 7 14

5 6 7 8 16x5x 6x 7x 8x 16

2x 3x 4x 5x 10 2 3 4 54x 6x 8x 10x 12 4 6 8 104x 5x 6x 7x 14 4 5 6 7

5 6 75x 6x 7x 8x 16

1

2

3

4

11 2 3 4

21 2 3 4

31 2 3 4

4

1 2 3 4

1

x 10x 12x 14

8 16x

x2x 3x 6x 9x 10 2 3 6 9 10

x2x 4x 5x 6x 12 2 4 5 6 12

x4 5 4 7 144x 5x 4x 7x 14

x

2x 3x 4x 5x 104x

1

2 3 42

1 2 3 43

1 2 3 44

1 2 3 4

1 2 3 4

1 2

102 3 4 5x

6x 8x 10x 12 124 6 8 10x

4x 5x 6x 7x 14 144 5 6 7x

165 6 7 85x 6x 7x 8x 16x

1610 12 14 1610x 12x 14x 16x 16

2x 3x 4x 5x 104x 6x 8

1

3 42

1 2 3 43

1 2 3 44

1 2 3 4

102 3 4 5x

x 10x 12 124 6 8 10x

4x 5x 6x 7x 14 144 5 6 7x

165 6 7 85x 6x 7x 8x 16x

3210 12 14 1610x 12x 14x 16x 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

Infinite number of solutions

No solution

Infinite number of solutions

No solution

Infinite number of solutions

Page 16: Lecture  4

1 1 1A X B A A X A B X A B

Consistent systemSolutions extist

rank(A) = rank(A:B)

Multiplesolutions extist

rank(A) < n

Singlesolution extists

rank(A) = n

Inconsistent systemNo solutions

rank(A) < rank(A:B)

Page 17: Lecture  4

OHnKClnKClOnClnKOHn 25433221

432

51

531

431

223

nnnnn

nnnnnn

We have only four equations but five unknowns. The system is underdetermined.

0223

0

432

51

531

431

nnnnn

nnnnnn

5

4

3

2

1

0210

1120000103011101

n

nnnn

n1 n2 n3 n4 A1 0 -1 -1 01 0 -3 0 11 0 0 0 20 2 -1 -1 0

Inverse N*n50 0 1 0 2 n1 6

-0.5 0 0.5 0.5 1 n2 30 -0.33333 0.333333 0 0.333333 n3 1-1 0.333333 0.666667 0 1.666667 n4 5

n5 3

The missing value is found by dividing the vector through its smallest values to find the smallest solution for natural numbers.

OHKClKClOClKOH 232 3536

Page 18: Lecture  4

111059847635432211 aaaaaaaaaaa BrMgnHNnHSinBrHNnSiMgn

11552

739442

8432

6321

10511

ananananan

anananananan

111

1110

98

67

534

21

2)1(4

4

2

aaaaaaaa

aaaaa

Equality of atoms involved

Including information on the valences of elements

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.

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.

Page 19: Lecture  4

00400000000

1110987654321

1000000000121000000000004100000000400140000000000011100000000000125000002000004030002000004000002000000030000105000000001

aaaaaaaaaaa

nnnnn

nnnn

nn

11552

739442

8432

6321

10511

ananananan

anananananan

111

1110

98

67

534

21

2)1(4

4

2

aaaaaaaa

aaaaa

The matrix is singular because a1, a7, and a10 do not contain new informationMatrix algebra helps to determine what information is needed for an unequivocal information.

111059847635432211 aaaaaaaaaaa BrMgnHNnHSinBrHNnSiMgn

From the knowledge of the salts we get n1 to n5

Page 20: Lecture  4

111059847635432211 aaaaaaaaaaa BrMgnHNnHSinBrHNnSiMgn

29875432 244 MgBrHNSiHBrHNSiMg aaaaaa

3144

44

3

9

8

5

974

83

534

aaa

aaaaa

aaa

311000

100000010000000100401040010001000113

9

8

7

5

4

3

aaaaaa

a3 a4 a5 a7 a8 a9 Aa3 -3 1 -1 0 0 0 0a4 1 0 0 0 -1 0 0a5 0 4 0 -1 0 -4 0a7 0 0 1 0 0 0 1a8 0 0 0 0 1 0 1a9 0 0 0 0 0 1 3

Inverse 0 1 0 0 1 0 a3 11 3 0 1 3 0 a4 40 0 0 1 0 0 a5 14 12 -1 4 12 -4 a7 40 0 0 0 1 0 a8 10 0 0 0 0 1 a9 3

We have six variables and six equations that are not contradictory and contain different information.The matrix is therefore not singular.

23442 244 MgBrNHSiHBrNHSiMg

Page 21: Lecture  4

Linear models in biology

cNKrrNN 2

t N1 12 53

154

45

cKrr

cKrr

cKrr

2251530

25510

114

The logistic model of population growth

cKrr/

1225151155111

30104

36036.0/286.1 K

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.

We need four measurements

Page 22: Lecture  4

N

t

K Overshot

We have an overshot. In the next time step the population should decrease below the carrying capacity.

Population growth

679.236286.1286.1 2 NNN

t N N1 1 3.9285712 4.928571 8.1477773 13.07635 13.38424 26.46055 11.693545 38.15409 -0.256696 37.8974 0.1104827 38.00788 -0.046988 37.96091 0.020089 37.98099 -0.0085610 37.97242 0.003656

679.236286.1286.1)1(

)()()1(

2

NNNtN

tNtNtNK/2

Fastest population growth