+ All Categories
Home > Documents > Chapter 4 Linear Equations and Matrices

Chapter 4 Linear Equations and Matrices

Date post: 02-May-2017
Category:
Upload: alan-truong
View: 278 times
Download: 1 times
Share this document with a friend
29
MATH1131 Algebra, 2014 Group 4 — Mon 9 am, Thu 12 noon Dr. Chi Mak School of Mathematics and Statistics University of New South Wales [email protected] Chi Mak (UNSW) MATH1131 Algebra 1 / 57 Chapter 4 Linear Equations and Matrices What are the geometric interpretations of 1 x = 1 on a real number line? 2 x = 1 in the xy -plane? 3 x = 1 in the three dimensional space? Chi Mak (UNSW) Linear Equations 2 / 57
Transcript
Page 1: Chapter 4 Linear Equations and Matrices

MATH1131 Algebra, 2014Group 4 — Mon 9 am, Thu 12 noon

Dr. Chi Mak

School of Mathematics and StatisticsUniversity of New South Wales

[email protected]

Chi Mak (UNSW) MATH1131 Algebra 1 / 57

Chapter 4 Linear Equations and Matrices

What are the geometric interpretations of

1 x = 1 on a real number line?

2 x = 1 in the xy -plane?

3 x = 1 in the three dimensional space?

Chi Mak (UNSW) Linear Equations 2 / 57

Page 2: Chapter 4 Linear Equations and Matrices

Solution Set of a Linear Equation.

Strictly speaking, we are referring to three different sets

1 {x ∈ R : x = 1} = {1}.

2

{(xy

)∈ R2 : x + 0y = 1

}=

{(1λ

): λ ∈ R

}.

3

x

yz

∈ R3 : x + 0y + 0z = 1

=

1λµ

: λ, µ ∈ R

.

How to solve the linear equation x − 2y = 1?Algebraically, the equation does not impose restriction on any variableother than x and y . Hence the solution set is given by

If there are other variables for consideration, they can take up any valueand we should set a parameter to each of the variables.

Chi Mak (UNSW) Linear Equations 3 / 57

How about a system of two linear equations in two variables?{a1x + b1y = c1,

a2x + b2y = c2.

Case 1. If one of the equations is of the form 0x + 0y = c and c 6= 0, thenthe solution set is an empty set. That is there is no solution.

Case 2. If none of the equations is of the form mentioned in Case 1 and one ofthe equations is 0x + 0y = 0, then there are infinitely many solutions.

Case 3. Otherwise, we can interpret the two equations as two lines in thexy -plane.

• The two lines are parallel, so there is no solution.

For example,

{2x + 3y = 2,4x + 6y = 3.

• The two lines intersect at one point, so there is a unique solution.

For example,

{2x + 3y = 2,4x + 3y = 3.

Chi Mak (UNSW) Linear Equations 4 / 57

Page 3: Chapter 4 Linear Equations and Matrices

• The two lines are the same, so there are infinitely many solutions.

For example,

{2x + 3y = 2,4x + 6y = 4.

For a system of three linear equations in three variablesa1x + b1y + c1z = d1,

a2x + b2y + c2z = d2,

a3x + b3y + c3z = d3.Ignore the case that there is an equation with the left hand side 0. We caninterpret the equations as three planes in the 3-dimensional space.

The three planes intersect at one point, so there is a unique solution.

The three planes intersect at a line (including the case that two of theplanes are identical), so there is a unique solution.

The three planes are the same, so there are infinitely many solutions.

The three planes do not have a point in common, so there is nosolution.

The only possibilities of the solutions to the about systems of linearequations are — a unique solution, no solution, infinitely many solutions.

Chi Mak (UNSW) Linear Equations 5 / 57

Example

Find and geometrically describe the solutions of the following system.x1 − 2x2 + 3x3 = 2,

2x1 − 3x2 + 4x3 = 5.

Solution

Chi Mak (UNSW) Linear Equations 6 / 57

Page 4: Chapter 4 Linear Equations and Matrices

Example

Find and geometrically describe the solutions of the following system.x + 2y − z = 1,

2x − y + z = 3,x + y − 2z = −2.

Solution

Chi Mak (UNSW) Linear Equations 7 / 57

Solution (Continued)

Attempt Problems 4.1Chi Mak (UNSW) Linear Equations 8 / 57

Page 5: Chapter 4 Linear Equations and Matrices

Augmented Matrix

We used the “high school method” to solve the system of equations in theprevious examples. Disadvantages of such a method:

We might miss out some equations and mistakenly get a solution foran inconsistent system (i.e. one which does not have a solution).

Quite likely, we cannot see whether a system has infinitely manysolutions and which variables should be chosen to be parameters.

To address such issues, we have to keep track of all the equations. Tosolve the system, we iteratively change the system to another which hasexactly the same solution set until we get the solution(s).To save time, we shall adopt a shorthand notation to write the system ofequations

a11x1 + a12x2 + · · · + a1nxn = b1

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

......

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

(*)

Chi Mak (UNSW) Matrices and Row Operations 9 / 57

as an augmented matrix (a matrix is a rectangular array of numbers):a11 a12 · · · a1n b1

a21 a22 · · · a2n b2...

.... . .

......

am1 am2 · · · amn bm

We can also write the system as a vector equation —

x1

a11a21

...am1

+ x2

a12a22

...am2

+ · · ·+ xn

a1na2n

...amn

=

b1

b2...

bm

,

It is also denoted by a matrix equation —a11 a12 · · · a1na21 a22 · · · a2n

......

. . ....

am1 am2 · · · amn

x1x2...

xn

=

b1

b2...

bn

.

Chi Mak (UNSW) Matrices and Row Operations 10 / 57

Page 6: Chapter 4 Linear Equations and Matrices

Remarks

Now, we write aj =

a1ja2j...

amj

, x =

x1x2...

xn

, b =

b1

b2...

bn

, and the matrix

A =

a11 a12 · · · a1na21 a22 · · · a2n

......

. . ....

am1 am2 · · · amn

.

1. The augmented matrix is then denoted by (A|b). The ith row(ai1 ai2 · · · ain bi

)is denoted by Ri .

2. The vector equation form can written asx1 a1 + x2 a2 + · · ·+ xn an = b.

By the definition of addition and scalar multiplication in Rm, we caneasily see why we can write the system of equations as the vectorequation.

Chi Mak (UNSW) Matrices and Row Operations 11 / 57

Remarks (Continued)

3. The matrix A is called the coefficient matrix. In matrix equation fromwe can write Ax = b. In factor, in the next Chapter we shall see thatthis can be treated as the motivation of the definition of matrixmultiplication.

Example

Write each of the systems of equations of the last two examples in theprevious section as an augmented matrix, a vector equation and a matrixequation.

Solution

Chi Mak (UNSW) Matrices and Row Operations 12 / 57

Page 7: Chapter 4 Linear Equations and Matrices

Solution (Continued)

Chi Mak (UNSW) Matrices and Row Operations 13 / 57

Elementary Row Operation.

We shall solve a system of equations in the form of an augmented matrixby iteratively changing the system to another with the same solution setuntil we get the matrix in a desirable form.The following operations are called elementary row operations. Thesolution set of the system will not change if we apply these operations oneat a time to the augmented matrix of the system. In order to keep track ofthe operations, we should record clearly the operations used.

Interchange two rows. Interchange row i and row j is recorded byRi ↔ Rj .

Adding a multiple of a row to another. Adding k times row j torow i is recorded by Ri = Ri + kRj .

Multiplying a row by a non-zero number. Multiplying row i by anon-zero number k is recorded by Ri = kRi .

Chi Mak (UNSW) Matrices and Row Operations 14 / 57

Page 8: Chapter 4 Linear Equations and Matrices

Example

Perform the row operations R1 ↔ R2, R2 = R2 − 3R1, R3 = R3 + 2R1,R2 = 1

7R2, R3 = R3 − R2 in order on the matrix 3 1 −61 −2 5−2 5 1

∣∣∣∣∣∣−4

14.

Solution

Chi Mak (UNSW) Matrices and Row Operations 15 / 57

Solution (Continued)

Chi Mak (UNSW) Matrices and Row Operations 16 / 57

Page 9: Chapter 4 Linear Equations and Matrices

Example

What is wrong with the following?(2 1 2 32 4 −2 8

)R1 = R1 − R2−−−−−−−−−−−−−→R2 = R2 − R1

(0 −3 4 −50 3 −4 5

)

Solution

Attempt Problems 4.2, 4.3Chi Mak (UNSW) Matrices and Row Operations 17 / 57

Row-echelon Form and Reduced Row-echelon Form

Definition

In any matrix

a leading row is one which is not all zeros,

the leading entry in a leading row is the first (i.e. leftmost) non-zeroentry,

a leading column is a column which contains the leading entry forsome row.

Desirable forms from which we can work out the solution set:

Definition (Row-echelon Form)

A matrix is said to be in row-echelon form if

1) in every leading row, the leading entry is further to the right than theleading entry in any rows higher up in the matrix, and

2) all non-leading rows are at the bottom of the matrix.

Chi Mak (UNSW) Gaussian Elimination 18 / 57

Page 10: Chapter 4 Linear Equations and Matrices

Definition (Reduced Row-echelon Form)

A matrix is said to be in reduced row-echelon form if it is in row-echelonform and in addition

3) every leading entry is 1, and

4) every leading entry is the only non-zero entry in its column.

Example

For each of the following matrices, identify the leading rows circle theleading entries in each leading row. State whether it is in row-echelonform, reduced row-echelon or not in row-echelon form. If it is inrow-echelon from, identify the leading columns.

1)

2 3 4 110 −3 2 70 0 4 8

Leading rows:Leading columns:Non-leading columns:

Chi Mak (UNSW) Gaussian Elimination 19 / 57

Example (Continued.)

2)

2 3 4 110 0 4 80 −3 2 7

Leading rows:Leading columns:Non-leading columns:

3)

1 3 4 110 0 0 00 1 2 70 0 1 8

Leading rows:Leading columns:Non-leading columns:

4)

1 3 4 110 1 2 70 0 1 80 0 0 0

Leading rows:Leading columns:Non-leading columns:

Chi Mak (UNSW) Gaussian Elimination 20 / 57

Page 11: Chapter 4 Linear Equations and Matrices

Example (Continued.)

5)

2 3 0 0 110 0 2 0 70 0 0 1 0

Leading rows:Leading columns:Non-leading columns:

6)

1 3 4 1 110 0 1 2 70 0 1 1 8

Leading rows:Leading columns:Non-leading columns:

7)

1 3 4 1 110 0 1 2 70 0 0 0 8

Leading rows:Leading columns:Non-leading columns:

8)

1 0 4 0 110 1 2 0 70 0 0 1 8

Leading rows:Leading columns:Non-leading columns:

Chi Mak (UNSW) Gaussian Elimination 21 / 57

Gaussian Elimination

Gaussian Elimination is an algorithm for reducing a matrix to arow-echelon matrix.

1 Select a pivot element: from the leftmost column which is not allzeros choose a non-zero entry as the pivot entry. (The columncontaining the pivot entry is called the pivot column and the rowcontaining the pivot entry is called the pivot row.)

2 Swap the pivot row and the top row if necessary.

3 Eliminate (i.e., reduce to 0) all entries in the pivot column below thepivot element.

4 Repeat steps (1) to (3) on the submatrix of rows and columns strictlyto the right of and below the pivot element and stop when theaugmented matrix is in row-echelon form.

Chi Mak (UNSW) Gaussian Elimination 22 / 57

Page 12: Chapter 4 Linear Equations and Matrices

Remarks

The process of reduce a matrix to a row-echelon form is called rowreduction.

When we carry out Gaussian elimination by hand, we better choose 1or −1, if possible, to be the pivot element to avoid fractions.

The Gaussian elimination does not need the row operation“multiplying a row by a number”. However, if a row consists ofintegers which have a common factor, we better use this operation todivide the whole row by the highest common factor.

Besides using the “multiply a row by a number”, do follow theGaussian elimination.

Different choices of pivots and different order of applying rowoperations may end up with different row-echelon form matrices.However, all these row-echelon matrices represent systems with thesame solution set.

Chi Mak (UNSW) Gaussian Elimination 23 / 57

Example

Reduce

3 2 1 82 3 1 91 2 3 8

to a row-echelon form.

Solution

Chi Mak (UNSW) Gaussian Elimination 24 / 57

Page 13: Chapter 4 Linear Equations and Matrices

Example

Reduce

0 0 0 −1 3 −20 3 −3 3 3 −60 2 −2 1 5 −1

to a row-echelon form.

Solution

Chi Mak (UNSW) Gaussian Elimination 25 / 57

Solution (Continued)

Chi Mak (UNSW) Gaussian Elimination 26 / 57

Page 14: Chapter 4 Linear Equations and Matrices

Solutions of a System of Linear Equations

At any stage of row-reduction, if there is a row

(0 0 · · · 0 |α) where α 6= 0,

then the system has no solution. A system is said to be inconsistent if ithas no solution. For example in the previous example, the systemrepresented by the given augmented matrix is inconsistent, because

Example

Is the system represented by

1 2 3 80 −1 −5 −70 0 −3 0

inconsistent?

In particular, if the right hand column of a row-echelon matrix for asystem of equations is leading, then the system is inconsistent.

Chi Mak (UNSW) Solving System of Equations 27 / 57

Unique Solution

If the right hand column of a row-echelon form is non-leading, the systemof equations has a solution or solutions, and we say the system isconsistent.Case 1. The right hand column is non-leading and all left hand columnsare leading. We then can solve the system by back-substitution.

Example

Suppose that, after row reduction, the augmented matrix of a system of

equations in x1, x2, x3 is reduced to

1 2 3 80 −1 −5 −70 0 −3 −3

. Solve the

system of equations.

Solution

Chi Mak (UNSW) Solving System of Equations 28 / 57

Page 15: Chapter 4 Linear Equations and Matrices

Solution (Continued)

Chi Mak (UNSW) Solving System of Equations 29 / 57

Infinitely Many Solutions

Case 2. The right hand column is non-leading, and some left handcolumns are non-leading.The variables corresponding to the non-leading columns are callednon-leading variables. We solve the system from its row-echelon matrixalso by assigning each non-leading variable a (different) parameter thenback-substitution.

Example

Solve the following system of equations.x1 − x2 + 2x3 + x4 + 2x5 = 1

2x3 + x4 + 3x5 = 3x4 = 1

Solution

Chi Mak (UNSW) Solving System of Equations 30 / 57

Page 16: Chapter 4 Linear Equations and Matrices

Solution (Continued.)

Chi Mak (UNSW) Solving System of Equations 31 / 57

Reduced Row-echelon Form.

Continue from a row-echelon matrix.

(5) Start with the lowest row which is not all zeros. Multiply it by asuitable constant to make its leading entry 1.

(6) Add multiples of this row to higher rows to get all zeros in the columnabove the leading entry of this row.

(7) Repeat steps (5) and (6) with the second lowest non-zero row, and soon until the matrix is in reduced row-echelon form.

Example

Reduce the augmented matrix forx1 − x2 + 2x3 + x4 + 2x5 = 1

2x3 + x4 + 3x5 = 3x4 = 1

to reduced row-echelon form and solve the system of equations.

Chi Mak (UNSW) Solving System of Equations 32 / 57

Page 17: Chapter 4 Linear Equations and Matrices

Solution

Chi Mak (UNSW) Solving System of Equations 33 / 57

Solution (Continued.)

We can almost read the solutions from the reduced row-echelon from.Practically, by hand, we do not reduce an augmented matrix to reducedrow-echelon form because the reduction of a row-echelon form to thereduced one normally involving tedious arithmetic (fractions).

Attempt Problems 4.4

Chi Mak (UNSW) Solving System of Equations 34 / 57

Page 18: Chapter 4 Linear Equations and Matrices

As a summary, to solve a system of linear equations, we first write thesystem as an augmented matrix and reduce it to a row-echelon form.

1 If the right hand column is leading, the system is inconsistent, i.e. ithas no solution.

2 If the right hand column is non-leading, the system is consistent.Then we have the following possibilities:

a) all columns on the left are leading and so the system has a uniquesolution;

b) some columns on the left are non-leading and so the system hasinfinitely many solutions.

We then set a parameter to each of the non-leading variables if there isany and get the solution(s) by back substitution.

Example

For the row-echelon forms in the example on page 17, which one(s) has(i) no solution, (ii) unique solution, (iii) infinitely many solutions.

Chi Mak (UNSW) Deducing Solubility from Row-echelon Form 35 / 57

Solution

1)

2 3 4 110 −3 2 70 0 4 8

4)

1 3 4 110 1 2 70 0 1 80 0 0 0

5)

2 3 0 0 110 0 2 0 70 0 0 1 0

7)

1 3 4 1 110 0 1 2 70 0 0 0 8

8)

1 0 4 0 110 1 2 0 70 0 0 1 8

Chi Mak (UNSW) Deducing Solubility from Row-echelon Form 36 / 57

Page 19: Chapter 4 Linear Equations and Matrices

Example

When the right hand sides of all equations in a system of linear equationsare zero, the system is called homogeneous.A homogeneous system always has at least one solution. Why?

Example

Consider the system of equations given in augmented matrix form by 1 1 2 10 2− 2k 1 20 0 3k − 6 0

a) State the value(s) of k for which the system has a unique solution.

b) For what value(s) of k does the system have infinitely many solutions?

c) Find the value(s) of k for which the system is inconsistent.

Chi Mak (UNSW) Deducing Solubility from Row-echelon Form 37 / 57

Solution

Chi Mak (UNSW) Deducing Solubility from Row-echelon Form 38 / 57

Page 20: Chapter 4 Linear Equations and Matrices

Example

A chemistry laboratory has available 3 kinds of hydrochloric acid:10%, 30%, and 50% solutions. How many litres of each kind should bemixed to obtain 100 litres of 25%.

We have a surplus of the 50% concentrate. Find the solution that uses asmuch of this as possible to give the correct mixture.

Solution

Chi Mak (UNSW) Deducing Solubility from Row-echelon Form 39 / 57

Solution (Continued)

Attempt Problems 4.5.

Chi Mak (UNSW) Deducing Solubility from Row-echelon Form 40 / 57

Page 21: Chapter 4 Linear Equations and Matrices

System of Equations with Indeterminate Right Hand Sides

Example

Solve

x1 + x2 + x3 = b1,

2x1 + x2 − x3 = b2,x1 + x2 + 2x3 = b3.

Solution

Chi Mak (UNSW) Ax = b for Indeterminate b 41 / 57

Solution (Continued.)

Chi Mak (UNSW) Ax = b for Indeterminate b 42 / 57

Page 22: Chapter 4 Linear Equations and Matrices

Example

Find the condition on b1, b2, b3 such that the systemx1 + x2 + 3x3 + x4 = b1,

2x1 + 2x2 + 5x3 + 3x4 = b2,x3 − x4 = b3.

is consistent.

Solution

Chi Mak (UNSW) Ax = b for Indeterminate b 43 / 57

Solution (Continued.)

The above system may or may not have solutions. It depends on thevector b.

Chi Mak (UNSW) Ax = b for Indeterminate b 44 / 57

Page 23: Chapter 4 Linear Equations and Matrices

Example

If the augmented matrix (A|b) is reduced to a row-echelon form (U|y).What conclusion can be drawn

a) if U has no non-leading row;

b) if U has no non-leading column;

c) both (a) and (b)?

Solution

Chi Mak (UNSW) Ax = b for Indeterminate b 45 / 57

Example

Find the condition that v =

v1v2v3

is in the span

110

,

201

. Is the

vector

201

parallel to the plane

x =

132

+ λ

110

+ µ

201

, λ, µ ∈ R.

Solution

Chi Mak (UNSW) Ax = b for Indeterminate b 46 / 57

Page 24: Chapter 4 Linear Equations and Matrices

Solution (Continued.)

Attempt Problems 4.6

Chi Mak (UNSW) Ax = b for Indeterminate b 47 / 57

General properties of the solution of Ax = b

The following are true for a homogeneous system of linear equations.

1 0 is a solution.

2 If v, w are solutions and λ ∈ R then v + w and λv are solutions.

Suppose we write the system in matrix form Ax = 0. If a row-echelonform U of A has k non-leading columns, the general solution of thehomogeneous system can be written as

x = λ1v1 + · · ·+ λkvk ,

where λ1, . . . , λk ∈ R.

Furthermore, if xp is a solution to Ax = b, and v is a solution to Ax = 0then

x = xp + λ1v1 + · · ·+ λkvk

is the general solution of Ax = b.

Detail proofs can be found in MATH1131 Algebra Notes.Chi Mak (UNSW) Solution of Ax = b 48 / 57

Page 25: Chapter 4 Linear Equations and Matrices

Example

> with(LinearAlgebra):

> A:=<<2,4,-6>|<-3,2,7>|<0,16,-4>>;

A :=

2 −3 0

4 2 16

−6 7 −4

> LinearSolve(A,ZeroVector(3));

−3 t13

−2 t13

t13

a) Write down the general solution of the homogeneous equation

Ax = 0.

b) Find a the general solution of Ax = b, where b =

016

4

.

Chi Mak (UNSW) Solution of Ax = b 49 / 57

Solution

Attempt Problems 4.7

Chi Mak (UNSW) Solution of Ax = b 50 / 57

Page 26: Chapter 4 Linear Equations and Matrices

Example

Do the lines x =

346

+ λ

411

and

x =

−175

+ µ

421

intersect?

If they do, find the point of intersection.

Solution

Chi Mak (UNSW) Geometric Application 51 / 57

Solution (Continued.)

Chi Mak (UNSW) Geometric Application 52 / 57

Page 27: Chapter 4 Linear Equations and Matrices

Example

Does the point (3, 2, 1, 4) lie on the plane through (3, 1,−4,−7) parallel

to

2145

and

−1

316

?

Solution

Chi Mak (UNSW) Geometric Application 53 / 57

Solution (Continued.)

Chi Mak (UNSW) Geometric Application 54 / 57

Page 28: Chapter 4 Linear Equations and Matrices

Example

Find the intersection of the planes

x =

121

+ λ1

120

+ λ2

201

, and

x =

10−1

+ µ1

2−1

1

+ µ2

111

.

Solution

Chi Mak (UNSW) Geometric Application 55 / 57

Solution (Continued.)

Attempt Problems 4.8

Chi Mak (UNSW) Geometric Application 56 / 57

Page 29: Chapter 4 Linear Equations and Matrices

End of Chapter 4

Chi Mak (UNSW) Geometric Application 57 / 57


Recommended