MATH Mathematics for Agriculture II

Similar documents
Linear Algebra: Lecture Notes. Dr Rachel Quinlan School of Mathematics, Statistics and Applied Mathematics NUI Galway

[ Here 21 is the dot product of (3, 1, 2, 5) with (2, 3, 1, 2), and 31 is the dot product of

Matrix operations Linear Algebra with Computer Science Application

Chapter 2 Notes, Linear Algebra 5e Lay

1 Matrices and matrix algebra

Finite Mathematics Chapter 2. where a, b, c, d, h, and k are real numbers and neither a and b nor c and d are both zero.

10. Linear Systems of ODEs, Matrix multiplication, superposition principle (parts of sections )

MATRICES AND MATRIX OPERATIONS

Chapter 1: Systems of linear equations and matrices. Section 1.1: Introduction to systems of linear equations

A FIRST COURSE IN LINEAR ALGEBRA. An Open Text by Ken Kuttler. Matrix Arithmetic

Linear Equations in Linear Algebra

We could express the left side as a sum of vectors and obtain the Vector Form of a Linear System: a 12 a x n. a m2

Matrix Algebra. Learning Objectives. Size of Matrix

Prepared by: M. S. KumarSwamy, TGT(Maths) Page

Matrices. Chapter Definitions and Notations

Linear Algebra review Powers of a diagonalizable matrix Spectral decomposition

Linear Algebra. The analysis of many models in the social sciences reduces to the study of systems of equations.

Math 360 Linear Algebra Fall Class Notes. a a a a a a. a a a

Introduction. Vectors and Matrices. Vectors [1] Vectors [2]

INSTITIÚID TEICNEOLAÍOCHTA CHEATHARLACH INSTITUTE OF TECHNOLOGY CARLOW MATRICES

Math Lecture 3 Notes

Review Let A, B, and C be matrices of the same size, and let r and s be scalars. Then

2.1 Matrices. 3 5 Solve for the variables in the following matrix equation.

Systems of Linear Equations and Matrices

Section 12.4 Algebra of Matrices

Matrix Algebra Determinant, Inverse matrix. Matrices. A. Fabretti. Mathematics 2 A.Y. 2015/2016. A. Fabretti Matrices

Systems of Linear Equations and Matrices

Linear Algebra and Matrix Inversion

Inverting Matrices. 1 Properties of Transpose. 2 Matrix Algebra. P. Danziger 3.2, 3.3

Matrices. 1 a a2 1 b b 2 1 c c π

Matrix Multiplication

x + 2y + 3z = 8 x + 3y = 7 x + 2z = 3

CLASS 12 ALGEBRA OF MATRICES

Fundamentals of Engineering Analysis (650163)

For comments, corrections, etc Please contact Ahnaf Abbas: Sharjah Institute of Technology. Matrices Handout #8.

Linear Algebra March 16, 2019

Chapter. Algebra techniques. Syllabus Content A Basic Mathematics 10% Basic algebraic techniques and the solution of equations.

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 1 x 2. x n 8 (4) 3 4 2

Elementary maths for GMT

ICS 6N Computational Linear Algebra Matrix Algebra

Matrix Operations. Linear Combination Vector Algebra Angle Between Vectors Projections and Reflections Equality of matrices, Augmented Matrix

Math 343 Midterm I Fall 2006 sections 002 and 003 Instructor: Scott Glasgow

Matrices and Determinants

1300 Linear Algebra and Vector Geometry

3 Matrix Algebra. 3.1 Operations on matrices

Math Bootcamp An p-dimensional vector is p numbers put together. Written as. x 1 x =. x p

Matrix Algebra 2.1 MATRIX OPERATIONS Pearson Education, Inc.

6.1 Matrices. Definition: A Matrix A is a rectangular array of the form. A 11 A 12 A 1n A 21. A 2n. A m1 A m2 A mn A 22.

MATH 2030: MATRICES. Example 0.2. Q:Define A 1 =, A. 3 4 A: We wish to find c 1, c 2, and c 3 such that. c 1 + c c

Instruction: Operations with Matrices ( ) ( ) log 8 log 25 = If the corresponding elements do not equal, then the matrices are not equal.

All of my class notes can be found at

Introduction to Matrix Algebra

Matrix Arithmetic. j=1

Things we can already do with matrices. Unit II - Matrix arithmetic. Defining the matrix product. Things that fail in matrix arithmetic

MA 138 Calculus 2 with Life Science Applications Matrices (Section 9.2)

Linear Algebra review Powers of a diagonalizable matrix Spectral decomposition

Fall Inverse of a matrix. Institute: UC San Diego. Authors: Alexander Knop

Linear Equations and Matrix

Order of Operations. Real numbers

Linear Algebra Homework and Study Guide

Phys 201. Matrices and Determinants

Chapter 1A -- Real Numbers. iff. Math Symbols: Sets of Numbers

Getting Started with Communications Engineering. Rows first, columns second. Remember that. R then C. 1

REVIEW Chapter 1 The Real Number System

Matrices BUSINESS MATHEMATICS

Linear Algebra Tutorial for Math3315/CSE3365 Daniel R. Reynolds

Mon Feb Matrix algebra and matrix inverses. Announcements: Warm-up Exercise:

A primer on matrices

Computational Foundations of Cognitive Science. Addition and Scalar Multiplication. Matrix Multiplication

Matrix Algebra. Matrix Algebra. Chapter 8 - S&B

Math 2331 Linear Algebra

MATRICES. a m,1 a m,n A =

5.1 Introduction to Matrices

Math 3191 Applied Linear Algebra

Matrix Algebra: Definitions and Basic Operations

A matrix over a field F is a rectangular array of elements from F. The symbol

Numerical Analysis Lecture Notes

Matrices and Vectors

Math 308 Midterm Answers and Comments July 18, Part A. Short answer questions

Lecture 3 Linear Algebra Background

CS 246 Review of Linear Algebra 01/17/19

MAC Module 2 Systems of Linear Equations and Matrices II. Learning Objectives. Upon completing this module, you should be able to :

Chapter 2. Ma 322 Fall Ma 322. Sept 23-27

Exercise Set Suppose that A, B, C, D, and E are matrices with the following sizes: A B C D E

Linear Algebra. Matrices Operations. Consider, for example, a system of equations such as x + 2y z + 4w = 0, 3x 4y + 2z 6w = 0, x 3y 2z + w = 0.

Appendix C Vector and matrix algebra

Definition 2.3. We define addition and multiplication of matrices as follows.

SCHOOL OF BUSINESS, ECONOMICS AND MANAGEMENT BUSINESS MATHEMATICS / MATHEMATICAL ANALYSIS

Chapter 7. Linear Algebra: Matrices, Vectors,

Math 140, c Benjamin Aurispa. 2.1 Matrices

A primer on matrices

Math 1302 Notes 2. How many solutions? What type of solution in the real number system? What kind of equation is it?

Math 320, spring 2011 before the first midterm

1 Matrices and Systems of Linear Equations

Section 5.5: Matrices and Matrix Operations

Chapter 2. Matrix Arithmetic. Chapter 2

Honors Advanced Mathematics Determinants page 1

Section 2.2: The Inverse of a Matrix

Definition. A matrix is a rectangular array of numbers enclosed by brackets (plural: matrices).

1. Introduction to commutative rings and fields

Transcription:

MATH 10240 Mathematics for Agriculture II Academic year 2018 2019 UCD School of Mathematics and Statistics

Contents Chapter 1. Linear Algebra 1 1. Introduction to Matrices 1 2. Matrix Multiplication 3 3. Matrix Inverses 7 4. Systems of Linear Equations 11 5. Applied Examples 24 6. Inverting matrices again 31 Chapter 2. Calculus 35 1. Trigonometric functions 35 2. More differentiation rules: product rule and quotient rule 41 3. Differentiation of composite functions 45 4. Graphing functions: singularities and asymptotes 48 5. Integration of trigonometric and rational functions 56 Chapter 3. Probability 61 1. Sample spaces and events 61 2. Probability measure 63 3. Equiprobability 65 4. Conditional Probability 68 5. Applied Examples 71 6. Picking k elements from n: Binomial Coefficients 72 7. Random variables 76 8. Expectation of a random variable 77 Chapter 4. Markov Chains 79 iii

iv Contents 1. Stochastic Matrices 79 2. Markov Chains 81 3. Regular Markov chains 82

Chapter 1 Linear Algebra 1. Introduction to Matrices Definition 1.1. An m n ( m by n ) matrix is a rectangle of numbers having m rows and n columns, enclosed by brackets. Example 1.2. 2 3 1 3 5 7 0 is a 2 3 matrix and 2 3 2 7 4 0 is a 3 2 matrix. Remarks 1.3. (1) Two matrices are said to have the same size if they have the same number of rows and the same number of columns, so a 2 3 matrix and a 3 2 matrix are considered to be of different size. (2) A matrix having just one row is sometimes called a row vector, and a matrix having just one column is called a column vector. (3) We usually label matrices using capital letters like A, B, C, etc. (4) If an m n matrix has the same number of rows as columns, i.e., if m n, then it is called a square matrix. (5) If A is an m n matrix, the number appearing in the ith row and jth column is called the (i, j) entry of A, and denoted A i j. (6) Two matrices are equal if and only if they have the same size and the corresponding entries are all equal. 1

2 1. Linear Algebra Example 1.4. If A 2 3 1 4 0 5 then A 12 3, A 23 5, A 13 1, etc. Definition 1.5 (Matrix Addition). Let A and B be matrices of the same size (m n). We define their sum A + B to be the m n matrix whose entries are given by for i 1,..., m and j 1,..., n. (A + B) i j A i j + B i j Thus A + B is obtained from A and B by adding entries in corresponding positions. 2 0 1 1 1 1 0 2 Example 1.6. Let A and B (A and B are 1 2 4 2 3 3 1 1 both 2 4 matrices). Then 2 + ( 1) 0 + 1 1 + 0 1 + ( 2) 1 1 1 3 A + B 1 + 3 2 + ( 3) 4 + 1 2 + 1 4 1 5 3 Subtraction of matrices (of the same size) is now defined in the obvious way, - e.g., with A and B as in Example 1.6, we have 2 ( 1) 0 1 1 0 1 ( 2) 3 1 1 1 A B 1 3 2 ( 3) 4 1 2 1 2 5 3 1 We can only add or subtract two matrices if they are the same size. If A and B are different sizes then the matrix sum A + B is not defined. Definition 1.7 (Multiplication of a Matrix by a Real Number). Let A be an m n matrix and let k be a real number. Then ka is the m n matrix with entries defined by (ka) i j ka i j i.e. ka is obtained from A by multiplying every entry in A by k. 2 1 Example 1.8. If A, then 3 4 4 2 6 3 2A, 3A, 0A 6 8 9 12 Definition 1.9. The m n matrix whose entries are all zero is called the zero (m n) matrix.

2. Matrix Multiplication 3 2. Matrix Multiplication Matrix multiplication is very different from addition and subtraction. In this subsection we describe how (and when) matrices can be multiplied together. This procedure is a bit unusual, so we present it in two steps. Definition 2.1 (Row Vector and Column Vector Multiplication). Let u be a row vector of size 1 n and v be a column vector of size n 1. So v 1 v 2 u (u 1 u 2 u n ) and v.. (Observe that u and v have the same number of entries.) The product of u and v is the number Example 2.2. Let u 1 2 3 v n uv u 1 v 1 + u 2 v 2 + + u n v n. 7 and v 10. Then 1 uv 1 7 + ( 2) 10 + 3 ( 1) 16. Definition 2.3 (Matrix Multiplication). Let A, B be m p and q n matrices, respectively. The product AB of A and B is defined only if p q. In this case, AB is an m n matrix, and the (i, j) entry (AB) i j of AB is the product of row i of A by column j of B. 3 1 2 1 3 Example 2.4. Find AB when A and B 1 1. 1 0 1 0 2 We see that A is a 2 3 matrix and that B is a 3 2 matrix. Therefore AB will be a 2 2 matrix. The entries of AB are, ordered from left to right and from top to bottom, where (AB) 11 (AB) 12 (AB) 21 (AB) 22, (AB) 11 2 3 + ( 1) 1 + 3 0 6 + ( 1) + 0 5 (AB) 12 2 1 + ( 1) ( 1) + 3 2 2 + 1 + 6 9 (AB) 21 1 3 + 0 1 + ( 1) 0 3 + 0 + 0 3

4 1. Linear Algebra Thus, (AB) 22 1 1 + 0 ( 1) + ( 1) 2 1 + 0 2 1. AB 5 9 3 1. Remarks 2.5. What happened? If we follow what we did, to compute AB: You fix the first row of A, and multiply it successively by the columns of B. It will give you the first row of AB. You fix the second row of A, and multiply it successively by the columns of B. It will give you the second row of AB. And so on, one row of A after the other. Example 2.6. A salesperson sells items of three types I, II and III, costing 10, 20 and 30, respectively. The next table shows how many items of each type are sold on Monday a.m. and p.m. Type I Type II Type III morning 3 4 1 afternoon 5 2 2 Let A denote the matrix 3 4 1 5 2 2 Let B denote the 3 1 matrix whose entries are the prices of items of Type I, II and III, respectively. 10 B 20 (B is a column vector - see Remarks 1.3 (2)). Let C denote the 2 1 matrix (another column vector) whose entries are the total income from morning sales and the total income from afternoon sales, respectively: 1st entry of C : (3 10) + (4 20) + (1 30) 140 2nd entry of C : (5 10) + (2 20) + (2 30) 150 140 I.e., C. 150 How do the entries of C depend on those of A and B? The 1st entry of C comes from combining the first row of A with the column of B: product of 1st entries + product of 2nd entries + product of 3rd entries 30

2. Matrix Multiplication 5 (3 10) + (4 20) + (1 30) The 2nd entry of C comes from combining the second row of A with the column of B in the same way. (5 10) + (2 20) + (2 30) This scheme for combining rows of one matrix with columns of another leads to the definition of matrix multiplication. In this case C is the product A multiplied by B, i.e., C AB. Example 2.7. If A and B are as in Example 2.4 then BA is a 3 3 matrix. The (2, 3) entry of BA, (BA) 23 is 2nd row of B combined with 3rd column of A, i.e. The complete product is (BA) 23 1 3 + ( 1) ( 1) 4. 7 3 8 BA 1 1 4 2 0 2 Warning 2.8. Matrix multiplication is not commutative! I.e. in general, AB BA. In Examples 2.4 and 2.7, we saw that AB and BA were both defined, but did not even have the same size. It is also possible for only one of AB and BA to be defined, e.g. if A is 2 4 and B is 4 3. Even if AB and BA are both defined and have the same size (e.g. if both are 3 3), the two products are typically different. Remarks 2.9 (General properties of matrix arithmetic). In the following, A, B and C are matrices and for each item below we assume that their sizes are such that all indicated additions and multiplications are defined. (1) A + B B + A : matrix addition is commutative. (2) (A + B) + C A + (B + C) : matrix addition is associative. (3) AB is typically not equal to BA, even when both are defined : matrix multiplication is not commutative. (4) (AB)C A(BC) : matrix multiplication is associative. (5) Distributive laws for matrix multiplication over matrix addition: (A + B)C AC + BC A(B + C) AB + AC (6) Whenever k is a real number, we have (ka)b A(kB) k(ab) and k(a+ B) ka + kb. Matrices share properties (1), (2), (4) and (5) with real numbers, but not (3)!

6 1. Linear Algebra As with ordinary arithmetic of real numbers, matrix multiplication is done before addition or subtraction, e.g., AB + C means (AB) + C, not A(B + C). Recall that a matrix is called square if it has the same number of rows as columns, i.e., if it is an n n matrix for some n. If A and B are two 3 3 matrices then A + B, A B and the products AB and BA are all defined and all 3 3 matrices. Fix n. Within the set of n n matrices, we can add, subtract and multiply any matrix by any other, and stay inside the set of n n matrices. Definition 2.10. The set of n n matrices whose entries are real numbers is denoted M n (). If A is a n n matrix we can write A M n (). Definition 2.11 (Matrix powers). Let A M n (), i.e., A is an n n matrix, and let k be a positive integer. The kth power A k of A is the n n matrix A A A }{{} k times 1 1 Example 2.12. In M 2 (), if A, then 0 3 1 1 1 1 1 4 A 2 AA and 0 3 0 3 0 9 1 4 1 1 1 13 A 3 AAA A 2 A. 0 9 0 3 0 27 Warning 2.13. Recall that if x is a number and x 2 0 then x has to be 0. However, if A is a square matrix and A 2 is the 2 2 zero matrix, then A does not have to be the zero matrix. E.g., if A then A 2. Definition 2.14 (Transposes). If A is an m n matrix then the transpose A T of A is the n m matrix whose entries are given by (A T ) i j A ji. In practice, this means that the ith row of A becomes the ith column of A T (and also that the jth column of A becomes the jth row of A T ).

3. Matrix Inverses 7 Example 2.15. If A 1 0 5 2 3 7 then A T 1 2 0 3 5 7. Warning 2.16. Transposes are taken before multiplication, e.g., AB T means A(B T ), not (AB) T. Warning 2.17. The transposed of a product of matrices is the reverse product of the transposed matrices: (AB) T B T A T, which is in general not equal to A T B T! 3. Matrix Inverses If we divide a real number by 5 we are multiplying it by 1 5. We say that 1 5 is the reciprocal or multiplicative inverse of 5 in. This means 1 5 5 1, i.e., if you multiply 5 by 1 5, you get 1; multiplying by 1 5 reverses the work of multiplying by 5. More generally, if a is a non-zero real number then 1 a is the inverse of a. When given an equation like ax b, where a and b are known to us, we solve it by multiplying both sides by the inverse of a: E.g. if 5x 4 then x 4 5. ax b 1 a ax 1 a b x b a. Our aim now is to introduce a similar procedure to solve matrix equations like AX B, and much more besides. To do this, we need the concept of a matrix inverse. However, before we can do this, we need to find a matrix which behaves something like the number 1. The number 1 is special because when you multiply any number by 1, you change nothing (and it is the only number with this property). 2 3 1 0 Example 3.1. Let A and let I. Find AI and IA. 1 2

8 1. Linear Algebra 2 3 1 0 2 1 + 3 0 2 0 + 3 1 2 3 AI 1 2 ( 1) 1 + 2 0 ( 1) 0 + 2 1 1 2 A 1 0 2 3 1 2 + 0 ( 1) 1 3 + 0 2 2 3 IA 1 2 0 2 + 1 ( 1) 0 3 + 1 2 1 2 A Both AI and IA are equal to A: multiplying A by I (on the left or right) does not affect A. a b In general, if A is any 2 2 matrix, then c d a b 1 0 a b AI A c d c d and IA A also. Definition 3.2. I I 2 ). Remarks 3.3. 1 0 is called the 2 2 identity matrix (it is sometimes denoted (1) I 2 behaves in M 2 () like the real number 1 behaves in - multiplying a real number x by 1 has no effect on x. 1 (2) The 3 3 identity matrix is I 3 0. Check that if A is any 3 3 matrix then AI 3 I 3 A A. 1 (3) For any positive integer n, the n n identity matrix I n is defined by 1 0...... 0 0... 0 I n........ 0......... 1 (I n has 1s along the main diagonal and 0s elsewhere). The entries of I n are given by: 1 i j (I n ) i j 0 i j

3. Matrix Inverses 9 Theorem 3.4. If A is any n n matrix then AI n I n A A. I.e., multiplying A on the left or right by I n leaves A unchanged. Now we have the n n identity matrices, we can ask which n n matrices have multiplicative inverses. Definition 3.5. Let A be an n n matrix. If B is an n n matrix for which AB I n and BA I n then B is called an inverse for A. 2 1 3 1 Example 3.6. Let A and let B 5 3 5 2. Then 2 1 3 1 1 0 AB 5 3 3 1 5 2 2 1 1 0 I 2 BA 5 2 5 3 I 2 So B is an inverse for A. In the same way that 1 5 reverses the effect of 5, by getting us back to 1 ( 1 5 5 1), so B reverses the effect of A by getting us back to I 2 (AB BA I 2 ). Remarks 3.7. (1) Suppose B and C are both inverses for a particular matrix A, i.e. BA AB I n and CA AC I n. Then (BA)C I n C C and also (BA)C B(AC) BI n B Hence B C, and if A has an inverse, its inverse is unique. Thus we can talk about the inverse of a matrix. (2) Not every square matrix has an inverse. For example the 2 2 zero matrix does not. (3) The inverse of a n n matrix A, if it exists, is denoted A 1. Given a square matrix A, how do we (a) decide if A 1 exists, and

1. Linear Algebra (b) if so, work out what it is? In the 2 2 case, there is a nice formula to work out matrix inverses. a b Example 3.8. Let A M 2 (), and let us suppose that c d ad bc 0. 2 1 (For instance, in Example 3.6 we had A, and in this case ad bc 2 3 1 5 5 3 6 5 1 0.) Now consider We calculate the product AB: AB B 1 d b ad bc c a a b 1 d b c d ad bc c a 1 a b d b ad bc c d c a 1 ad + b( c) a( b) + ba ad bc cd + d( c) c( b) + da 1 ad bc 0 ad bc 0 ad bc 1 0 I 2. Similarly (and you should check this) BA I 2, so B is the inverse of A, i.e., B A 1. Check that if you apply the formula to A in Example 3.6 then you get the inverse. However, what if A is as above, but ad bc 0? It turns out that, in this case, A does not have an inverse. Example 3.9. The matrix does not have an inverse. A 1 2 2 4 To show this, we proceed as follows. We know that there are only two possible cases: either A has an inverse, or A does not. If we manage to show that the first case is impossible, then

4. Systems of Linear Equations 11 the second is necessarilly true. So we assume that A does have an inverse, and see what consequences it would have: p q A 1, r s If we can reach an impossible conclusion then this case does not occur. For A 1 to be the inverse of A, we must have A 1 A I 2, i.e. p 2q 2p 4q 1 0 A 1 A. r 2s 2r 4s Thus, comparing entries, p 2q 1 and 2p 4q 0. Dividing the second equation by 2 we get p 2q 0. The two equations thus give which is impossible. 1 0, The only way to get out of this is to say that our original assumption about A 1 is wrong: A does not have an inverse. What about 3 3 matrices, or 4 4, 27 27? Even in the 3 3 case, while there is a formula, it isn t very nice. In larger cases the formulae become completely impossible to use, so we have to find another way of determining inverses. See Section 6. 4. Systems of Linear Equations Consider the equation 2x + y 3. This is a linear equation in the variables x and y. As it stands, the statement 2x + y 3 is neither true nor false: it is just a statement involving the abstract variables x and y. However if we replace x and y with some particular pair of real numbers, the statement will become either true or false. E.g. (1) Putting x 1, y 1 gives 2x + y 2 1 + 1 3: True (2) Putting x 1, y 2 gives 2x + y 2 1 + 2 3: False Definition 4.1. A pair (x 0, y 0 ) of real numbers is a solution to the equation 2x + y 3 if setting x x 0 and y y 0 makes the equation true; i.e. if 2x 0 + y 0 3. E.g. (1, 1) and (0, 3) are solutions, but (1, 4) is not a solution since setting x 1, y 4 gives 2x + y 2 1 + 4 3. The set of all solutions to the equation is called its solution set. Given several linear equations, it is sometimes necessary to look for solutions which solve all of them simultaneously.