1.9 The Matrix of a Linear Transformation Definition: In Rn, the n x n identity matrix is a square matrix with 1’s along the main diagonal, and 0’s elsewhere: In R3, 1 0 0 I 3 0 1 0 0 0 1 . The vectors that make up this matrix are 1 0 0 e1 0, e 2 1, e 3 0 0 0 1 a In general, the i-th column is labeled ei and Inx = x. The linear transformation T: R3 → Rn is completely determined by what it does to e1, e2, and e3. By the definition of linear, if T: Rm → Rn is a linear transformation, then T(0) = 0 And T(cu + dv) = cT(u) + dT(v) The generalized result for Rn: T c1v1 c2 v 2 c p v p c1T v1 c2T v 2 c pT v p We use this to show that a transformation is linear. Example: Let T: R2 → R3 where 2 5 T e1 3, T e 2 0 4 1 If we want to find the matrix A associated to T, we can compute T(x) for any x by using: x1 x x2 1 0 x1 x2 0 1 x1e1 x2 e 2 so, T x T x1e1 x2e 2 x1T e1 x2T e 2 2 5 2 x1 5 x2 x1 3 x2 0 3x1 0 x2 4 1 4 x1 1x2 2 5 x1 3 0 x2 4 1 So 2 5 A 3 0 4 1 In general, T x Ax T e1 T e2 x To get A, replace the identity matrix with T e1 T e2 Theorem 10: Let T: Rn → Rm be a linear transformation. Then there exists a unique matrix A such that T x Ax x Rn. In fact, A is the m x n matrix whose j-th column is the vector T e j where e j is the j-th column of the identity matrix In. A T e1 T e2 T en Example: Given: x1 2 x2 x1 T x A 4 x1 x2 3x 2 x 2 1 Find A. Note that T: R2 → R3 and 1 2 A T e1 T e 2 4 0 3 2 Example: Find the standard matrix of the linear transformation T: R2 → R2 which rotates a point about the origin through an angle of 4 radians. Note 2 1 2 T e1 T 0 2 2 2 0 2 T e 2 T 1 2 2 2 A T e1 T e 2 2 2 2 2 2 2 2 In general, the matrix of the linear transformation T: R2 → R2 which rotates a point about the origin through an angle of radians is given by the matrix: cos sin A sin cos Examples: Reflection through the x2-axis - 1 0 0 1 Reflection through x2 = -x1 0 - 1 - 1 0 Vertical contraction by a factor of k (0 < k < 1) 1 0 0 k and expansion (k > 1) 1 0 0 k Vertical sheer k < 0 and k > 0 1 0 k 1 Projection onto the x1-axis 1 0 0 0 Note: this last mapping takes any point in R2 and moves it down to the x1-axis, so the range is not all of R2. We distinguish between transformations whose range is all of the codomain and whose range is not. Definition: A mapping T: Rn → Rm is said to be onto if each b in Rm is the image of at least one x in Rn, that is T(x) = b has at least one solution. Definition: T: Rn → Rm is said to be one to one if each b in Rm is the image of at most one x in Rn. Example: T: R2 → R2 the expansion (k > 1) 1 0 0 k is one-to-one and onto since every x1 vector x2 in R2 is the image of the vector x1 1 x2 . k Example: T: Rn → Rm defined by T(x) = 0x is neither one-to-one nor onto since it maps all of Rn to the single vector 0 in Rm. Example: Let T: R4 → R3 defined by T(x) = Ax where 1 1 3 7 A 0 2 5 4 0 0 3 6 Is T onto? In other words: Does the equation Ax = b have a solution for all b in R3? By Th. 1.4, this equation is consistent iff A has a pivot in each row. The matrix is in row echelon form, so we can see that there is a pivot in each row, thus the equation Ax = b is consistent, so T is onto. Is T one-to-one? In other words: Is the solution Ax = b unique for all b in R3? The row echelon form of the matrix shows that x4 is free, so by Th. 1.2, there are infinitely many solutions. Therefore, the solution is not unique, so T is not one-to-one. The next theorem follows from this. Theorem 1.11: Let T: Rn → Rm be a linear transformation. Then T is one-to-one iff the equation Ax = 0 has only the trivial solution. Proof: T is 1 to1 so T(x) = 0 has at most one solution. Since T is linear, T(0) = 0. Thus, T(x) = 0 implies that x = 0. So, T(x) = 0 has only the trivial solution. Want to prove that if T(x) = 0 has only the trivial solution, T(x) is one to one. We will prove the contrapositive: If T is not 1 to 1, T(x) = 0 has more than the trivial solution Assume T is not 1 to 1. Then b in Rn such that b is the image of two different vectors, u and v. That is, T(u) = b and T(v) = b Since T is linear, T(u – v) = T(u) – T(v) = b – b = 0. But the vector u – v is not 0 since u ≠ v, so we have two vectors whose image under T is 0. Therefore Ax = 0 has more than the trivial solution. So, either the two conditions in the theorem are both true or they are both false. This proves the other direction of the “if and only if” and we can say that T is one-to-one iff the equation Ax = 0 has only the trivial solution. Theorem 1.12: Let T: Rn → Rm be a linear transformation and A be the standard matrix for T. Then a) T maps Rn onto Rm if and only if the columns of A span Rm. b) T is one-to-one if and only if the columns of A are linearly independent. Proof: (a) By the definition of onto, T maps Rn onto Rm if and only if the equation Ax = b has at least one solution for all b Rm if and only if the columns of A span Rm By Th. 4,. So, T maps Rn onto Rm if and only if the columns of A span Rm. b) By Th 11, T is one-to-one if and only if the equation Ax = 0 or T(x) = 0 has only the trivial solution. And Ax = 0 has only the trivial solution if and only if the columns of A are linearly independent by the definition of linear independence: x1a1 x2a2 xnan 0 has only the trivial solution. T is one-to-one if and only if the columns of A are linearly independent. Example: (Cheesy notation, but you may see it in the text.) Let T x1, x2 2 x1 x2 , x1,4 x1 3x2 , x2 Is T one-to-one and onto? First, we write this with better notation to help us find the matrix A that defines T. 2 x1 x2 x1 x1 T x2 4 x1 3x2 x 2 Factoring out x1 and x2 gives: 2 1 4 0 1 0 x1 3 x2 1 A has only 2 columns and they aren’t scalar multiples of each other, so they are linearly independent, thus by Th. 12b, T is 1 to 1. T is onto iff the columns of A span R4. By Th 4, the columns of A span R4 only if there are 4 rows with pivot positions. This is impossible since the A has only two columns, so T cannot be onto.