Lecture 3 Matrix algebra Species Taxon Guild M ean length (mm) Site 1 Site 2 Site 3 Site 4 Nanoptilium kunzei (H eer,1841) Ptiliidae N ecrophagous 0.60 0 0 0 0 A crotrichis dispar (M atthew s,1865) Ptiliidae N ecrophagous 0.65 13 0 4 7 A crotrichis silvatica R osskothen,1935 Ptiliidae N ecrophagous 0.80 16 0 2 0 A crotrichis rugulosa R osskothen,1935 Ptiliidae N ecrophagous 0.90 0 0 1 0 A crotrichis grandicollis (Mannerheim,1844) Ptiliidae N ecrophagous 0.95 1 0 0 1 A crotrichis fratercula (M atthew s,1878) Ptiliidae N ecrophagous 1.00 0 1 0 0 C arcinops pumilio (Erichson,1834) H isteridae Predator 2.15 1 0 0 0 S aprinus aeneus (Fabricius,1775) H isteridae Predator 3.00 13 23 4 9 G nathoncus nannetensis (Marseul,1862) H isteridae Predator 3.10 0 0 0 2 Margarinotus carbonarius (Hoffmann,1803) H isteridae Predator 3.60 0 5 0 0 R ugilus erichsonii (Fauvel,1867) Staphylinidae Predator 3.75 8 0 5 0 Margarinotus ventralis (Marseul,1854) H isteridae Predator 4.00 3 2 6 1 S aprinus planiusculus M otschulsky,1849 H isteridae Predator 4.45 0 5 0 0 Margarinotus merdarius (Hoffmann,1803) H isteridae Predator 4.50 5 0 6 0 A vector can be interpreted as a file of data A matrix is a collection of vectors and can be interpreted as a data base The red matrix contain three column vectors Handling biological data is most easily done with a matrix approach. An Excel worksheet is a matrix.
30
Embed
Lecture 3 Matrix algebra A vector can be interpreted as a file of data A matrix is a collection of vectors and can be interpreted as a data base The red.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Assume you have production data (in tons) of winter wheat (15 t), summer wheat (20 t), and barley (30 t). In the next year weather condition reduced the winter wheat production
by 20%, the summer wheat production by 10% and the barley production by 30%. How many tons do you get the next year?
(15*0.8 + 20* 0.9 + 30 * 0.7) t = 51 t.
0.8
P 15 20 30 0.9 15*0.8 20*0.9 30*0.7 51
0.7
1 n
1 n i ii 1
n
b
A B a ... a ... a b scalar
b
The dot product is only defined for matrices, where the number of columns in the first matrix equals the number of rows in the second matrix.
We add another year and ask how many cereals we get if the second year is good and gives 10 % more of winter wheat, 20 % more of summer wheat and 25 % more of barley. For
both years we start counting with the original data and get a vector with one row that is the result of a two step process
Assume you are studying a contagious disease. You identified as small group of 4 persons infected by the disease.
These 4 persons contacted in a given time with another group of 5 persons. The latter 5 persons had contact with other persons, say with 6, and so on. How often did a person
of group C indirectly contact with a person of group A?
0010
1000
1001
0010
1101
A
A1 2 3 4
B
12345
00010
00010
11000
11000
00010
10001
B
B1 2 3 4 5
C
123456
0010
0010
1010
1010
0010
1111
0010
1000
1001
0010
1101
00010
00010
11000
11000
00010
10001
ABC
A1 2 3 4
C
123456
We eliminate group B and leave the first and last group.
No. 1 of group C indirectly contacted with all members of group A.No. 2 of group A indirectly contacted with all six persons of group C.
23322221 11 SOaOFeaOFeSa
32
31
21
2322
2
2
aa
aa
aa
22230
002
002
321
321
321
aaa
aaa
aaa
22
0
0
230
102
021
3
2
1
a
a
a
Lecture 4
The Gauß scheme A linear system of equations
22230
002
002
3121
3321
3221
aaaa
aaaa
aaaa
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 ;
c
c
baba
baba
b
b
aa
aa
CBA
BA
2221
1211
2
1
2
1 /aa
aa
b
b
c
c
BC
2221212
2121111
babac
babac
The division through a vector or a matrix is not defined!
2 equations and four unknowns
230
102
021
/
22
0
0
3
2
1
a
a
a
Solving a linear system
22
0
0
230
102
021
3
2
1
a
a
a
For a non-singular square matrix the inverse is defined as
IAA
IAA
1
1
987
642
321
A
1296
654
321
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
aaaaaa
aaDet
aa
aa
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
1aa
aa
aaaa
aa
aa
A
A
(A•B)-1 = B-1 •A-1 ≠ A-1 •B-1
nn
nn
a
a
a
a
a
a
1...00
............
0...1
0
0...01
...00
............
0...0
0...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
The Nine Chapters on the Mathematical Art.(1000BC-100AD). Systems of linear equations, Gaussian elimination
Does the mutation process result in stable allele frequencies?
NAN Stable state vectorEigenvector of A
0)(
0
NIA
NAN
NAN
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 DN can be modelled by the sum of constant production g and concentration
dependent breakdown fN.
01
0
g
fN
NgfN
At equilibrium we have
010
011
0
0
01
1
00111
2
2
2
2
g
f
N
N
g
f
N
N
Ng
fNN TT
The 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.
1
12
2
N
ND
The symmetric and square matrix D that contains squared values is called the dispersion matrix
The glycogen concentration at equilibrium:
fg
Nequi 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ΛAU
UΛΛU
If L 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
dkp
c
dkp
c
dkpp
d
d
d
d
N
p
p
p
p
cdkcdkcdk
cdkcdkcdk
cdkcdkcdk
cdkcdkcdk
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 u
Internet pages are ranked according to probability to be reached