1 / 83

Chapter 2 Matrices and Linear Transformations

Linear Algebra. Chapter 2 Matrices and Linear Transformations. 大葉大學 資訊工程系 黃鈴玲. 2.1 Addition, Scalar Multiplication, and Multiplication of Matrices. a ij : the element of matrix A in row i and column j. Definition

rconner
Download Presentation

Chapter 2 Matrices and Linear Transformations

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Linear Algebra Chapter 2Matrices and Linear Transformations 大葉大學 資訊工程系 黃鈴玲

  2. 2.1 Addition, Scalar Multiplication, and Multiplication of Matrices • aij: the element of matrix A in row i and column j. Definition Two matrices are equal if they are of the same size and if their corresponding elements are equal. ( 代表 for every, for all) Thus A = B if aij = bij  i, j.

  3. Addition of Matrices Definition Let A and B be matrices of the same size. TheirsumA + B is the matrix obtained by adding together the corresponding elements of A and B. The matrix A + B will be of the same size as A and B. If A and B are not of the same size, they cannot be added, and we say that the sum does not exist.

  4. Determine A + B and A + C, if the sum exist. Example Solution (自行練習) (2) A andC are not of the same size, A + C does not exist.

  5. Example Observe that A and 3A are both 2  3 matrices. Scalar Multiplication of matrices Definition Let A be a matrix and c be a scalar. The scalar multiple of A by c, denoted cA, is the matrix obtained by multiplying every element of A by c. The matrix cA will be the same size as A.

  6. Negation and Subtraction Definition The matrix (-1)C is written –C and is called the negative of C. Example We now define subtraction in terms of addition and scalar multiplication. Let A – B = A + (–1)B Example

  7. Matrix Multiplication Examples

  8. Example 1 Sol. 無法相乘AB does not exist. Note.In general, ABBA. 如此題之BA存在

  9. Definition Let the number of columns in a matrix Abe the same as the number of rows in a matrix B. The product AB then exists. Let A: mn matrix, B: nk matrix, The product matrix C=ABhas elements C is a mk matrix. If the number of columns in A does not equal the number of row B, we say that the product does not exist.

  10. Example 3 Determine c23. Let C = AB, Example 2 Sol. BA does not exist. 隨堂作業:5(f) Note.In general, ABBA. 隨堂作業:11(d)

  11. A m r Example If A is a 5  6 matrix and B is an 6 7 matrix. Because A has six columns and B has six rows. Thus AB exits. And AB will be a 5 7 matrix. Size of a Product Matrix If A is an m r matrix and B is an r n matrix, then AB will be an m n matrix. B = AB r n m n 隨堂作業:8(f)

  12. Special Matrices Definition A zero matrix is a matrix in which all the elements are zeros. A diagonal matrix is a square matrix in which all the elements not on the main diagonal are zeros. An identity matrix is a diagonal matrix in which every diagonal element is 1.

  13. Example 4 Theorem 2.1 Let A be m n matrix and Omn be the zero m n matrix. Let B be an n n square matrix. On and In be the zero and identity n n matrices. Then A + Omn = Omn + A = A BOn = OnB = On BIn = InB = B

  14. Matrix multiplication in terms of columns (a) A: mn, B: nrLet the columns of B be the matrices B1, B2, …, Br. Write B=[B1B2 … Br]. Thus AB=A[B1B2 … Br]=[AB1AB2 … ABr]. Example   and

  15. Matrix multiplication in terms of columns (b) A: mn, B: n1, where A=[A1A2 … An] and . We get . Example  

  16. Partitioning of Matrices A matrix can be subdivided into a number of submatrices. Example where Example 

  17. Example 5 Let Consider the following partition of A. Under this partition A is interpreted as a 22 matrix. For the product ABto be exist, B must be partitioned into a matrix having two rows. Let  隨堂作業:21(a)

  18. Exercise 17 Let A be a matrix whose third row is all zeros. Let B be any matrix such that the product AB exists. Prove that the third row of AB is all zeros. Homework • Exercise 2.1:5, 8, 11, 17, 21 Solution

  19. 2.2 Algebraic Properties of Matrix Operations Theorem 2.2 -1 Let A, B, and C be matrices and a, b, and c be scalars. Assume that the size of the matrices are such that the operations can be performed. Properties of Matrix Addition and scalar Multiplication 1. A + B = B + A Commutative property of addition 2. A + (B + C) = (A + B) + C Associative property of addition 3. A + O = O + A = A (whereO is the appropriate zero matrix) 4. c(A + B) = cA + cB Distributive property of addition 5. (a + b)C = aC + bC Distributive property of addition 6. (ab)C = a(bC)

  20. Theorem 2.2 -2 Let A, B, and C be matrices and a, b, and c be scalars. Assume that the size of the matrices are such that the operations can be performed. Properties of Matrix Multiplication 1. A(BC) = (AB)C Associative property of multiplication 2. A(B + C) = AB + AC Distributive property of multiplication 3. (A + B)C = AC + BCDistributive property of multiplication 4. AIn = InA = A (whereIn is the appropriate zero matrix) 5. c(AB) = (cA)B = A(cB) Note: AB BA in general. Multiplication of matrices is not commutative.

  21. Proof of Thm 2.2 (A+B=B+A) Consider the (i,j)th elements of matrices A+B and B+A:  A+B=B+A Example 1

  22. Compute ABC. Example 2 Sol. ABC = D22 23 31 21 ABC = (AB)C = A(BC)

  23. Caution • In algebra we know that the following cancellation laws apply. • If ab = ac and a  0 then b = c. • If pq = 0 then p = 0 or q = 0. • However the corresponding results are not true for matrices. • AB = ACdoes not imply that B = C. • PQ = Odoes not imply that P = O or Q = O. Example

  24. Powers of Matrices Definition If A is a square matrix, then Theorem 2.3 If A is an n n square matrix and r and s are nonnegative integers, then 1. ArAs = Ar+s. 2. (Ar)s = Ars. 3. A0 = In (by definition)

  25. Example 4 Simplify the following matrix expression. 注意這兩項不能合併! Solution Example 3 Solution

  26. Systems of Linear Equations A system of m linear equations in n variables as follows Let We can write the system of equations in the matrix form AX = B 隨堂作業:32(c)

  27. Solutions to Systems of Linear Equations Consider a homogeneous system of linear equations AX=0. Let X1 and X2 be solutions. ThenAX1=0 and AX2=0  A(X1 + X2) = AX1 + AX2 = 0  X1 + X2 is also a solution If c is a scalar, A(cX1) = cAX1 = 0  cX1 is also a solution Note.The set of solutions to a homogeneous system of linear equationsis closed under addition and under scalar multiplication. It is a subspace.

  28. Example 5 Consider the following homogeneous system of linear equations. It can be shown that there are many solutions,x1=2r, x2=3r, x3 = r. The solutions are vectors in R3 of the form (2r,3r, r) or r(2, 3, 1). The solutions form a subspace of R3 of dimension 1. Note. x1=0, …, xn = 0, is a solution to every homogeneous system. The set of solutions to every homogeneous system passes through the origin. Figure 2.4 隨堂作業:36(a)

  29. Solutions to Nonhomogeneous systems Exercise 41 Show that a set of solutions to a system of nonhomogeneous linear equations is not closed under addition or under scalar multiplication, and that it is thus not a subspace of Rn. Proof Let AX=Y be a nonhomogeneous system of linear equations, so Y0. Let X1 and X2 be two solutions. ThenAX1=Y and AX2=Y  A(X1 + X2) = AX1 + AX2 = 2Y X1 + X2 is not a solution. (可省略) If c is a scalar, A(cX1) = cAX1 = cY cX1 is not a solution. The set of solutions is not a subspace of Rn.

  30. Example Consider the following nonhomogeneous system of linear equations. The general solution of this system is (2r+4, 3r+2, r). (2r+4, 3r+2, r) = r(2, 3, 1)+(4, 2, 0) Note that r(2, 3, 1) is the general solution of the corresponding homogeneous system. The vector (4, 2, 0) is the specific solution to the nonhomogeneous system corresponding to r=0. Figure 2.5 隨堂作業:40

  31. Idempotent and Nilpotent Matrices(Exercise 24~30) Definition • A square matrix A is said to be idempotent (等冪) if A2=A. • A square matrix A is said to nilpotent (冪零) if there is a positive integer p such that Ap=0. The least integer p such that Ap=0 is called the degree of nilpotency of the matrix. Example 隨堂作業:28, 29(b)

  32. Exercise 21 A, B: diagonalmatrix of the same size, c: scalar Prove that A+B and cA are diagonal matrices. Homework • Exercise 2.2:6, 13, 21, 25, 27, 28, 29, 32, 36, 40, 41

  33. Exercise 25 Exercise 27 Determine b, c, and d such that is idempotent. Prove that if A and B are idempotent and AB=BA, then AB is idempotent. Homework

  34. Example 1 2.3 Symmetric Matrices Definition Thetranspose (轉置) of a matrix A, denoted At, is the matrix whose columns are the rows of the given matrix A.

  35. Theorem 2.4 Properties of Transpose Let A and B be matrices and c be a scalar. Assume that the sizes of the matrices are such that the operations can be performed. 1. (A + B)t = At + Bt Transpose of a sum 2. (cA)t = cAt Transpose of a scalar multiple 3. (AB)t = BtAt Transpose of a product 4. (At)t = A

  36. Theorem 2.4 Properties of Transpose Proof for 3. (AB)t= BtAt

  37. match match Symmetric Matrix Definition A symmetric matrix is a matrix that is equal to its transpose. Example 隨堂作業:2(c)

  38. Example 3 Let A and B be symmetric matrices of the same size. Let C be a linear combination of A and B. Prove that the product C is symmetric. Proof Let C = aA+bB, where a and b are scalars. Ct = (aA+bB)t = (aA)t + (bB)t by Thm 2.4 (1) = aAt + bBtby Thm 2.4 (2) =aA+ bB since A and B are symmetric = C Thus C is symmetric.

  39. If and only if • Let p and q be statements.Suppose that p implies q (if p then q), written p q,and that also q  p, we say that“pif and only ifq” (若且唯若) (通常簡寫為 iff ) (也說成: p is necessary and sufficient for q)

  40. Example 4 Let A and B be symmetric matrices of the same size. Prove that the product AB is symmetric if and only if AB = BA. Proof *We have to show (a) AB is symmetric AB = BA, and the converse, (b) AB is symmetric AB = BA. () Let AB be symmetric, then AB= (AB)tby definition of symmetric matrix = BtAt by Thm 2.4 (3) = BA since A and B are symmetric () Let AB = BA, then (AB)t = (BA)t = AtBt by Thm 2.4 (3) = AB since A and B are symmetric

  41. Example 3 相關題目 Let A be a symmetric matrix. Prove that A2 is symmetric. Proof

  42. Example 5 Determine the trace of the matrix Solution We get Trace of a matrix Definition Let A be a square matrix. The trace of A, denoted tr(A) is the sum of the diagonal elements of A. Thus if A is an n n matrix. tr(A) = a11 + a22 + … + ann 隨堂作業:15(b)

  43. Theorem 2.5 Properties of Trace Let A and B be matrices and c be a scalar. Assume that the sizes of the matrices are such that the operations can be performed. 1. tr(A + B) = tr(A) + tr(B) 2. tr(AB) = tr(BA) 3. tr(cA) = c tr (A) 4. tr(At) = tr(A) Proof of (1) Since the diagonal element of A + B are (a11+b11), (a22+b22), …, (ann+bnn), we get tr(A + B) = (a11 + b11) + (a22 + b22) + …+ (ann + bnn) = (a11 + a22 + … + ann) + (b11 + b22 + … + bnn) = tr(A) + tr(B).

  44. Example of (2) tr(AB)=tr(BA)

  45. The conjugate (共軛複數) of a complex number z = a + bi isdefined and written z = a- bi. Matrices with Complex Elements The element of a matrix may be complex numbers. A complex number is of the form z = a + bi Where a and b are real numbers and a is called the real part and b the imaginary part (虛部) of z.

  46. Compute A + B, 2A, and AB. Example 7 Solution

  47. Definition (i) The conjugate of a matrix A is denoted A and is obtained by taking the conjugate of each element of the matrix. (ii) The conjugate transpose of A is written and defined by A*=At. (iii) A square matrix C is said to be hermitian if C=C*. Example (i), (ii) Example (iii) 隨堂作業:23

  48. Exercise 11 A matrix A is said to be antisymmetric if A = -At. (a) give an example of an antisymmetric matrix.(b) Prove that an antisymmetric matrix is a square matrix having diagonal elements zero.(c) Prove that the sum of two antisymmetric matrices of the same size is an antisymmetric matrix. Homework • Exercise 2.3:2, 5, 11, 15, 23

  49. Example 1 Prove that the matrix has inverse Proof 2.4 The Inverse of a Matrix Definition Let A be an n n matrix. If a matrix B can be found such that AB = BA = In, then A is said to be invertible(可逆) and B is called the inverse(反矩陣) of A. If such a matrix B does not exist, then A has no inverse. (denote B = A-1, andA-k=(A-1)k ) Thus AB = BA = I2, proving that the matrix A has inverse B.

  50. Thm2.2 乘法結合律 Theorem 2.7 If a matrix has an inverse, that inverse is unique. Proof Let B and C be inverses of A. Thus AB = BA = In, and AC = CA = In. Multiply both sides of the equation AB = In by C. C(AB) = CIn (CA)B = C InB = C B = C Thus an invertible matrix has only one inverse.

More Related