59
Matrix

Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Embed Size (px)

Citation preview

Page 1: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Matrix

Page 2: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

REVIEW LAST LECTURE

Page 3: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Keyword

• Parametric form• Augmented Matrix• Elementary Operation• Gaussian Elimination• Row Echelon form• Reduced Row Echelon form• Leading 1’s

• Rank• Homogeneous System

Page 4: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Goal of Elementary Operation

• To arrive at an easy system

Page 5: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Theorem 3

• Suppose a system of m equation on n variables has a solution, if the rank of the augmented matrix is r • the set of the solution involve exactly n-r

parameters

The number of leading

1’s

Page 6: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Homogeneous Equation

When b = 0What is the solution?

Page 7: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

MATRIX REVIEW

Page 8: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Matrix Review

column matrixOr

column vector

A has 2 rows 3 columns

A is a 2 x 3 matrix

a22

a13 c21

Square matrix (number of row

equals number of column

Page 9: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Matrix Review

• Scalar multiplication• kA = [kaij]

Page 10: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Matrix Addition Rules

• A + B = B + A (commutative)• A + (B + C) = (A + B) + C (associative)• There is an m x n matrix 0, such that 0 + A = A for

each A (additive identity)• There is an m x n matrix, -A, such that A + (-A) =

0 for each A (additive inverse)• k(A + B) = kA + kB• (k+p)A = kA + pA• (kp)A = k(pA)

Page 11: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Transpose

• Swap the index of rows and columns• A = [aij]

• AT = [aji]

Page 12: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Transpose Rule

• If A is an m x n matrix, then AT is n x m matrix

• (AT)T = A• (kA)T = kAT

• (A + B)T = AT + BT

Page 13: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Main Diagonal & Symmetric

• Main diagonal, the members Aii

• If A = AT, A is called a symmetric

Page 14: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Example

• A = 2AT

• Solve for A

A = 2AT = 2[2AT]T = 2[a(AT)T] = 4A0 = 3AHence A = 0

Page 15: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Dot Product

• Step in multiplication

• We need to compute• 3*6 + -1 * 3 + 2 * 5• The multiplication of (3 -1 2) and (6 3 5) is

called a dot product of row 1 and column 3

Page 16: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Identify Matrix

• A matrix whose main diagonal are 1’s and 0’s are elsewhere

• In most case, we assume that the identity matrix is a square matrix

Page 17: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Multiplication Rules

• IA = A, BI = B (identity)• A(BC) = (AB)C (associative)• A(B + C) = AB + AC; (distributive)• A(B – C) = AB – AC• (B + C)A = BA + CA; • (B – C)A = BA – CA;

• k(AB) = (kA)B = A(kB)• (AB)T = BTAT

In most caseAB != BA

(no commutative!!)

Page 18: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Example

• When AB = BA? (when will they commutes?)

• (A – B)(A + B) = A2 – B2

Page 19: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

MATRIX AND LINEAR EQUATION

Page 20: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Matrix and Linear Equation

factoring

Matrix equation

Linear equation

2 x 1 matrix

2 x 3 and 3 x 1

matrix

Page 21: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Matrix Equation

A X B

AX = B

Page 22: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Matrix Equation

AX = B

Coefficient matrix

Constance matrixSolution

Page 23: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Associated homogeneous system

• Given a particular system AX = B• There is a related system AX = 0• Called associated homogeneous system

Page 24: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Solution of a linear system

• Let • X1 be a solution to AX = B

• X0 be a solution to AX = 0

• X1 + X0 is also a solution of AX = B

• Why?• A(X1 + X0) = AX1 + AX0 = B + 0 = B

Page 25: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Theorem 2

• Suppose X1 is a particular solution to the system AX = B of linear equations.

• Then every solution X2 to AX = B has the form• X2 = X1 + X0

• For some solution X0 of the associated homogeneous system AX = 0

Page 26: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Proof

• Suppose that X* is any solution to AX = B• So, AX* = B• We write Xz = X* – X1

• Then AXz = A(X* + X1) = AX* + AX1 = B – B = 0

• Xz is the solution of AX = 0

• Hence, X* = Xz + X1 is the solution of AX = B

X1 is our particular

solution to AX = B

Page 27: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Implication of Theorem 2

• Given a particular system AX = B• We can find all solutions by• Find a particular solution to AX = B• Reduce the problem into finding all solution to

AX = 0

Page 28: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Example

• Find all solution to

• Gaussian Elimination gives parametric form• x = 4 + 2t• y = 2 + t• z = t

Page 29: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Basic Solution

1 2 3 2

3 6 1 0

2 4 4 2

A

Solve the homogeneous system AX = 0

1 2 3 2 0 1 2 0 1/ 5 0

3 6 1 0 0 0 0 1 3/ 5 0

2 4 4 2 0 0 0 0 0 0

Do the elimination

Page 30: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Basic Solution

1

21 2

3

4

12

2 1/ 551 0

3 0 3/ 5

5 0 1

s tx

x sX s t sX tX

xt

xt

x1 = 2s + (1/5), x2 = s, x3 = (3/5)t, x4 = t

1 2 3 2 0 1 2 0 1/ 5 0

3 6 1 0 0 0 0 1 3/ 5 0

2 4 4 2 0 0 0 0 0 0

Page 31: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Basic Solution

• A basic Solution is a solution to the homogeneous system

Page 32: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Linear Combination

• The solution to the previous system issX1 + tX2

• Solutions in this form are called a linear combination of X1 and X2

Page 33: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Linear Combination

• Consider the previous solution2 1/ 5

1 0

0 3/ 5

0 1

X s t

Page 34: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Linear Combination

• Consider the previous solution2 1/ 5 2 1

1 0 1 0/ 5

0 3/ 5 0 3

0 1 0 5

X s t s t

We can let r =t / 5… Hence, it is also another parametric form

but [1 0 3 5]T is a solution as well!!

Hence, a scalar multiple of a basic solution is a basic solution as well

Page 35: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Relation to Rank

• A system AX = 0• Having n variable and m equation (A is m x n

matrix)

• Suppose the rank of A is r• Then there are n – r parameter (from theorem 3

of the last slide)

• We will have exactly n – r basic solutions• Every solution is a linear combination of

these basic solutions

Page 36: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

BLOCK MULTIPLICATION

Page 37: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Multiplication by Block

Page 38: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Block Multiplication

Page 39: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Compatibility

• Block multiplication is possible when partition is compatible.• i.e., size of partitioning allows multiplication of

the block

Can we divide here?

Page 40: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

MATRIX INVERSE

Page 41: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Solving equation

• How to solve a scalar equation• ax = b

• Multiply both side by 1/aax/a = b/ax = b/a We need multiplicative

inverse

Page 42: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Matrix Inverse

• A matrix B is an inverse of a matrix A• If and only if AB = I and BA = I• B is written as A-1

Page 43: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Example

• Find the inverse of

• Let

• If B is the inverse, we have AB = I Cannot

be I

Page 44: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Existence of an Inverse

• From the previous example• There is a matrix having no inverse!!!• Zero matrix cannot have an inverse

Page 45: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Non-Square matrix

• What should be an inverse of non-square?• Let A is m x n matrix• What should be A-1?• We can have B = n x m such that• AB = Im and BA = In

• But this gives m = n• If m < n, there exists a basic solution X (a 1 x n

matrix) for AX = 0 • So X = InX = (BA)X = B(AX) = B(0) = 0 contradict1 2 3 2

3 6 1 0

2 4 4 2

A

Non square matrix has no inverse

Page 46: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Theorem 2.3.1

• If B and C are both inverse of A, then B = C

• If we have inverse, it must be unique.

Page 47: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Proof

• Since B and C are inverses• CA = I = AB• Hence• B = IB = (CA)B = C(AB) = CI = C

Page 48: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Inverse

• For A• A-1 is unique• A-1 is square

Page 49: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

First introduction to Det of 2 x 2 matrix

• Det determinant

• Det of

• is (ad – bc)

Page 50: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Adjugate of 2 x 2

Adjugate of B

Page 51: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Det and Inverse

• Letdet

adj

e B

So, if e != 0, we multiply it by 1/egives A(1/e)B = I =(1/e)BA

So, the inverse of a is (1/e)B

AB = eI = BA

Page 52: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Determinant

• Det exists before matrix• Det is used to determine whether a linear

system has a solution

Page 53: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Inverse and Linear System

• We have AX = B

• We can solve by

Page 54: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Inversion Method

• A method to determine the inverse of A based on solving linear equation system

• We have A = 2 x 2 matrix• We need to find A-1

• We write the inverse as

Page 55: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Inversion Method

• We have AA-1 = I• Gives

• Each are a system• A is the coefficiency matrix

Page 56: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Solving A

• Find the equivalent systems in a reduced row echelon form• Gives

• This can be done by elementary operation• In fact, we do this at the same time for both

equation

Page 57: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Inversion Method

• A short hand form [A I] [I A-1]

Double matrix

Page 58: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Matrix Inversion Algorithm

• If A is a square matrix• There exists a sequence of elementary row

operation that carry A to the identity matrix of the same size.

• This same series carries I to A-1

Page 59: Matrix. REVIEW LAST LECTURE Keyword Parametric form Augmented Matrix Elementary Operation Gaussian Elimination Row Echelon form Reduced Row Echelon form

Conclusion

• Matrix• Det• Inverse