Transcript Matrix
Matrix
REVIEW LAST LECTURE
Keyword • • • • • • Parametric form Augmented Matrix Elementary Operation Gaussian Elimination • • • Row Echelon form Reduced Row Echelon form Leading 1’s Rank Homogeneous System
Goal of Elementary Operation • To arrive at an easy system
Theorem 3 • Suppose a system of equation on variables has a solution, if the rank of the augmented matrix is • the set of the solution involve exactly parameters The number of leading 1’s
Homogeneous Equation When b = 0 What is the solution?
MATRIX REVIEW
A has 2 rows 3 columns A is a 2 x 3 matrix Matrix Review Square matrix (number of row equals number of column a 22 a 13 column matrix Or column vector c 21
Matrix Review • • Scalar multiplication kA = [ka ij ]
Matrix Addition Rules • • • • • • • A + B = B + A A + (B + C) = (A + B) + C There is an m x n matrix 0, such that 0 + A = A for each A There is an m x n matrix, -A, such that A + (-A) = 0 for each A k(A + B) = kA + kB (k+p)A = kA + pA (kp)A = k(pA)
Transpose • • • Swap the index of rows and columns A = [a ij ] A T = [a ji ]
Transpose Rule • • • • If A is an m x n matrix, then A T matrix is n x m (A T ) T = A (kA) T = kA T (A + B)T = A T + B T
Main Diagonal & Symmetric • Main diagonal, the members A ii • If A = A T , A is called a
Example • • A = 2A T Solve for A A = 2AT = 2[2AT]T = 2[a(AT)T] = 4A 0 = 3A Hence A = 0
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
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
Multiplication Rules • • • • • IA = A, BI = B A(BC) = (AB)C A(B + C) = AB + AC; • A(B – C) = AB – AC • • (B + C)A = BA + CA; (B – C)A = BA – CA; k(AB) = (kA)B = A(kB) (AB) T = B T A T In most case AB != BA (no commutative!!)
Example • When AB = BA? (when will they commutes?) • (A – B)(A + B) = A 2 – B 2
MATRIX AND LINEAR EQUATION
Matrix and Linear Equation Linear equation Matrix equation 2 x 1 matrix factoring 2 x 3 and 3 x 1 matrix
Matrix Equation A X B AX = B
Matrix Equation Coefficient matrix Solution Constance matrix AX = B
Associated homogeneous system • • Given a particular system AX = B There is a related system AX = 0 • Called associated homogeneous system
Solution of a linear system • Let • • X 1 X 0 be a solution to AX = B be a solution to AX = 0 • • X 1 + X 0 is also a solution of AX = B Why?
• A(X 1 + X 0 ) = AX 1 + AX 0 = B + 0 = B
Theorem 2 • • • Suppose
X 1
is a particular solution to the system
AX = B
of linear equations.
Then every solution
X 2
form to
AX = B
has the •
X 2 = X 1 + X 0
For some solution
X 0
of the associated homogeneous system
AX = 0
Proof • • • Suppose that X* is solution to AX = B So, AX* = B We write X z • • = X* – X 1 Then AX z = A(X* + X 1 ) X z = AX* + AX 1 = B – B = 0 is the solution of AX = 0 X 1 is our particular solution to AX = B • Hence, X* = X z + X 1 is the solution of AX = B
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
Example • Find all solution to • Gaussian Elimination gives parametric form • x = 4 + 2t • • y = 2 + t z = t
Basic Solution Solve the homogeneous system AX = 0
A
1 3 2 2 6 4 3 1 4 2 0 2 Do the elimination 1 3 2 2 6 4 3 1 4 2 0 0 0 2 0 1 0 0 2 0 0 0 1 0 1/ 5 0 3 / 5 0 0 0
1 3 2 2 6 4 Basic Solution 3 1 4 2 0 0 0 2 0 1 0 0 2 0 0 0 1 0 1/ 5 0 3 / 5 0 0 0 x1 = 2s + (1/5), x2 = s, x3 = (3/5)t, x4 = t
X
x x x x
1 2 4 2
s
3 5
s t
1 5
t t
s
t
1/ 5 0 3 / 5 1
sX
1
tX
2
Basic Solution • A basic Solution is a solution to the homogeneous system
Linear Combination • • The solution to the previous system is sX 1 + tX 2 Solutions in this form are called a linear combination of X 1 and X 2
Linear Combination • Consider the previous solution
X
s
t
1/ 5 0 3 / 5 1
Linear Combination • Consider the previous solution
X
s
t
1/ 5 0 3 / 5
s
t
/ 5 1 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
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
BLOCK MULTIPLICATION
Multiplication by Block
Block Multiplication
Compatibility • Block multiplication is possible when partition is compatible.
• i.e., size of partitioning allows multiplication of the block Can we divide here?
MATRIX INVERSE
Solving equation • How to solve a scalar equation • ax = b • Multiply both side by 1/a ax/a = b/a x = b/a We need multiplicative inverse
Matrix Inverse • A matrix B is an inverse of a matrix A • If and only if is written as and
Example • Find the inverse of • Let • If B is the inverse, we have AB = I Cannot be I
Existence of an Inverse • From the previous example • • There is a matrix having no inverse!!!
Zero matrix cannot have an inverse
Non-Square matrix • • What should be an inverse of non-square?
Let A is m x n matrix • What should be A -1 ?
A
• 1 3 2 We can have B = n x m such that • • AB = I m and BA = I n But this gives m = n • 2 6 4 If m < n, there exists a basic solution X (a 1 x n matrix) for AX = 0 1 4 3 • So X = I n X = (BA)X = B(AX) = B(0) = 0 2 0 2 contradict Non square matrix has no inverse
Theorem 2.3.1
• If B and C are both inverse of A, then B = C • If we have inverse, it must be unique.
Proof • • • Since B and C are inverses CA = I = AB Hence • B = IB = (CA)B = C(AB) = CI = C
• For A • • A -1 is unique A -1 is square Inverse
First introduction to Det of 2 x 2 matrix • Det determinant • Det of • is (ad – bc)
Adjugate of 2 x 2 Adjugate of B
Det and Inverse • Let det AB = eI = BA e So, if e != 0, we multiply it by 1/e gives A(1/e)B = I =(1/e)BA So, the inverse of a is (1/e)B adj B
Determinant • • Det exists before matrix Det is used to determine whether a linear system has a solution
Inverse and Linear System • We have AX = B • We can solve by
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
Inversion Method • We have AA -1 = I • Gives • Each are a system • A is the coefficiency matrix
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
Inversion Method • A short hand form [A I] [I A -1 ] Double matrix
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
• • • Matrix Det Inverse Conclusion