30
MAT 1302B – Mathematical Methods II Alistair Savage Mathematics and Statistics University of Ottawa Winter 2015 – Lecture 1 Course webpage: http://mysite.science.uottawa.ca/asavag2/mat1302 These are partial slides for following along in class. Full versions of these slides will be posted on the course website after the lecture. Alistair Savage (uOttawa) MAT 1302B – Mathematical Methods II Winter 2015 – Lecture 1 1 / 30

section Mathematical Methods II - Faculty of Sciencemysite.science.uottawa.ca/asavag2/mat1302/lectures/mat1302-lecture... · MAT 1302B { Mathematical Methods II Alistair Savage Mathematics

Embed Size (px)

Citation preview

Page 1: section Mathematical Methods II - Faculty of Sciencemysite.science.uottawa.ca/asavag2/mat1302/lectures/mat1302-lecture... · MAT 1302B { Mathematical Methods II Alistair Savage Mathematics

MAT 1302B – Mathematical Methods II

Alistair Savage

Mathematics and StatisticsUniversity of Ottawa

Winter 2015 – Lecture 1

Course webpage:http://mysite.science.uottawa.ca/asavag2/mat1302

These are partial slides for following along in class. Full versions of theseslides will be posted on the course website after the lecture.

Alistair Savage (uOttawa) MAT 1302B – Mathematical Methods II Winter 2015 – Lecture 1 1 / 30

Page 2: section Mathematical Methods II - Faculty of Sciencemysite.science.uottawa.ca/asavag2/mat1302/lectures/mat1302-lecture... · MAT 1302B { Mathematical Methods II Alistair Savage Mathematics

Overview

Webpage: http://mysite.science.uottawa.ca/asavag2/mat1302

Keys to success:

After each class, do the recommended exercises for that class beforethe next lecture

Read the section in the text before each lecture

Attend class and the DGDs

If you have difficulties:

As soon as you have a difficulty, resolve it!I come to office hoursI go to the help centreI ask the TA during the DGD

The course will become very difficult if you fall behind

Note: DGDs begin week of January 19.

Alistair Savage (uOttawa) MAT 1302B – Mathematical Methods II Winter 2015 – Lecture 1 2 / 30

Page 3: section Mathematical Methods II - Faculty of Sciencemysite.science.uottawa.ca/asavag2/mat1302/lectures/mat1302-lecture... · MAT 1302B { Mathematical Methods II Alistair Savage Mathematics

Taking notes

Partial slides will be posted before each class. Full slides will be postedafter each class. Download a copy to your personal computer or USB flashdrive in case the server goes down before an exam!

Video of each lecture will be made available for streaming online.

You should not try to write down everything presented in class (you won’thave enough time and you can download the slides).

Instead, you should focuss on writing down the key ideas, importantconcepts, potential pitfalls, etc.

If you don’t understand something at first, but then it clears up afterfurther examples done in class, you should write yourself a note about thatissue to remind yourself later.

Alistair Savage (uOttawa) MAT 1302B – Mathematical Methods II Winter 2015 – Lecture 1 3 / 30

Page 4: section Mathematical Methods II - Faculty of Sciencemysite.science.uottawa.ca/asavag2/mat1302/lectures/mat1302-lecture... · MAT 1302B { Mathematical Methods II Alistair Savage Mathematics

What is linear algebra?

Algebra

Linear

Geometric:

Algebraic:

Linear algebra

Study of vectors, matrices, linear transformations and systems of linearequations

Alistair Savage (uOttawa) MAT 1302B – Mathematical Methods II Winter 2015 – Lecture 1 4 / 30

Page 5: section Mathematical Methods II - Faculty of Sciencemysite.science.uottawa.ca/asavag2/mat1302/lectures/mat1302-lecture... · MAT 1302B { Mathematical Methods II Alistair Savage Mathematics

Linear geometry

Vectors and lines are linear

HHHHHj

�����

Planes are linear

�����

�����

(3-dimensional) space is linear

Alistair Savage (uOttawa) MAT 1302B – Mathematical Methods II Winter 2015 – Lecture 1 5 / 30

Page 6: section Mathematical Methods II - Faculty of Sciencemysite.science.uottawa.ca/asavag2/mat1302/lectures/mat1302-lecture... · MAT 1302B { Mathematical Methods II Alistair Savage Mathematics

Linear equations

Question

What is a linear equation? Possible ideas:

Example

Example

Note: We will often use x1, x2, x3, . . . instead of x , y , z .Alistair Savage (uOttawa) MAT 1302B – Mathematical Methods II Winter 2015 – Lecture 1 6 / 30

Page 7: section Mathematical Methods II - Faculty of Sciencemysite.science.uottawa.ca/asavag2/mat1302/lectures/mat1302-lecture... · MAT 1302B { Mathematical Methods II Alistair Savage Mathematics

Linear equations: Definition

What do the above examples have in common?

Definition (Linear Equation)

A linear equation in the variables x1, . . . , xn is an equation that can bewritten in the form

a1x1 + a2x2 + · · ·+ anxn = b

where a1, a2, . . . , an, b ∈ R are the coefficients and n can be any positiveinteger.

Alistair Savage (uOttawa) MAT 1302B – Mathematical Methods II Winter 2015 – Lecture 1 7 / 30

Page 8: section Mathematical Methods II - Faculty of Sciencemysite.science.uottawa.ca/asavag2/mat1302/lectures/mat1302-lecture... · MAT 1302B { Mathematical Methods II Alistair Savage Mathematics

Linear equations: Examples

Example 1

−x1 + 5x2 − 3x3 = 1

Example 2

2x1 − 5 = 3x2 + x1 − 8

Example 3√

2(x1 − x2) = π(5− x1)

Alistair Savage (uOttawa) MAT 1302B – Mathematical Methods II Winter 2015 – Lecture 1 8 / 30

Page 9: section Mathematical Methods II - Faculty of Sciencemysite.science.uottawa.ca/asavag2/mat1302/lectures/mat1302-lecture... · MAT 1302B { Mathematical Methods II Alistair Savage Mathematics

Linear equations: Examples

Example 4

(2x1 − 1)(3− x2) = 0

is

Example 5

x21 + x2 = 3

is

Alistair Savage (uOttawa) MAT 1302B – Mathematical Methods II Winter 2015 – Lecture 1 9 / 30

Page 10: section Mathematical Methods II - Faculty of Sciencemysite.science.uottawa.ca/asavag2/mat1302/lectures/mat1302-lecture... · MAT 1302B { Mathematical Methods II Alistair Savage Mathematics

Linear equations: Examples

Example 6√x1 + x2 = 0

is

Example 7

x21 − 1 = (x1 + 1)(x1 − 1) (1)

Recall: An equation is linear if it can be written in the form

a1x1 + · · ·+ anxn = b.Alistair Savage (uOttawa) MAT 1302B – Mathematical Methods II Winter 2015 – Lecture 1 10 / 30

Page 11: section Mathematical Methods II - Faculty of Sciencemysite.science.uottawa.ca/asavag2/mat1302/lectures/mat1302-lecture... · MAT 1302B { Mathematical Methods II Alistair Savage Mathematics

Systems of linear equations

Definition (System of linear equations)

A system of linear equations (or linear system) is a collection of one ormore linear equations involving the same variables.

Example

3x1 − 2x2 + x3 = 45x2 − x3 = −1

Definition (Solution of a linear system)

A solution of the system is a list (s1, . . . , sn) of numbers that makes eachequation a true statement when the values s1, . . . , sn are substituted forx1, . . . , xn (in that order).

Alistair Savage (uOttawa) MAT 1302B – Mathematical Methods II Winter 2015 – Lecture 1 11 / 30

Page 12: section Mathematical Methods II - Faculty of Sciencemysite.science.uottawa.ca/asavag2/mat1302/lectures/mat1302-lecture... · MAT 1302B { Mathematical Methods II Alistair Savage Mathematics

Systems of linear equations: Example

Example

Recall our example

3x1 − 2x2 + x3 = 45x2 − x3 = −1

(1, 0, 1), i.e. x1 = 1, x2 = 0, x3 = 1, is a solution of this system sincesubstitution gives

3(1)− 2(0) + (1) = 4 X

5(0)− (1) = −1 X

(1, 1, 3), i.e. x1 = 1, x2 = 1, x3 = 3, is not a solution since substitutiongives

3(1)− 2(1) + (3) = 4 X

5(1)− (3) = −1 ×Alistair Savage (uOttawa) MAT 1302B – Mathematical Methods II Winter 2015 – Lecture 1 12 / 30

Page 13: section Mathematical Methods II - Faculty of Sciencemysite.science.uottawa.ca/asavag2/mat1302/lectures/mat1302-lecture... · MAT 1302B { Mathematical Methods II Alistair Savage Mathematics

Solution sets

Definition (Solution set)

The solution set of a linear system is the set of all possible solutions of thesystem.

Example 1

`1 : x1 + x2 = 3`2 : 2x1 − 3x2 = 1

6x2

-x1

r(0, 3)

r(3, 0)

@@@@@@ `1�

��������

`2 The pair of numbers (s1, s2) satisfiesboth equations iff it lies on both lines.

The solution set

Alistair Savage (uOttawa) MAT 1302B – Mathematical Methods II Winter 2015 – Lecture 1 13 / 30

Page 14: section Mathematical Methods II - Faculty of Sciencemysite.science.uottawa.ca/asavag2/mat1302/lectures/mat1302-lecture... · MAT 1302B { Mathematical Methods II Alistair Savage Mathematics

Solution sets

Example 2

`1 : x1 + 2x2 = 2`2 : −x1 − 2x2 = 0

6x2

-x1

r(0, 1) r(2, 0)

HHHH

HHHHH `1

r(0, 0) r

(2,−1)

HHHH

HHHHH

`2

The system has

The solution set is

Alistair Savage (uOttawa) MAT 1302B – Mathematical Methods II Winter 2015 – Lecture 1 14 / 30

Page 15: section Mathematical Methods II - Faculty of Sciencemysite.science.uottawa.ca/asavag2/mat1302/lectures/mat1302-lecture... · MAT 1302B { Mathematical Methods II Alistair Savage Mathematics

Solution sets

Example 3

`1 : x1 + 2x2 = 2`2 : 2x1 + 4x2 = 4

6x2

-x1

r(0, 1) r(2, 0)

HHHH

HHHHH

`1 = `2 There are

Alistair Savage (uOttawa) MAT 1302B – Mathematical Methods II Winter 2015 – Lecture 1 15 / 30

Page 16: section Mathematical Methods II - Faculty of Sciencemysite.science.uottawa.ca/asavag2/mat1302/lectures/mat1302-lecture... · MAT 1302B { Mathematical Methods II Alistair Savage Mathematics

Possible solution sets

Question

What types of solutions sets can systems of linear equations have?

Answer

A system of linear equations has either

1 No solution

2 Exactly one solution

3 Infinitely many solutions

system is inconsistent}system is consistent

Note: This is special to linear systems.

Example:

Alistair Savage (uOttawa) MAT 1302B – Mathematical Methods II Winter 2015 – Lecture 1 16 / 30

Page 17: section Mathematical Methods II - Faculty of Sciencemysite.science.uottawa.ca/asavag2/mat1302/lectures/mat1302-lecture... · MAT 1302B { Mathematical Methods II Alistair Savage Mathematics

Matrix notationIn order to simplify calculations, we often encode the info of a linearsystem in a matrix.

Example

For the system

2x1 − x2 − x3 + x4 = 7x2 + x3 + 2x4 = −8

5x1 − 3x3 − x4 = 0

we have two matrices:

coefficient matrix2 −1 −1 10 1 1 25 0 −3 −1

augmented matrix 2 −1 −1 1 7

0 1 1 2 −85 0 −3 −1 0

Alistair Savage (uOttawa) MAT 1302B – Mathematical Methods II Winter 2015 – Lecture 1 17 / 30

Page 18: section Mathematical Methods II - Faculty of Sciencemysite.science.uottawa.ca/asavag2/mat1302/lectures/mat1302-lecture... · MAT 1302B { Mathematical Methods II Alistair Savage Mathematics

Matrix sizes

In our previous example:

coefficient matrix2 −1 −1 10 1 1 25 0 −3 −1

augmented matrix 2 −1 −1 1 7

0 1 1 2 −85 0 −3 −1 0

The coefficient matrix has size 3× 4 and the augmented matrix has size3× 5.

Definition

A matrix has size m × n if it has m rows and n columns.

Note: Sometimes (for instance, in the text) the vertical bar in theaugmented matrix is omitted.

Alistair Savage (uOttawa) MAT 1302B – Mathematical Methods II Winter 2015 – Lecture 1 18 / 30

Page 19: section Mathematical Methods II - Faculty of Sciencemysite.science.uottawa.ca/asavag2/mat1302/lectures/mat1302-lecture... · MAT 1302B { Mathematical Methods II Alistair Savage Mathematics

Question: What type of linear system is completely trivial to solve?

Answer:

Example

Moral

Ideally, we would like to manipulate a system to turn it into an easysystem like this.

This won’t always be possible, but we’ll come close.

Alistair Savage (uOttawa) MAT 1302B – Mathematical Methods II Winter 2015 – Lecture 1 19 / 30

Page 20: section Mathematical Methods II - Faculty of Sciencemysite.science.uottawa.ca/asavag2/mat1302/lectures/mat1302-lecture... · MAT 1302B { Mathematical Methods II Alistair Savage Mathematics

Example

Let’s solve a particular linear system. In each step, we’ll also write theaugmented matrix.

2x1 + 4x2 − 2x3 = −6x2 + 3x3 = 6

3x1 + 4x2 − x3 = −5

2 4 −2 −60 1 3 63 4 −1 −5

1

x1 + 2x2 − 1x3 = −3x2 + 3x3 = 6

3x1 + 4x2 − x3 = −5

1 2 −1 −30 1 3 63 4 −1 −5

2

Alistair Savage (uOttawa) MAT 1302B – Mathematical Methods II Winter 2015 – Lecture 1 20 / 30

Page 21: section Mathematical Methods II - Faculty of Sciencemysite.science.uottawa.ca/asavag2/mat1302/lectures/mat1302-lecture... · MAT 1302B { Mathematical Methods II Alistair Savage Mathematics

Example (cont.)

2

x1 + 2x2 − 1x3 = −3x2 + 3x3 = 6

−2x2 + 2x3 = 4

1 2 −1 −30 1 3 60 −2 2 4

3

x1 + 2x2 − 1x3 = −3x2 + 3x3 = 6

8x3 = 16

1 2 −1 −30 1 3 60 0 8 16

The system is now in

4

x1 + 2x2 − 1x3 = −3x2 + 3x3 = 6

x3 = 2

1 2 −1 −30 1 3 60 0 1 2

Alistair Savage (uOttawa) MAT 1302B – Mathematical Methods II Winter 2015 – Lecture 1 21 / 30

Page 22: section Mathematical Methods II - Faculty of Sciencemysite.science.uottawa.ca/asavag2/mat1302/lectures/mat1302-lecture... · MAT 1302B { Mathematical Methods II Alistair Savage Mathematics

Example (cont.)

5 (a)

(b)

x1 + 2x2 = −1x2 = 0

x3 = 2

1 2 0 −10 1 0 00 0 1 2

6

x1 = −1x2 = 0

x3 = 2

1 0 0 −10 1 0 00 0 1 2

Solution:

Alistair Savage (uOttawa) MAT 1302B – Mathematical Methods II Winter 2015 – Lecture 1 22 / 30

Page 23: section Mathematical Methods II - Faculty of Sciencemysite.science.uottawa.ca/asavag2/mat1302/lectures/mat1302-lecture... · MAT 1302B { Mathematical Methods II Alistair Savage Mathematics

Important: Check your answer!

Question

How can we check that our solution is correct? Maybe we made somemistakes along the way!

Answer

Example

Alistair Savage (uOttawa) MAT 1302B – Mathematical Methods II Winter 2015 – Lecture 1 23 / 30

Page 24: section Mathematical Methods II - Faculty of Sciencemysite.science.uottawa.ca/asavag2/mat1302/lectures/mat1302-lecture... · MAT 1302B { Mathematical Methods II Alistair Savage Mathematics

Elementary row operations

When solving linear systems, we will use three basic row operations.

Elementary row operations

1 Replacement: Replace one row by the sum of itself and a multiple ofanother row (i.e. add a multiple of one row to another row).

2 Interchange: Interchange two rows.

3 Scale: Multiply all entries in a row by a nonzero constant.

Definition

Two matrices are row equivalent if one can be obtained from the other bya sequence of elementary row operations.

Alistair Savage (uOttawa) MAT 1302B – Mathematical Methods II Winter 2015 – Lecture 1 24 / 30

Page 25: section Mathematical Methods II - Faculty of Sciencemysite.science.uottawa.ca/asavag2/mat1302/lectures/mat1302-lecture... · MAT 1302B { Mathematical Methods II Alistair Savage Mathematics

Row equivalence: Example

Example

We see from our previous example that the matrices 2 4 −2 −60 1 3 63 4 −1 −5

and

1 0 0 −10 1 0 00 0 1 2

are row equivalent since we obtained the second from the first via rowoperations.

Alistair Savage (uOttawa) MAT 1302B – Mathematical Methods II Winter 2015 – Lecture 1 25 / 30

Page 26: section Mathematical Methods II - Faculty of Sciencemysite.science.uottawa.ca/asavag2/mat1302/lectures/mat1302-lecture... · MAT 1302B { Mathematical Methods II Alistair Savage Mathematics

Row operations: reversibility

Note: All the row operations are reversible.

Examples

1 Operation: Add cR1 to R2.Reverse:

2 Operation: Interchange R2 and R3.Reverse:

3 Operation: Multiply R2 by c , c 6= 0.Reverse:

Alistair Savage (uOttawa) MAT 1302B – Mathematical Methods II Winter 2015 – Lecture 1 26 / 30

Page 27: section Mathematical Methods II - Faculty of Sciencemysite.science.uottawa.ca/asavag2/mat1302/lectures/mat1302-lecture... · MAT 1302B { Mathematical Methods II Alistair Savage Mathematics

Row equivalence and solution sets

If a matrix A is obtained from a matrix B by row operations, then anysolution of the system corresponding to A is a solution of the systemcorresponding to B.

Since A can also be obtained from B by row operations, any solutionof the system corresponding to B is a solution of the systemcorresponding to A.

Theorem

If the augmented matrices of two linear systems (LS’s) are row equivalent,then the two systems have the same solution set.

In our example, we solved the LS by finding a row equivalent one whichwas simpler and allowed us to read off the solution.

Alistair Savage (uOttawa) MAT 1302B – Mathematical Methods II Winter 2015 – Lecture 1 27 / 30

Page 28: section Mathematical Methods II - Faculty of Sciencemysite.science.uottawa.ca/asavag2/mat1302/lectures/mat1302-lecture... · MAT 1302B { Mathematical Methods II Alistair Savage Mathematics

Another Example

Determine if the following system is consistent:

−2x2 + x3 = 2−x1 + 2x2 + 3x3 = −1−2x1 + 6x2 + 5x3 = −1

Solution: The augmented matrix is 0 −2 1 2−1 2 3 −1−2 6 5 −1

We use row operations to get it to triangular form.

Alistair Savage (uOttawa) MAT 1302B – Mathematical Methods II Winter 2015 – Lecture 1 28 / 30

Page 29: section Mathematical Methods II - Faculty of Sciencemysite.science.uottawa.ca/asavag2/mat1302/lectures/mat1302-lecture... · MAT 1302B { Mathematical Methods II Alistair Savage Mathematics

Another Example (cont.)

0 −2 1 2−1 2 3 −1−2 6 5 −1

−−−−→

−1 2 3 −10 −2 1 2−2 6 5 −1

−−−−→

1 −2 −3 10 −2 1 2−2 6 5 −1

−−−−−→

1 −2 −3 10 −2 1 20 2 −1 1

−−−−−→

1 −2 −3 10 1 −1

2 −10 2 −1 1

−−−−−−→

1 −2 −3 10 1 −1

2 −10 0 0 3

Back to equation notation:

x1 − 2x2 − 3x3 = 1x2 − 1

2x3 = −10 = 3

The system is .

Alistair Savage (uOttawa) MAT 1302B – Mathematical Methods II Winter 2015 – Lecture 1 29 / 30

Page 30: section Mathematical Methods II - Faculty of Sciencemysite.science.uottawa.ca/asavag2/mat1302/lectures/mat1302-lecture... · MAT 1302B { Mathematical Methods II Alistair Savage Mathematics

Recap

Before next class, you should:

Go over webpage (syllabus, DGDs, grading, etc.).

Read “Lecture 0” (background on sets, notation, etc.).

Do recommended exercises.

Read Sections WILA, SSLE, and RREF of the text.

Next time

We will develop a systematic procedure for solving systems ofequations.

Our procedure will allow us to solve any system of equations (ordetermine that it has no solutions).

Alistair Savage (uOttawa) MAT 1302B – Mathematical Methods II Winter 2015 – Lecture 1 30 / 30