50
1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

Embed Size (px)

Citation preview

Page 1: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

1

Systems of Linear Equation and Matrices

CHAPTER 1

FASILKOM UI 05

Page 2: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

2

Introduction ~ Matrices

Information in science and mathematics is often organized into rows and columns to form rectangular arrays.

Tables of numerical data that arise from physical observations

Example: (to solve linear equations)

Solution is obtained by performing appropriate operations on this matrix

412

315

42

35

yx

yx

Page 3: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

3

Introduction to Systems

of Linear Equations

Page 4: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

4

Linear Equations

In x y variables (straight line in the xy-plane)

where a1, a2, & b are real constants,

In n variables

where a1, …, an & b are real constants

x1, …, xn = unknowns.

Example 1 Linear Equations

The equations are linear (does not involve any products or roots of variables).

byaxa 21

bxaxaxa nn ...2211

73 yx 1321 zxy 732 4321 xxxx

Page 5: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

5

Linear Equations

The equations are not linear. A solution of is a sequence

of n numbers s1, s2, ..., sn Э they satisfy the equation when x1=s1, x2=s2, ..., xn=sn (solution set).

Example 2 Finding a Solution Set

1 equation and 2 unknown, set one var as the parameter (assign any value)

or

1 equation and 3 unknown, set 2 vars as parameter

53 yx 423 xzzyx xy sin

bxaxaxa nn ...2211

124 yx

212, tytx tytx ,4

121

574 321 xxx

txsxtsx 321 ,,745

Page 6: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

6

Linear Systems / System of Linear Equations Is A finite set of linear equations in the vars x1, ..., xn

s1, ..., sn is called a solution if x1=s1, ..., xn=sn is a solution of every equation in the system.

Ex.

x1=1, x2=2, x3=-1 the solution

x1=1, x2=8, x3=1 is not, satisfy only the first eq. System that has no solution : inconsistent System that has at least one solution: consistent

Consider:

493

134

321

321

xxx

xxx

00,:

00,:

112222

111111

bacybxal

bacybxal

Page 7: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

7

(x,y) lies on a line if and only if the numbers x and y satisfy the equation of the line. Solution: points of intersection l1 & l2

l1 and l2 may be parallel: no intersection, no solution

l1 and l2 may intersect at only one point: one solution

l1 and l2 may coincide: infinite many points of intersection, infinitely many solutions

Linear Systems

x

x

y1l 2l

x

y

x

y

1l 2l

21 & ll

Page 8: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

8

Linear Systems

In general: Every system of linear equations has either no solutions, exactly one solution, or infinitely many solutions.

An arbitrary system of m linear equations in n unknowns:a11x1 + a12x2 + ... + a1nxn = b1

a21x1 + a22x2 + ... + a2nxn = b2

am1x1 + am2x2 + ... + amnxn = bm

x1, ..., xn = unknowns, a’s and b’s are constants aij, i indicates the equation in which the coefficient

occurs and j indicates which unknown it multiplies

Page 9: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

9

Augmented Matrices

Example:

Remark: when constructing, the unknowns must be written in the same order in each equation and the constants must be on right.

mmnmm

n

n

baaa

baaa

baaa

21

222221

111211

0563

1342

92

321

321

321

xxx

xxx

xxx

0563

1342

9211

Page 10: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

10

Augmented Matrices

Basic method of solving system linear equations Step 1: multiply an equation through by a nonzero

constant. Step 2: interchange two equations. Step 3: add a multiple of one equation to another.

On the augmented matrix (elementary row operations): Step 1: multiply a row through by a nonzero

constant. Step 2: interchange two rows. Step 3: add a multiple of one equation to another.

Page 11: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

11

Elementary Row Operations (Example)

r2= -2r1 + r2

r3 = -3r1 + r3

0563:

1772:

92:

3

2

1

zyxr

zyr

zyxr

0563:

1342:

92:

3

2

1

zyxr

zyxr

zyxr

0563

1342

9211

0563

17720

9211

27113:

1772:

92:

3

2

1

zyr

zyr

zyxr

271130

17720

9211

Page 12: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

12

Elementary Row Operations (Example) r2 = ½ r2

r3 = -3r2 + r3

r3 = -2r3

27113:

:

92:

3

217

27

2

1

zyr

zyr

zyxr

271130

10

9211

217

27

23

21

3

217

27

2

1

:

:

92:

zr

zyr

zyxr

23

21

217

27

00

10

9211

3:

:

92:

3

217

27

2

1

zr

zyr

zyxr

310

10

9211

217

27

Page 13: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

13

Elementary Row Operations (Example) r1 = r1 – r2

r1 = -11/2 r3 + r1

r2 = 7/2 r3 + r2

Solution:

3:

:

:

3

217

27

2

235

211

1

zr

zyr

zxr

3100

10

01

217

27

235

211

3100

2010

1001

3:

2:

1:

3

2

1

zr

yr

xr3:

:

1:

3

217

27

2

1

zr

zyr

xr

3100

10

1001

217

27

Page 14: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

14

Gaussian Elimination

Page 15: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

15

Echelon Forms

Reduced row-echelon form, a matrix must have the following properties: If a row does not consist entirely of zeros the the

first nonzero number in the row is a 1 = leading 1 If there are any rows that consist entirely of zeros,

then they are grouped together at the bottom of the matrix.

In any two successive rows that do not consist entirely of zeros, the leading 1 in the lower row occurs farther to the right than the leading 1 in the higher row.

Each column that contains a leading 1 has zeros everywhere else.

Page 16: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

16

Echelon Forms

A matrix that has the first three properties is said to be in row-echelon form.

Example: Reduced row-echelon form:

Row-echelon form:

00

00,

00000

00000

31000

10210

,

100

010

001

,

1100

7010

4001

10000

01100

06210

,

000

010

011

,

51

261

7341

Page 17: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

17

Elimination Methods

Step 1: Locate the leftmost non zero column

Step 2: Interchange r2 ↔ r1.

Step 3: r1 = ½ r1.

Step 4: r3 = r3 – 2r1.

156542

281261042

1270200

156542

1270200

281261042

156542

1270200

1463521

29170500

1270200

1463521

Page 18: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

18

Elimination Methods

Step 5 : continue do all steps above until the entire matrix is in row-echelon form.

r2 = -½ r2

r3 = r3 – 5r2

r3 = 2r3

29170500

60100

1463521

27

10000

60100

1463521

21

27

210000

60100

1463521

27

Page 19: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

19

Elimination Methods

Step 6 : add suitable multiplies of each row to the rows above to introduce zeros above the leading 1’s.

r2 = 7/2 r3 + r2

r1 = -6r3 + r1

r1 = 5r2 + r1

210000

100100

1463521

210000

100100

203521

210000

100100

203521

Page 20: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

20

Elimination Methods

1-5 steps produce a row-echelon form (Gaussian Elimination). Step 6 is producing a reduced row-echelon (Gauss-Jordan Elimination).

Remark: Every matrix has a unique reduced row-echelon form, no matter how the row operations are varied. Row-echelon form of matrix is not unique: different sequences of row operations can produce different row- echelon forms.

Page 21: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

21

Back-substitution

Bring the augmented matrix into row-echelon form only and then solve the corresponding system of equations by back-substitution.

Example:

Page 22: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

22

Matrices and Matrix Operations

Page 23: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

23

Matrices and Matrix Operations

Page 24: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

24

Inverses; Rules of Matrix Arithmetic

Page 25: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

25

Properties of Matrix Operations

ab = ba for real numbers a & b, but AB ≠ BA even if both AB & BA are defined and have the same size.

Example:

03

63,

411

21

03

21,

32

01

BAAB

BA

Page 26: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

26

Properties of Matrix Operations

Theorem: Properties ofa) A+B = B+A

b) A+(B+C) = (A+B)+C

c) A(BC) = (AB)C

d) A(B+C) = AB+AC

e) (B+C)A = BA+CA

f) A(B-C) = AB-AC

g) (B-C)A = BA-CA

h) a(B+C) = aB+aC

i) a(B-C) = aB-aC

Math Arithmetic(Commutative law for addition)

(Associative law for addition)

(Associative for multiplication)

(Left distributive law)

(Right distributive law)j) (a+b)C = aC+bCk) (a-b)C = aC-bCl) a(bC) = (ab)Cm) a(BC) = (aB)C

Page 27: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

27

Properties of Matrix Operations

Proof (d): Proof for both have the same size:

Let size A be r x m matrix, B & C be m x n (same size).

This makes A(B+C) an r x n matrix, follows that AB+AC is also an r x n matrix.

Proof that corresponding entries are equal: Let A=[aij], B=[bij], C=[cij]

Need to show that [A(B+C)]ij = [AB+AC]ij for all values of i and j.

Use the definitions of matrix addition and matrix multiplication.

Page 28: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

28

Properties of Matrix Operations

Remark: In general, given any sum or any product of matrices, pairs of parentheses can be inserted or deleted anywhere within the expression without affecting the end result.

ij

ijij

mjimjijimjimjiji

mjmjimjjijjiij

ACAB

acAB

cacacabababa

cbacbacbaCBA

][

][][

)()(

)()()()]([

22112211

222111

Page 29: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

29

Zero Matrices

A matrix, all of whose entries are zero, such as

A zero matrix will be denoted by 0 or 0mxn for the mxn zero matrix. 0 for zero matrix with one column.

Properties of zero matrices: A + 0 = 0 + A = A A – A = 0 0 – A = -A A0 = 0; 0A = 0

0,

0

0

0

0

,0000

0000,

000

000

000

,00

00

Page 30: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

30

Identity Matrices

Square matrices with 1’s on the main diagonal and 0’s off the main diagonal, such as

Notation: In = n x n identity matrix.

If A = m x n matrix, then: AIn = A and InA = A

1000

0100

0010

0001

,

100

010

001

,10

01

Page 31: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

31

Identity Matrices

Example:

Theorem: If R is the reduced row-echelon form of an n x n matrix A, then either R has a row of zeros or R is the identity matrix In.

232221

131211

aaa

aaaA

Aaaa

aaa

aaa

aaaAI

232221

131211

232221

1312112

10

01

Aaaa

aaa

aaa

aaaAI

232221

131211

232221

1312113

100

010

001

Page 32: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

32

Identity Matrices

Definition: If A & B is a square matrix and same size Э AB = BA = I, then A is said to be invertible and B is called an inverse of A. If no such matrix B can be found, then A is said to be singular.

Example:

31

52,

21

53AB

IBA

IAB

10

01

31

52

21

53

10

01

21

53

31

52

Page 33: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

33

Properties of Inverses

Theorem: If B and C are both inverses of the matrix A, then B = C.

If A is invertible, then its inverse will be denoted by the symbol A-1.

The matrix

is invertible if ad-bc ≠ 0, in which case the inverse is given by the formula

dc

baA

bcad

a

bcad

cbcad

b

bcad

d

ac

bd

bcadA

11

Page 34: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

34

Properties of Inverses

Theorem: If A and B are invertible matrices of the same size, then AB is invertible and (AB)-1 = B-1A-1.

A product of any number of invertible matrices is invertible, and the inverse of the product is the product of the inverses in the reverse order. Example:

89

67,

22

23,

31

21ABBA

2

7

2

934

)(,1

11,

11

23 1

23

11 ABBA

2

7

2

934

11

23

1

11

23

11AB

Page 35: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

35

Powers of a Matrix If A is a square matrix, then we define the nonnegative integer

powers of A to beA0=I An = AA...A (n>0)

n factors Moreover, if A is invertible, then we define the negative integer

prowers to be A-n = (A-1)n = A-1A-1...A-1

n factors Theorem: Laws of Exponents

If A is a square matrix, and r and s are integers, then ArAs = Ar+s = Ars

If A is an invertible matrix, then A-1 is invertible and (A-1)-1 = A An is invertible and (An)-1 = (A-1)n for n = 0, 1, 2, ... For any nonzero scalar k, the matrix kA is invertible and

(kA)-1 = 1/k A-1.

Page 36: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

36

Powers of a Matrix

Example:

31

21A

11

231A

4115

3011

31

21

31

21

31

213A

1115

3041

11

23

11

23

11

23)( 313 AA

Page 37: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

37

Polynomial Expressions Involving Matrices If A is a square matrix, m x m, and if

is any polynomial, then we define

Example:

nnxaxaaxp 10)(

nnAaAaIaAp 10)(

432)( 2 xxxp

130

29

40

04

90

63

180

82

10

014

30

213

30

212432)(

2

2 IAAAp

Page 38: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

38

Properties of the Transpose

Theorem: If the sizes of the matrices are such that the stated operations can be performed, then

a) ((A)T)T = Ab) (A+B)T = AT + BT and (A-B)T = AT – BT

c) (kA)T = kAT, where k is any scalard) (AB)T = BTAT

The transpose of a product of any number of matrices is equal to the product of their transpose in the reverse order.

Page 39: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

39

Invertibility of a Transpose

Theorem: If A is an invertible matrix, then AT is also invertible and (AT)-1 = (A-1)T

Example:

53

21)(,

53

21)(,

52

31

13

25,

12

35

111 TT

T

AAA

AA

Page 40: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

40

Elementary Matrices and a Method for Finding A-1

Page 41: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

41

Elementary Matrices

Definition: An n x n matrix is called an elementary matrix if

it can be obtained from the n x n identity matrix In by performing a single elementary row operation.

Example:

1. Multiply the second row of I2 by -3.

2. Interchange the second and fourth rows of I4.

3. Add 3 times the third row of I3 to the first row.

100

010

301

:3,

0010

0100

1000

0001

:2,30

01:1

Page 42: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

42

Elementary Matrices

Theorem: (Row Operations by Matrix Multiplication) If the elementary matrix E results from performing a certain

row operation on Im and if A is an m x n matrix, then the product of EA is the matrix that results when this same row operation is performed on A.

Example:

EA is precisely the same matrix that results when we add 3 times the first row of A to the third row.

01044

6312

3201

103

010

001

,

0441

6312

3201

EA

EA

Page 43: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

43

Elementary Matrices

If an elementary row operation is applied to an identity matrix I to produce an elementary matrix E, then there is a second row operation that, when applied to E, produces I back again.

Inverse operation

Row operation on I that produces E

Row operation on E that reproduces I

Multiply row i by c ≠ 0 Multiply row i by 1/c

Interchange rows i and j Interchange rows i and j

Add c times row i to row j Add –c times row i to row j

Page 44: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

44

Elementary Matrices

Theorem: Every elementary matrix is invertible, and the inverse is also an elementary matrix.

Theorem: (Equivalent Statements) If A is an n x n matrix, then the following

statements are equivalent, that is, all true or all false.a) A is invertible

b) Ax = 0 has only the trivial solution.

c) The reduced row-echelon form of A is In.

d) A is expressible as a product of elementary matrices.

Page 45: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

45

Elementary Matrices

Proof:

Assume A is invertible and let x0 be any solution of Ax=0.

Let Ax=0 be the matrix form of the system

)()()()()( adcba

)()( ba

0,0,0)(,0)( 00011

01 xIxxAAAAxA

)()( cb

0

0

11

1111

nnnn

nn

xaxa

xaxa

010000

00100

00010

00001

0

0

0

21

22221

11211

nnnn

n

n

aaa

aaa

aaa

Page 46: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

46

Elementary Matrices

Assumed that the reduced row-echelon form of A is In by a finite sequence of elementary row operations, such that:

By theorem, E1,…,En are invertible. Multiplying both sides of equation on the left we obtain:

This equation expresses A as a product of elementary matrices.

If A is a product of elementary matrices, then the matrix A is a product of invertible matrices, and hence is invertible.

Matrices that can be obtained from one another by a finite sequence of elementary row operations are said to be row equivalent.

An n x n matrix A is invertible if and only if it is row equivalent to the n x n identity matrix.

)()( dc

nk IAEEE 12

112

11

112

11

knk EEEIEEEA

)()( ad

Page 47: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

47

A Method for Inverting Matrices

To find the inverse of an invertible matrix, we must find a sequence of elementary row operations that reduces A to the identity and then perform this same sequence of operations on In to obtain A-1.

Example:

Adjoin the identity matrix to the right side of A, thereby producing a matrix of the form [A|I]

Apply row operations to this matrix until the left side is reduced to I, so the final matrix will have the form [I|A-1].

801

352

321

A

801

352

321

A

Page 48: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

48

A Method for Inverting Matrices

Added –2 times the first row to the second and –1 times the first row to the third.

Added 2 times the second row to the third.

Multiplied the third row by –1.

Added 3 times the third row to the second and –3 times the third row to the first.

We added –2 times the second row to the first.

125

3513

91640

100

010

001

125

3513

3614

100

010

021

125

012

001

100

310

321

125

012

001

100

310

321

101

012

001

520

310

321

100

010

001

801

352

321

Page 49: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

49

A Method for Inverting Matrices

Often it will not be known in advance whether a given matrix is invertible.

If elementary row operations are attempted on a matrix that is not invertible, then at some point in the computations a row of zeros will occur on the left side.

Example:

521

142

461

A

111

012

001

000

980

461

101

012

001

980

980

461

100

010

001

521

142

461

Page 50: 1 Systems of Linear Equation and Matrices CHAPTER 1 FASILKOM UI 05

50

Special Matrices: Diagonal Matrices, Triangular Matrices