Chpter 4 Mtrix Representtions of Liner Trnsformtions When considering the Het Stte Evolution, we found tht we could describe this process using multipliction by mtrix. This ws nice becuse computers cn do mtrix opertions rther esily. Also, mtrices tend to be good wy to store informtion in computer. When writing computer code for liner trnsformtion bsed on the formul cn t times be very tedious, but using mtrix multipliction is much esier. In this chpter, we tlk bout when we re ble to use mtrices s tool for trnsformtions. Let us begin with theorem tht tells us bout ll trnsformtions tht re defined using mtrix multipliction. Theorem 4.0.. Define T : R n R m by T x = Mx, where M is m n mtrix. Then T is liner trnsformtion. Proof. Let M M m n (R nd define T : R n R m s bove. We will show tht T stisfies the linerity condition given in Eqution 2.. Let x, y R n nd let α R be sclr. Then, using properties of multipliction by mtrix, we get the following. T (αx + y = M(αx + y = M(αx + My = αmx + My = αt x + T y. 253
254 CHAPTER 4. MATRIX REPRESENTATIONS Thus, T is liner. Theorem 4.0. shows tht trnsformtion defined using mtrix multipliction is liner trnsformtion. This leds us to sk whether it possible to define ny liner trnsformtion using mtrix multipliction. If so, tht would be extremely helpful. The potentil stumbling block is tht we cnnot just multiply vector, in sy P 2 (R, by mtrix. Wht would tht men? In this chpter, we combine our knowledge bout coordinte spces nd liner trnsformtions to write liner trnsformtions using mtrix multipliction. 4. Mtrix Trnsformtions Suppose we hve two vector spces V nd W. Let V be n-dimensionl with bsis V nd W be m-dimensionl with bsis W. Suppose we re given liner trnsformtion T : V W. We re interested in figuring out how to trnsform vectors from V to W, possibly tking new pth using mtrix multipliction. Recll tht the trnsformtion T : V R n defined by T (v = [v] is liner (see Theorem 2.2.. Let T 2 be the trnsformtion tht tkes coordinte vectors in R m bck to their corresponding vectors in W. We know tht T 2 is liner trnsformtion (see Exercise 6. We know tht we cn multiply vectors in R n by m n mtrices to get vectors in R m. We wnt to find M M m n so tht we cn define nd so tht T 3 : R n R m by T (x = Mx for ll x R n T 3 ([v] V = [T (v] W. Tht is, we wnt T 3 to trnsform [v] V into [w] W in the sme wy T trnsforms v into w. (See Figure 4.. Recll tht Corollry 2.3. tells us tht to find trnsformtion T 2 M T equivlent to T, we need only consider their ctions on bsis for V. Definition 4... Given mtrix M nd trnsformtion T : R n R m defined by T (x = Mx for every x R n, we sy tht M is the mtrix representtion for the trnsformtion T.
4.. MATRIX TRANSFORMATIONS 255 T = T 2 M T T M T 2 V R n R m W Figure 4.: Illustrtion of the equivlence of liner trnsformtion T with the composition of two coordinte trnsformtions T nd T 2 nd one mtrix multiply. It is common to indicte the mtrix representtion M of liner trnsformtion T : V W by M = [T ] W V, where V nd W re the chosen bses for V nd W, respectively. If V nd W re the sme vector spces, with bsis, then we typiclly write M = [T ] to indicte M = [T ]. Suppose V = {v, v 2,..., v n } is bsis for V nd W = {w, w 2,..., w m } is bsis for W. Then the ction of T requires tht M must mp the coordinte vector of v k to the coordinte vector of T (v k. Tht is, [T (v k ] W = M[v k ] V for k =, 2,..., n. Notice tht [v k ] V = e k, the k th stndrd bsis vector of R n. So, M[v k ] V = Me k is equl to the k th column of M. Thus, the k th column of M must equl [T (v k ] W. These ides suggest the following procedure for constructing the mtrix M. Procedure: Let V nd W be vector spces with ordered bses V = {v, v 2,..., v n } nd W = {w, w 2,..., w m }, respectively. Also, let T : V W be liner. Then the mtrix representtion M = [T ] W V is given by M = [T (v ] W [T (v 2 ] W... [T (v n ] W, (4. where [T (v k ] W is the k th column of M.
256 CHAPTER 4. MATRIX REPRESENTATIONS This result is verified rigorously s Theorem 4.3.3. Exmple 4... Let V = {x 2 +bx+(+b, b R} nd let W = M 2 2. Consider the trnsformtion T : V W defined by ( b T (x 2 + bx + ( + b = + b + 2b We cn show tht T is liner (be sure you know how to do this. So, we cn find mtrix representtion, M, of T. First, we must find bses for V nd W so tht we cn consider the coordinte spces nd determine the size of M.. V = {x 2 + bx + ( + b, b R} = spn { x 2 +, x + }. So bsis for V is V = {x 2 +, x + }. We will use the stndrd bsis for M 2 2. Since V is 2-dimensionl spce, the cooresponding coordinte spce is R 2. W, being 4-dimensionl spce, cooresponds to the coordinte spce R 4. We will find M tht cn multiply by vector in R 2 to get vector in R 4. This mens tht M M 4 2. We lso wnt M to ct like T. Tht is, we wnt [T (v] W = M[v] V. We need to determine where the bsis elements of V get mpped. ( T (x 2 + = ( 0 T (x + = 2 Writing these outputs s coordinte vectors in R 4 gives [T (x 2 x + ] W = [T (x + ] W = [( [( 0 2 ] ] W = W = 0 2
4.. MATRIX TRANSFORMATIONS 257 According to the procedure bove, the coordinte vectors re the columns of M. Tht is, 0 M =. 2 We cn (nd should check tht the trnsformtion tht T : R 2 R 4 defined by T (x = Mx trnsforms the coordinte vectors in the sme wy T trnsforms vectors. Let v = 2x 2 + 4x + 6. We know tht v V becuse it corresponds to the choice = 2, b = 4. Now, ccording to the definition for T, we get ( T (v = T (2x 2 + 4x + (2 + 4 = 2 4 2 2 + 4 2 + 2(4 = ( 2 2 6 0 Next, we check T (x = Mx. Notice tht v = 2(x 2 + + 4(x +. So Now, we compute [T (v] W = M[v] V = 0 2 [v] V = ( 2 4 ( 2 4. = Notice tht this is exctly wht we expect becuse [( ] 2 2 2 = 6 6 0 2. W 0 2 + 0 4 2 + 4 2 + 4 2 + 2 4 =. 2 6 2 0. We cn check this more rigorously by using n rbitrry vector in V. Let v = x 2 + bx + + b. Then ( b T (v =. + b + 2b
258 CHAPTER 4. MATRIX REPRESENTATIONS The coordinte vectors of these re [v] V = ( b nd [( b + b + 2b ] S = + b b + 2b. Finlly, we compute T ([v] V. T ([v] V = M[v] V = Thus, [T (v] S = T ([v] V. 0 2 ( b = + b b + 2b In Chpter, we wrote the rdiogrphic trnsformtion s mtrix. However, we did not hve brin imge objects vectors in R N nor were the rdiogrphs vectors in R M. We will use the bove informtion to explore, through n exmple, how the mtrix we found ws the mtrix representtion of the rdiogrphic trnsformtion. Let V = I 2 2, the spce of 2 2 objects. Let T be the rdiogrphic trnsformtion with 6 views hving 2 pixels ech. This mens tht the codomin is the set of rdiogrphs with 2 pixels. To figure out the mtrix M representing this rdiogrphic trnsformtion, we first chnge the objects in V to coordinte vectors in R 4 vi the trnsformtion T. So T is defined s T. V x x 2 x 3 x 4 where we hve used the stndrd bsis for I 2 2. After multiplying by the mtrix representtion, we will chnge from coordinte vectors in R 2 bck to rdiogrphs vi T 2 which is defined by: R 4 x x 2 x 3 x 4
4.2. CHANGE OF ASIS MATRIX 259 T 2 R2 W b b b 2 b 2 b 3 b 4 b 3 b 5 b 6 b 4 b 7 b 8 b 5 b b 6 9 b 0 b b 7 b 2 b 8 b 9 b 0 b b 2 where, gin, we hve used the stndrd bsis for the rdiogrph spce. Our rdiogrphic trnsformtion is then represented by the mtrix M (which we clled T in Chpter. M will be 2 4 mtrix determined by the rdiogrphic set up nd the chosen bses. 4.2 Chnge of sis Mtrix Situtions rise in mny pplictions so tht it will be useful to chnge our coordinte representtions from the use of one bsis to nother. Consider brin imges represented in coordinte spce R N reltive to bsis 0 = {u, u 2,..., u N }. Perhps this bsis is the stndrd bsis for brin imges. Now suppose tht we hve nother bsis = {v, v 2,..., v N } for R N for which v 43 is brin imge strongly correlted with disese X. If brin imge x is represented s coordinte vector [x] 0, it my be simpler to perform necessry clcultions, but it my be more involved to dignose if disese X is present. However, the 43 st coordinte of [x] tells us directly the reltive contribution of v 43 to the brin imge. Ides such s this inspire the benefits of being ble to quickly chnge our coordinte system. Let T : R n R n be the chnge of coordintes trnsformtion from ordered bsis = {b, b 2,..., b n } to ordered bsis = { b, b 2,..., b n }. We represent the trnsformtion s mtrix M = [T ]. The key ide is tht chnge of coordintes does not chnge the vectors themselves, only their representtion. Thus, T must be the identity trnsformtion. We hve
260 CHAPTER 4. MATRIX REPRESENTATIONS [T ] = [I] = [I(b ] [I(b 2 ]... [I(b n ] = [b ] [b 2 ]... [b n ]. Definition 4.2.. Let nd be two ordered bses for vector spce V. The mtrix representtion [I] for the trnsformtion chnging coordinte spces is clled chnge of bsis mtrix. Note: The k th column of the chnge of bsis mtrix is the coordinte representtion of the k th bsis vector of reltive to the bsis. Exmple 4.2.. Consider n ordered bsis for R 3 given by = v =, v 2 = 0, v 3 =. 0 Find the chnge of bsis mtrix M from the stndrd bsis 0 for R 3 to. We hve M = [e ] [e 2 ] [e 2 ]. We cn find [e ] by finding sclrs, b, c so tht e = v + bv 2 + cv 3.
4.3. PROPERTIES OF MATRIX REPRESENTATIONS 26 Solving the corresponding system of equtions, we get =, b =, c =. 0 So, [e ] =. Similrly, we find tht [e 2 ] = nd [e 3 ] = 0. Thus M = 0 0 Now, given ny coordinte vector (with respect to the stndrd bsis v = b, we cn write s coordinte vector in terms of by c [v] = M[v] 0 = 0 0 b c. = c b + b + c 4.3 Properties of Mtrix Representtions Consider the following theorems which help us mke sense of mtrix representtions of multiple liner trnsformtions. The proof of ech follow from the properties of mtrix multipliction nd the definition of the mtrix representtion. The first theorem shows tht mtrix representtions of liner trnsformtions stisfy linerity properties themselves.. Theorem 4.3.. Let T, U : V W be liner, α sclr, nd V nd W be finite dimensionl vector spces with ordered bses nd, respectively. Then ( [T + U] = [T ] + [U] (b [αt ] = [T ]. Proof. See Exercise 7.
262 CHAPTER 4. MATRIX REPRESENTATIONS The second theorem shows tht mtrix representtions of compositions of liner trnsformtions behve s mtrix multipliction opertions (in pproprite bses representtions. Theorem 4.3.2. Let T : V W nd U : W X be liner, u V, V, W, nd X be finite dimensionl vector spces with ordered bses,, nd, respectively. Then [U T ] = [U] [T ]. Proof. See Exercise 8. The third theorem verifies our mtrix representtion construction of Section 4. Theorem 4.3.3. Let T : V W be liner, v V, nd V, W be finite dimensionl vector spces with ordered bses nd, respectively. Then [T (v] = [T ] [v]. Proof. See Exercise 9 4.4 Exercises Find the mtrix representtion, M = [T ] W V with the given bses V nd W. of ech trnsformtion below. T : V O V R, where V O is the spce of objects with 4 voxels nd V R is the spce of rdiogrphs with 4 pixels nd T x x 3 x 2 x 4 = 2 Where VO nd VR re the stndrd bses. x + x 2 x 3 + x 4 3 x + x 2 + 2 3 x. 4 3 x + x 3 + 3 x 4
4.4. EXERCISES 263 2. T : V O R 4, where V O is the spce of objects with 4 voxels nd V R is the spce of rdiogrphs with 4 pixels nd T x x 3 x 2 x 4 = x x 3 x 2 x 4 where is the stndrd bsis for V O. Where VO nd R 4 re the stndrd bses. ( b 3. T : M 2 2 R 4 defined by T = b c d + b {( ( ( c d ( } 0 Where M2 2 =,,, nd 0 0 0 0 0 R 4 is the stndrd bsis. 4. T : P 2 (R P 2 (R defined by T (x 2 + bx + c = cx 2 + x + b, where P2 = {x 2 +, x, }. 5. T : P 2 (R P 2 (R defined by T (x 2 + bx + c = ( + bx 2 b + c, where P2 is the stndrd bsis. 6. T : H 4 (R R 4 defined by T (v = [v] Y, where H4 (R = Y the bsis given in Exmple 9.3.3 nd R 4 is the stndrd bsis. 7. T : D(Z 2 D(Z 2 defined by T (x = x + x, where D(Z is the bsis given in Exmple 9.3.5. 8. The trnsformtion of Exercise 8 in Chpter 2 on het sttes, where H4 (R = Y the bsis given in Exmple 9.3.3. For Exercises 9-3, choose common vector spces V nd W nd liner trnsformtion T : V W for which M is the mtrix representtion of T when using the stndrd bses for V nd W.Check your nswers with t lest two exmples. ( 3 2 9. M = 2,
264 CHAPTER 4. MATRIX REPRESENTATIONS ( 0. M = 2 2 0. M = 2 3 0 ( 0 0 2. M = 0 2 3. M = 2 2 2 2 0 0 For Exercises 4-6, find the mtrix representtion of the trnsformtion T : V W. 4. V = P 3 with the bsis = {x 3, x 2 +, x +, } nd W = P 2 with the stndrd bsis. T (x 3 + bx 2 + cx + d = 3x 2 + 2bx + c. 5. V = R 3 with the stndrd bsis nd W = R 3 with bsis 0 x = 0,, 0 nd T y = 0 z x + y y z 0 6. V = M 3 2 with the stndrd bsis nd W = M 2 2 with the bsis {( ( ( ( } 0 0 0 0 =,,,. 0 0 0 0 0 2 ( T 2 22 = 2 + 22 3 2 + 3 32 3,2 Additionl Exercises. 7. Prove Theorem 4.3.. 8. Prove Theorem 4.3.2. 9. Prove Theorem 4.3.3.