Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1 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. Short recapitulation of matrix basics

2 The first subscript denotes rows, the second columns. n and m define the dimension of a matrix. A has m rows and n columns. Column vector Row vector The symmetric matrix is a matrix where A n,m = A m,n. The diagonal matrix is a square and symmetrical. Unit matrix I is a matrix with one row and one column. It is a scalar (ordinary number).

3 For a non-singular square matrix the inverse is defined as r 2 =2r 1 r 3 =2r 1 +r 2 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. A linear combination of vectors A matrix is singular if it’s determinant is zero. Det A: determinant of A A matrix is singular if at least one of the parameters k is not zero. (AB) -1 = B -1 A -1 ≠ A -1 B -1 Determinant The inverse of a 2x2 matrix

4 Addition and subtraction Scalar product The inner or dot product Basic rule of matrix multiplication

5 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 Systems with a unique solution The number of independent equations equals the number of unknowns. X: Not singular

6 SpeciesAspilota sp2Aspilota sp5 19813.80.7 19823.50.5 19836.60 19845.82.3 19850.80 198626.813.4 198718.35.8 Aspilota sp2Aspilota sp5 DNDNN-N 2 DNN-N 2 -0.33.8-14.44-0.20.7-0.49 3.13.5-12.25-0.50.5-0.25 -0.86.6-43.562.300 -55.8-33.64-2.32.3-5.29 260.8-0.6413.400 -8.526.8-718.24-7.613.4-179.56 Transpose 3.83.56.65.80.826.8 -14.44-12.25-43.56-33.64-0.64-718.24 XTXXTX 822.77-19829.7 519256.8 (X T X) -1 0.0152670.000583 2.42E-05 XTYXTY -231.57 6257.805 rK 0.113086.90785 r/K0.01637 rK -1.001930.9025 r/K-0.03242 Aspilota sp2 Aspilota sp5 Both species have low reproductive rate r. They are prone to fast extinction. The general solution of a linear system

7 Orthogonal vectors The dot product of two orthogonal vectors is zero. If the orthogonal vectors have unity length they are called orthonormal. A system of n orthogonal vectors spans an n-dimensional hypervolume (a Cartesian system) In ecological modelling orthogonal vectors are of particular importance. They define linearly independent variables. Orthogonal matrix Multiplying an orthogonal matrix with its transpose gives the identity matrix. The transpose of an orthogonal system is identical to its inverse. d=1 Y=sin(  ) X=cos(  )

8 X Y How to transform vector A into vector B? A B Multiplication of a vector with a square matrix defines a new vector that points to a different direction. The matrix defines a transformation in space X Y A B Image transformation X contains all the information necesssary to transform the image The vectors that don’t change during transformation are the eigenvectors. In general we define U is the eigenvector and the eigenvalue of the square matrix X Eigenvalues and eigenvectors

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

10 Some properties of eigenvectors If  is the diagonal matrix of eigenvalues: The product of all eigenvalues equals the determinant of a matrix. 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 Eigenvectors do not change after a matrix is multiplied by a scalar k. Eigenvalues are also multiplied by k. If A is trianagular or diagonal the eigenvalues of A are the diagonal entries of A.

11 ABCDE A12345 B21432 C34134 D43314 E52441 A-4.37578 B-3.49099 C-2.20138 D0.347457 E14.72069 Eigenvalues of M ABCDE A0.4389840.6290650.0072980.4439620.46305 B-0.290980.442618-0.25089-0.720950.369735 C0.435137-0.377790.56955-0.374550.450844 D0.127886-0.50284-0.712510.1216990.456425 E-0.71898-0.113130.3239580.3578090.487132 ABCDE A11.39E-176.11E-163.89E-161.22E-15 B1.39E-1712.29E-16-3.5E-161.25E-16 C6.11E-162.29E-1611.39E-16-5E-16 D3.89E-16-3.5E-161.39E-161-6.1E-16 E1.22E-151.25E-16-5E-16-6.1E-161 Matrix M Eigenvectors U of M UTUUTU U T U = I The largest eigenvalue is associated with the left (dominant) eigenvector

12 XY 7.4927298.299247 3.7947096.668841 7.1889774.655068 5.19220910.10163 3.3584933.759326 0.5430670.14555 8.1056769.83781 3.0941054.885297 7.3926734.35569 2.2254431.044779 9.7486836.69628 2.8318381.591056 8.6024636.500477 2.9771854.208492 3.57815.697605 2.7302091.499851 7.1223618.562652 5.7712157.354506 2.7407511.532767 5.7411112.285576 0.3010840.052058 XY X10.7218 Y 1 Correlation matrix Eigenvalues 0.2782 1.7218 EV1EV2 0.707 -0.7070.707 Xmean Ymean 1 2 The eigenvectors define the major axes of the data. The eigenvalues define the length of the eigenvalues A geometrical interpretation of eigenvalues

13 XY X10.7218 Y 1 Correlation matrix Eigenvalues 0.2782 1.7218 The eigenvalues of a correlation similarity matrix are linearly linked to the coefficients of correlation. Xmean The eigenvector ellipse

14 Eigenvectors and information content A matrix is a data base that contains an amount of information. Left and right sides of an equation contain the same amount of information The eigenvectors take over the information content of the data base (the matrix) The eigenvalues define ow much information contains each eigenvector. The eigenvalue is a measure of correlation. The squared eigenvalue is therefore a measure of the variance explained by the associated eigenvector. The eigenvector of the largest eigenvalue is called the dominant eigenvector and contains the largest part of information of the associated data base.


Download ppt "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."

Similar presentations


Ads by Google