d section 1.1 system of linear...

33
Dr. Abdulla Eid Section 1.1 System of Linear Equations Dr. Abdulla Eid College of Science MATHS 211: Linear Algebra Dr. Abdulla Eid (University of Bahrain) Linear System 1 / 33

Upload: others

Post on 30-Apr-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: d Section 1.1 System of Linear Equationsabdullaeid.net/teaching/Fall2018/slides/MATHS211Fall2017Section1… · d Goals: 1 De ne system of linear equations and their solutions. 2 To

Dr. AbdullaEid

Section 1.1System of Linear Equations

Dr. Abdulla Eid

College of Science

MATHS 211: Linear Algebra

Dr. Abdulla Eid (University of Bahrain) Linear System 1 / 33

Page 2: d Section 1.1 System of Linear Equationsabdullaeid.net/teaching/Fall2018/slides/MATHS211Fall2017Section1… · d Goals: 1 De ne system of linear equations and their solutions. 2 To

Dr. AbdullaEid

Goals:

1 Define system of linear equations and their solutions.

2 To represent system of linear equations by several ways.

3 To solve system of linear equations using Gaussian–JordanElimination.

4 To solve system of linear equations using the inverse of a matrix.

5 To solve system of linear equations using Cramer’s rule.

.

Dr. Abdulla Eid (University of Bahrain) Linear System 2 / 33

Page 3: d Section 1.1 System of Linear Equationsabdullaeid.net/teaching/Fall2018/slides/MATHS211Fall2017Section1… · d Goals: 1 De ne system of linear equations and their solutions. 2 To

Dr. AbdullaEid

Linear equations

Definition 1

A linear equation in the variables x1, x2, . . . , xn is an equation of the form

a1x1 + + a2x2 + + · · ·+ anxn = b

where b and the coefficients a1, a2, . . . , an are real numbers.

Note: A linear equations is of degree one in the variables.

Example 2

Which of the following are linear equations and why?

1 4x1 + 3x2 = −6

2 x1 + x2 − 5 = x3 + 2x13 3x + 2y − z + w = 5

4 x1 + x2 = x1x25 x2 =

√6x1 + x3

6 x2 = 6√x1 + x3

Dr. Abdulla Eid (University of Bahrain) Linear System 3 / 33

Page 4: d Section 1.1 System of Linear Equationsabdullaeid.net/teaching/Fall2018/slides/MATHS211Fall2017Section1… · d Goals: 1 De ne system of linear equations and their solutions. 2 To

Dr. AbdullaEid

System of linear equations

Definition 3

A system of linear equation or (linear system) in the variablesx1, x2, . . . , xn is a finite collection of linear equations.

Example 4

−x1 + x2 = 5

x1 + 5x2 = 1

2x − 7y = −1

x + 3y = 6

2x1 − x2 + 3x3 = 8

x1 + 3x2 − 2x3 = 7

−3x1 + x3 = 3

Dr. Abdulla Eid (University of Bahrain) Linear System 4 / 33

Page 5: d Section 1.1 System of Linear Equationsabdullaeid.net/teaching/Fall2018/slides/MATHS211Fall2017Section1… · d Goals: 1 De ne system of linear equations and their solutions. 2 To

Dr. AbdullaEid

General definition of linear system

Definition 5

A general linear system of m equations and n variables x1, x2, . . . , xn canbe written as

a11x1 + + a12x2 + + · · ·+ a1nxn = b1

a21x1 + + a22x2 + + · · ·+ a2nxn = b2

.

.

.

am1x1 + + am2x2 + + · · ·+ amnxn = bm

Dr. Abdulla Eid (University of Bahrain) Linear System 5 / 33

Page 6: d Section 1.1 System of Linear Equationsabdullaeid.net/teaching/Fall2018/slides/MATHS211Fall2017Section1… · d Goals: 1 De ne system of linear equations and their solutions. 2 To

Dr. AbdullaEid

Solution to a system of linear equations

Definition 6

A solution is a list of numbers (s1, s2, . . . , sn) that makes each equation atrue statement when we substitute x1 = s1, x2 = s2, . . . , xn = sn. Asolution set is the set of all possible solution to a linear system.

Example 7

Show that (3, 2) is a solution to the system

3x1 − x2 = 7

−x1 + 4x2 = 5

Example 8

Show that (−1, 0, 2) is a solution to the system

x + y − z = 1

3x + y = −3

3x − 4y + 5z = 7Dr. Abdulla Eid (University of Bahrain) Linear System 6 / 33

Page 7: d Section 1.1 System of Linear Equationsabdullaeid.net/teaching/Fall2018/slides/MATHS211Fall2017Section1… · d Goals: 1 De ne system of linear equations and their solutions. 2 To

Dr. AbdullaEid

Solution to a system of linear equations

Example 9

Show that (1 + 5t, 3− t, t) is a solution to the system for any t ∈ R.

x1 + 6x2 + x3 = 19

x1 − 5x3 = 1

3x1 − x2 + 16x3 = 0

The solution of linear system that depends on free variable is calledparametric solution

Dr. Abdulla Eid (University of Bahrain) Linear System 7 / 33

Page 8: d Section 1.1 System of Linear Equationsabdullaeid.net/teaching/Fall2018/slides/MATHS211Fall2017Section1… · d Goals: 1 De ne system of linear equations and their solutions. 2 To

Dr. AbdullaEid

Representing Linear System as augmented matrix andmatrix form

Example 10

Represent the linear system in two forms−x1 + x2 = 5

x1 + 5x2 = 1

2x − 7y = −1

x + 3y = 6

2x1 − x2 + 3x3 = 8

x1 + 3x2 − 2x3 = 7

−3x1 + x3 = 3

Dr. Abdulla Eid (University of Bahrain) Linear System 8 / 33

Page 9: d Section 1.1 System of Linear Equationsabdullaeid.net/teaching/Fall2018/slides/MATHS211Fall2017Section1… · d Goals: 1 De ne system of linear equations and their solutions. 2 To

Dr. AbdullaEid

Solving System of Linear Equations using elementary rowoperations

Example 11

Solve the system

2x − 7y = −1

x + 3y = 6

Solution: First we write the augmented matrix of the system which is(2 −7 | −11 3 | 6

), R1 ↔ R2(

1 3 | 62 −7 | −1

), R2 → R2 − 2R1(

1 3 | 62− 2(1) −7− 2(3) | −1− 2(6)

)

Dr. Abdulla Eid (University of Bahrain) Linear System 9 / 33

Page 10: d Section 1.1 System of Linear Equationsabdullaeid.net/teaching/Fall2018/slides/MATHS211Fall2017Section1… · d Goals: 1 De ne system of linear equations and their solutions. 2 To

Dr. AbdullaEid

(1 3 | 6

2− 2(1) −7− 2(3) | −1− 2(6)

),(

1 3 | 60 −13 | −13

)R2 →

1

−13R2(

1 3 | 60 1 | 1

)R1 → R1 − 3R2(

1− 3(0) 3− 3(1) | 6− 3(1)0 1 | 1

)(

1 0 | 30 1 | 1

)

So x = 3 and y = 1 and thus the solution set is {(3, 1)}

Dr. Abdulla Eid (University of Bahrain) Linear System 10 / 33

Page 11: d Section 1.1 System of Linear Equationsabdullaeid.net/teaching/Fall2018/slides/MATHS211Fall2017Section1… · d Goals: 1 De ne system of linear equations and their solutions. 2 To

Dr. AbdullaEid

Example 12

Solve the system

x + y − z = 7

4x + 6y − 4z = 8

x − y − 5z = 23

Solution: First we write the augmented matrix of the system which is1 1 −1 | 74 6 −4 | 81 −1 −5 | 23

, R2 → R2 − 4R1 R3 → R3 − R1

1 1 −1 | 74− 4(1) 6− 4(1) −4− 4(−1) | 8− 4(7)

1− 1 −1− 1 −5− (−1) | 23− 7

1 1 −1 | 7

0 2 0 | −200 −2 −4 | 16

R2 →1

2R2

Dr. Abdulla Eid (University of Bahrain) Linear System 11 / 33

Page 12: d Section 1.1 System of Linear Equationsabdullaeid.net/teaching/Fall2018/slides/MATHS211Fall2017Section1… · d Goals: 1 De ne system of linear equations and their solutions. 2 To

Dr. AbdullaEid

1 1 −1 | 70 1 0 | −100 −2 −4 | 16

, R3 → R3 + 2R2

1 1 −1 | 70 1 0 | −100 −2 + 2(1) −4 + 2(0) | 16 + 2(−10)

1 1 −1 | 7

0 1 0 | −100 0 −4 | −4

R3 →1

−4R3

1 1 −1 | 70 1 0 | −100 0 1 | 1

R1 → R1 + R3

1 + 1(0) 1 + 1(0) −1 + 1(1) | 7 + 1(1)0 1 0 | −100 0 1 | 1

1 1 0 | 8

0 1 0 | −100 0 1 | 1

R1 → R1 − R3

1 0 0 | 180 1 0 | −100 0 1 | 1

Dr. Abdulla Eid (University of Bahrain) Linear System 12 / 33

Page 13: d Section 1.1 System of Linear Equationsabdullaeid.net/teaching/Fall2018/slides/MATHS211Fall2017Section1… · d Goals: 1 De ne system of linear equations and their solutions. 2 To

Dr. AbdullaEid

1 1 0 | 80 1 0 | −100 0 1 | 1

R1 → R1 − R3

1 0 0 | 180 1 0 | −100 0 1 | 1

So x = 18, y = −10, and z = 1.Solution Set = {(18,−10, 1)}.

Dr. Abdulla Eid (University of Bahrain) Linear System 13 / 33

Page 14: d Section 1.1 System of Linear Equationsabdullaeid.net/teaching/Fall2018/slides/MATHS211Fall2017Section1… · d Goals: 1 De ne system of linear equations and their solutions. 2 To

Dr. AbdullaEid

Example 13

Solve the system

x + 4y = 9

3x − y = 6

2x − 2y = 4

Solution: First we write the augmented matrix of the system which is1 4 | 93 −1 | 62 −2 | 4

, R2 → R2 − 3R1 R3 → R3 − 2R1

1 4 | 93− 3(1) −1− 3(4) | 6− 3(9)2− 2(1) −2− 2(4) | 4− 2(9)

1 4 | 9

0 −13 | −210 −10 | −14

R2 →1

−13R2

Dr. Abdulla Eid (University of Bahrain) Linear System 14 / 33

Page 15: d Section 1.1 System of Linear Equationsabdullaeid.net/teaching/Fall2018/slides/MATHS211Fall2017Section1… · d Goals: 1 De ne system of linear equations and their solutions. 2 To

Dr. AbdullaEid

1 4 | 90 1 | −21

−130 −10 | −14

, R3 → R3 + 10R2

1 4 | 90 1 | −21

−130 −10 + 10(1) | −14 + 10(−21−13 )

1 4 | 9

0 1 | −21−13

0 0 | 2813

We have 0 = 2813 which is a false statement and thus there will be no

solution.

Dr. Abdulla Eid (University of Bahrain) Linear System 15 / 33

Page 16: d Section 1.1 System of Linear Equationsabdullaeid.net/teaching/Fall2018/slides/MATHS211Fall2017Section1… · d Goals: 1 De ne system of linear equations and their solutions. 2 To

Dr. AbdullaEid

Example 14

Solve the system

x − y + 2z = 5

2x − 2y + 4z = 10

3x − 3yy + 6z = 15

Solution:

Dr. Abdulla Eid (University of Bahrain) Linear System 16 / 33

Page 17: d Section 1.1 System of Linear Equationsabdullaeid.net/teaching/Fall2018/slides/MATHS211Fall2017Section1… · d Goals: 1 De ne system of linear equations and their solutions. 2 To

Dr. AbdullaEid

Example 15

Solve the system

x + y + z = 9

x + 5y + 10z = 44

Solution:

Dr. Abdulla Eid (University of Bahrain) Linear System 17 / 33

Page 18: d Section 1.1 System of Linear Equationsabdullaeid.net/teaching/Fall2018/slides/MATHS211Fall2017Section1… · d Goals: 1 De ne system of linear equations and their solutions. 2 To

Dr. AbdullaEid

Types of solutions for a linear system

Consistent. It has a solution.1 Unique solution. No free variables.2 Infinitely many solutions

Inconsistent. It has no solution.

Dr. Abdulla Eid (University of Bahrain) Linear System 18 / 33

Page 19: d Section 1.1 System of Linear Equationsabdullaeid.net/teaching/Fall2018/slides/MATHS211Fall2017Section1… · d Goals: 1 De ne system of linear equations and their solutions. 2 To

Dr. AbdullaEid

Example 16

Find the value of h such that the system has (a) unique solution, (b) nosolution, (c) infinitely many solutions.

x + hy = 4

3x + 6y = 8

Dr. Abdulla Eid (University of Bahrain) Linear System 19 / 33

Page 20: d Section 1.1 System of Linear Equationsabdullaeid.net/teaching/Fall2018/slides/MATHS211Fall2017Section1… · d Goals: 1 De ne system of linear equations and their solutions. 2 To

Dr. AbdullaEid

Example 17

Find the value of h, k such that the system has (a) unique solution, (b) nosolution, (c) infinitely many solutions.

x1 + hy = 2

4x + 8y = k

Dr. Abdulla Eid (University of Bahrain) Linear System 20 / 33

Page 21: d Section 1.1 System of Linear Equationsabdullaeid.net/teaching/Fall2018/slides/MATHS211Fall2017Section1… · d Goals: 1 De ne system of linear equations and their solutions. 2 To

Dr. AbdullaEid

What is the height of the table?

Dr. Abdulla Eid (University of Bahrain) Linear System 21 / 33

Page 22: d Section 1.1 System of Linear Equationsabdullaeid.net/teaching/Fall2018/slides/MATHS211Fall2017Section1… · d Goals: 1 De ne system of linear equations and their solutions. 2 To

Dr. AbdullaEid

Network Flow

Dr. Abdulla Eid (University of Bahrain) Linear System 22 / 33

Page 23: d Section 1.1 System of Linear Equationsabdullaeid.net/teaching/Fall2018/slides/MATHS211Fall2017Section1… · d Goals: 1 De ne system of linear equations and their solutions. 2 To

Dr. AbdullaEid

Lines in 2–D

Example 18

Solve the system geometrically

2x − 7y = 2, x + 3y = 6

x

y

`1`2

Dr. Abdulla Eid (University of Bahrain) Linear System 23 / 33

Page 24: d Section 1.1 System of Linear Equationsabdullaeid.net/teaching/Fall2018/slides/MATHS211Fall2017Section1… · d Goals: 1 De ne system of linear equations and their solutions. 2 To

Dr. AbdullaEid

Lines in 2–D

Example 19

Solve the system geometrically

2x + 6y = 2, x + 3y = 6

x

y

`1

`2

Dr. Abdulla Eid (University of Bahrain) Linear System 24 / 33

Page 25: d Section 1.1 System of Linear Equationsabdullaeid.net/teaching/Fall2018/slides/MATHS211Fall2017Section1… · d Goals: 1 De ne system of linear equations and their solutions. 2 To

Dr. AbdullaEid

Lines in 2–D

Example 20

Solve the system geometrically

2x + 6y = 12, x + 3y = 6

x

y

`1`2

Dr. Abdulla Eid (University of Bahrain) Linear System 25 / 33

Page 26: d Section 1.1 System of Linear Equationsabdullaeid.net/teaching/Fall2018/slides/MATHS211Fall2017Section1… · d Goals: 1 De ne system of linear equations and their solutions. 2 To

Dr. AbdullaEid

Lines in 3–D

Example 21

Solve the system geometrically

x + 2y − z = 3, x + 3y + 5z = −1

x

y

z

line ofintersection

Dr. Abdulla Eid (University of Bahrain) Linear System 26 / 33

Page 27: d Section 1.1 System of Linear Equationsabdullaeid.net/teaching/Fall2018/slides/MATHS211Fall2017Section1… · d Goals: 1 De ne system of linear equations and their solutions. 2 To

Dr. AbdullaEid

Solving Linear System using the inverse of a matrix

Example 22

Solve

3x + y = 2

4x + y = 3

Solution: This system can be written in a matrix multiplication form as(3 14 1

)(xy

)=

(23

)A

(xy

)=

(23

)A−1A

(xy

)= A−1

(23

)I2

(xy

)= A−1

(23

)Dr. Abdulla Eid (University of Bahrain) Linear System 27 / 33

Page 28: d Section 1.1 System of Linear Equationsabdullaeid.net/teaching/Fall2018/slides/MATHS211Fall2017Section1… · d Goals: 1 De ne system of linear equations and their solutions. 2 To

Dr. AbdullaEid(

xy

)= A−1

(23

)=

(−1 14 −3

)(23

)(xy

)=

(1−1

)

Dr. Abdulla Eid (University of Bahrain) Linear System 28 / 33

Page 29: d Section 1.1 System of Linear Equationsabdullaeid.net/teaching/Fall2018/slides/MATHS211Fall2017Section1… · d Goals: 1 De ne system of linear equations and their solutions. 2 To

Dr. AbdullaEid

Exercise 23

Solve the following system using the inverse matrix method.

2x − 3y = 9

4x + y = 1

Dr. Abdulla Eid (University of Bahrain) Linear System 29 / 33

Page 30: d Section 1.1 System of Linear Equationsabdullaeid.net/teaching/Fall2018/slides/MATHS211Fall2017Section1… · d Goals: 1 De ne system of linear equations and their solutions. 2 To

Dr. AbdullaEid

Cramer’s Rule

Theorem 24

If Ax = b is a system of n linear equations in n unknowns such thatdet(A) = 6= 0, then the system has a unique solution given by

x1 =det(A1)

det(A), x2 =

det(A2)

det(A), . . . xn =

det(An)

det(A),

where Aj is the matrix obtained by replacing the entries in the jth columnof A by the entries in the matrix

b =

b1b2···bn

Dr. Abdulla Eid (University of Bahrain) Linear System 30 / 33

Page 31: d Section 1.1 System of Linear Equationsabdullaeid.net/teaching/Fall2018/slides/MATHS211Fall2017Section1… · d Goals: 1 De ne system of linear equations and their solutions. 2 To

Dr. AbdullaEid

Example 25

Solve using Cramer’s rule the following system of linear equations

3x1 + x2 = 2

4x1 + x2 = 3

Solution:

Dr. Abdulla Eid (University of Bahrain) Linear System 31 / 33

Page 32: d Section 1.1 System of Linear Equationsabdullaeid.net/teaching/Fall2018/slides/MATHS211Fall2017Section1… · d Goals: 1 De ne system of linear equations and their solutions. 2 To

Dr. AbdullaEid

Example 26

Solve using Cramer’s rule the following system of linear equations

3x1 + 5x2 = 7

6x1 + 2x2 + 4x3 = 10

−x1 + 4x2 − 3x3 = 0

Solution:

Dr. Abdulla Eid (University of Bahrain) Linear System 32 / 33

Page 33: d Section 1.1 System of Linear Equationsabdullaeid.net/teaching/Fall2018/slides/MATHS211Fall2017Section1… · d Goals: 1 De ne system of linear equations and their solutions. 2 To

Dr. AbdullaEid

The equation Ax = b

Theorem 27

The following are equivalent:

1 A is invertible.

2 det(A) 6= 0.

3 The reduced row echelon form is In.

4 Ax = b is consistent for every n× 1 matrix b.

5 Ax = b has a unique solution for every n× 1 matrix b.

Dr. Abdulla Eid (University of Bahrain) Linear System 33 / 33