Presentation is loading. Please wait.

Presentation is loading. Please wait.

Matrix Algebra and Applications

Similar presentations


Presentation on theme: "Matrix Algebra and Applications"— Presentation transcript:

1 Matrix Algebra and Applications
Mathematical Biology Matrix Algebra and Applications Nik Cunniffe Department of Plant Sciences

2 Lecture One Topic : Introduction to matrix algebra
Outline: ) Biological context of these lectures 2) Elementary aspects of matrix algebra - what is a matrix? - special types of matrix - linear combinations of matrices - matrix multiplication - properties of matrix multiplication

3 These lectures Focus on two commonly used model frameworks
- discrete time Markov chains - structured population models Iterated matrix-vector products are used to solve both Requires certain aspects of matrix algebra Some of you may have studied matrices before, but unlikely to have gone as far with the theory (please see first few lectures as revision if you studied matrices at A level) Will focus on the problems first, but before that a timetable…

4 Timetable for these lectures
This block has 7 lectures and 2 practicals Both practicals are examples classes There are no assessed practicals this term No practical class today…first is Thursday 3rd May First four and a half lectures are on matrix theory… …applications to biology in final pair of lectures

5 Discrete time Markov chains
Models of stochastic processes (i.e. include randomness) Model tracks the probability of being in each of a particular set of states at each timestep Discrete time => change every day, month, year, … Markov => probability of transition between states depends only on the current state (i.e. no memory) Very widely used as simple model of a random processes

6 Discrete time Markov chains
Example: take-all epidemics (fungal root disease of wheat) Question: what is the probability of a take-all epidemic in successive years of wheat monoculture? Infected wheat roots (withered and blackened) Patch of infected wheat plants (yellow)

7 Modelling take-all epidemics
Track disease state of a field in successive years via two probabilities - qm = p(no epidemic in year m) - rm = p(an epidemic in year m) Biology summarised via state diagram which shows transitions If no epidemic this year then the probability of no epidemic next year is equal to 0.9 No epidemic this year doesn’t always mean there will definitely not be epidemic next year (since, for e.g. disease can be brought in on tools) Epidemic this year is not always followed by epidemic in the next (inoculum will be in the soil, but weather might be unsuitable)

8 Modelling take-all epidemics
Questions (given an initial state): What is the probability of an epidemic next year? In five years? In the long term?

9 Dynamics of annual plants
Model probability in year m of a particular patch of habitat being empty or being occupied by individual of species one or of species two e.g. if species one a good coloniser, this probability will be large… …compared to this one Three state model: matrices allow same generic theory to be used for absolutely any number of states

10 Models of structured populations
Big assumption in Michaelmas term was that populations are homogeneous (i.e. all members the same) Clearly a simplification, as individuals can be categorised, e.g. - by gender - by relative fitness - by age/stage in life cycle Category affects p(survival) and number of offspring Earlier assumption of homogeneity can be relaxed We concentrate on models in discrete time (for organisms with separated generations)

11 Modelling bird populations
Obvious distinction between juveniles and adults Model tracks numbers of each in year m Only adult birds reproduce Adults have different year to year survival probability than juvenile birds

12 Modelling bird populations
Questions (given initial state): What is the population size next year? In five years? Does the population grow or decline in the long term? How does the ratio of juveniles to adults change over time?

13 Matrices Just a set of numbers organised into a table
Size (“dimension”) is number of rows x numbers of columns - A is a “2 x 2 matrix” - B is a “2 x 3 matrix” Notation: individual elements denoted by lower case - aij is the element in ith row and jth column of A - (for e.g. a12 = 2, b13 = 3000, b31 just doesn’t exist) - (we shall rarely need to worry about notation too much)

14 Special Matrices Square matrix - number of rows = number of columns
Identity matrix - square matrix with all elements zero, apart from ones down the leading diagonal 3) Column matrix (aka a “vector”) - a matrix with only one column - denoted by bold (typed), underlined (written) 4) Zero matrix - every single element is zero

15 Matrix addition/subtraction
To find (for e.g.) P + Q, Q – P, just add/subtract corresponding elements of the two matrices NOTE: CAN ONLY ADD OR SUBTRACT A PAIR OF MATRICES IF THEY ARE THE SAME SIZE (e.g. P and R are different sizes, so P + R is not defined)

16 Scalar matrix multiplication, e.g. what is 10R?
Multiply each element in turn by the scalar

17 Linear Combinations of Matrices
Combination of scalar multiplication and addition, e.g.

18 Matrix matrix multiplication
Multiplication is a bit more involved. Consider two matrices There is a formal definition (given for completeness in notes) However, don’t focus on this - will explain the method

19 Matrix matrix multiplication
See OHP for some examples

20 Algebra of matrix multiplication
See Examples Sheet for some examples

21 Matrix vector multiplication
See OHP for an example

22 Lecture Two Topic : Determinants and linear equations
Outline : 1) Solutions of linear equations 2) Define determinant of a square matrix - 2 x 2 - 3 x 3 3) How does solution of Av = b relate to the determinant of A and the value of b?

23 A matrix vector equation is just a set of linear simultaneous equations and vice versa
A matrix vector equation like Av = b is just a set of linear simultaneous equations A set of linear simultaneous equations is just a matrix vector equation of the form Av = b Note that going from simultaneous equations to Av = b is crucial for us (since want to write models in this form) See OHP for examples

24 Simultaneous equations to matrix vector equation

25 Determinant of a 2x2 matrix

26 Determinant of a 3x3 matrix

27 Solutions of equations


Download ppt "Matrix Algebra and Applications"

Similar presentations


Ads by Google