26
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

Lecture 4

  • Upload
    sydnee

  • View
    54

  • Download
    0

Embed Size (px)

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

Citation preview

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

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

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.

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

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

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

zyxzyx

zyxSystems 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

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)

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

1 11

2

3

4

11

2

3

4

a1 2 1 2 1 2 1 2 1 2 1 2 5a2 3 2 3 2 3 2 3 2 3 2 3 6a3 4 4 3 3 4 4 3 3 4 4 3 7a5 6 7 8 5 6 7 8 5 6 7 8 8

a 1 2 1 2 5a 2 3 2 3 6a 3 4 4 3 7a 5 6 7 8 8

8765

8765344332322121

8765344332322121

4

3

2

1

4321

4321

4321

4321

aaaa

aaaaaaaaaaaaaaaa

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

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

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

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.

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

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

Linear models in biology

cNKrrNN 2

t N1 12 53

154

45

cKrr

cKrr

cKrr

2251530

25510

114

The logistic model of population growth

cKr

r/

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

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

The transition matrix

Assume a gene with four different alleles. Each allele can mutate into anther allele.The mutation probabilities can be measured.

991.0003.0002.0001.0004.0995.0003.0001.0004.0001.0994.0001.0001.0001.0001.0997.0

A→A B→A C→A D→A

Sum 1 1 11

Transition matrixProbability matrix

1.03.02.04.0

Initial allele frequencies

What are the frequencies in the next generation?

A→A

A→BA→CA→D

1008.0991.0*1.0003.0*3.0002.0*2.0001.0*4.0)1(2999.0004.0*1.0995.0*3.0003.0*2.0001.0*4.0)1(1999.0004.0*1.0001.0*3.0994.0*2.0001.0*4.0)1(3994.0001.0*1.0001.0*3.0001.0*2.0997.0*4.0)1(

tDtCtBtA

)()()()(

991.0003.0002.0001.0004.0995.0003.0001.0004.0001.0994.0001.0001.0001.0001.0997.0

)1()1()1()1(

tDtCtBtA

tDtCtBtA

Σ = 1

The frequencies at time t+1 do only depent on the frequencies at time t but not on earlier ones.Markov process)()1( tt PFF

A B C D EigenvaluesA 0.997 0.001 0.001 0.001 0.988697B 0.001 0.994 0.001 0.004 0.992303C 0.001 0.003 0.995 0.004 0.996D 0.001 0.002 0.003 0.991 1

Eigenvectors0 0 0.842927 0.48866

0.555069 0.780106 -0.18732 0.438110.241044 -0.5988 -0.46829 0.65716-0.79611 -0.1813 -0.18732 0.3707

)()()()(

991.0003.0002.0001.0004.0995.0003.0001.0004.0001.0994.0001.0001.0001.0001.0997.0

)()()()(

)1()1()1()1(

tDtCtBtA

tDtCtBtA

tDtCtBtA

Does the mutation process result in stable allele frequencies?

NAN Stable state vectorEigenvector of A

0)(0

NIANANNAN

Eigenvalue Unit matrix Eigenvector

The largest eigenvalue defines the stable state vector

Every probability matrix has at least one eigenvalue = 1.

gfNN

The insulin – glycogen systemAt high blood glucose levels insulin stimulates glycogen synthesis and inhibits

glycogen breakdown.

The change in glycogen concentration N can be modelled by the sum of constant production g and concentration

dependent breakdown fN.

01

0

gf

N

NgfN

At equilibrium we have

01001

10

0

01

1

00111

2

2

2

2

gf

NN

gf

NN

Ngf

NN TTThe vector {-f,g} is the stationary state vector (the largest eigenvector) of the dispersion matrix and

gives the equilibrium conditions (stationary point).

The value -1 is the eigenvalue of this system.

112

2

NN

DThe symmetric and square matrix D that contains squared values is called the dispersion matrix

The glycogen concentration at equilibrium:

fgNequi

The equilbrium concentration does not depend on the initial concentrations

A matrix with n columns has n eigenvalues and n eigenvectors.

Some properties of eigenvectors

11

UUAAUUUΛAUUΛΛU

If is the diagonal matrix of eigenvalues:

The product of all eigenvalues equals the

determinant of a matrix.

n

i i1det A

The determinant is zero if at least one of the eigenvalues is zero.

In this case the matrix is singular.

The eigenvectors of symmetric matrices are orthogonal

0':)(

UUA symmetric

Eigenvectors do not change after a matrix is multiplied by a scalar k.

Eigenvalues are also multiplied by k.

0][][ uIkkAuIA

If A is trianagular or diagonal the eigenvalues of A are the diagonal

entries of A.A Eigenvalues

2 3 -1 3 23 2 -6 3

4 -5 45 5

Page Rank

Google sorts internet pages according to a ranking of websites based on the probablitites to be directled to this page.

Assume a surfer clicks with probability d to a certain website A. Having N sites in the world (30 to 50 bilion) the probability to reach A is d/N.Assume further we have four site A, B, C, D, with links to A. Assume further the four sites have cA, cB, cC, and cD links and kA, kB, kC, and kD links to A. If the probability to be on one of these sites is pA, pB, pC, and pD, the probability to reach A from any of the sites is therefore

D

ADD

C

ACC

B

ABBA c

dkpc

dkpc

dkpp

dddd

Npppp

cdkcdkcdkcdkcdkcdkcdkcdkcdkcdkcdkcdk

D

C

B

A

CDCBDBADA

DCDCBBACA

DBDCBCABA

DADCACBAB

1

1////1////1////1

Google uses a fixed value of d=0.15. Needed is the number of links per website.

Probability matrix P Rank vector uInternet pages are ranked according to probability to be reached

C

CC

B

BB

A

AAD

D

DD

B

BB

A

AAC

D

DD

C

CC

A

AAB

D

DD

C

CC

B

BBA

cdkp

cdkp

cdkp

Ndp

cdkp

cdkp

cdkp

Ndp

cdkp

cdkp

cdkp

Ndp

cdkp

cdkp

cdkp

Ndp

The total probability to reach A is

D

ADD

C

ACC

B

ABBA c

dkpc

dkpc

dkpp

D

ADD

C

ACC

B

ABBA c

dkpc

dkpc

dkpNdp

15.015.015.015.0

41

1000075.0115.00075.015.0115.00001

D

C

B

A

pppp

PA 1 0 0 0 0.0375B -0.15 1 -0.15 -0.075 0.0375C 0 -0.15 1 -0.075 0.0375D 0 0 0 1 0.0375

P-1

1 0 0 0 A 0.03750.153453 1.023018 0.153453 0.088235 B 0.0531810.023018 0.153453 1.023018 0.088235 C 0.04829

0 0 0 1 D 0.0375

A B

C D

Larry Page (1973-

Sergej Brin (1973-

Page Rank as an eigenvector problem

15.015.015.015.0

41

1000075.0115.00075.015.0115.00001

D

C

B

A

pppp In reality the

constant is very small

0

1000010000100001

0000075.0015.00075.015.0015.00000

0

1000075.0115.00075.015.0115.00001

D

C

B

A

D

C

B

A

pppp

pppp

The final page rank is given by the stationary state vector (the vector of the largest eigenvalue).

A B C D EigenvaluesA 0 0 0 0 -0.15 0B -0.15 0 -0.15 -0.075 0 0C 0 -0.15 0 -0.075 0 0D 0 0 0 0 0.15 0

Eigenvectors0 0.707107 0.408248 0

0.707107 0 0.408248 0.707110.707107 -0.70711 0 -0.7071

0 0 -0.8165 0

Home work and literatureRefresh:

• Linear equations• Inverse• Stochiometric equations

Prepare to the next lecture:

• Arithmetic, geometric series• Limits of functions• Sums of series• Asymptotes

Literature:

Mathe-onlineAsymptotes: www.nvcc.edu/home/.../MTH%20163%20Asymptotes%20Tutorial.pphttp://www.freemathhelp.com/asymptotes.htmlLimits:Pauls’s online mathhttp://tutorial.math.lamar.edu/Classes/CalcI/limitsIntro.aspxSums of series:http://en.wikipedia.org/wiki/List_of_mathematical_serieshttp://en.wikipedia.org/wiki/Series_(mathematics)