Applied Linear Algebra ——– Chapter 2: Vector Spaces, Linear Transformations, and their applications Section 7: Coordinate of vectors and linear transformations relative to bases
Ivan Contreras, Sergey Dyachenko and Bob Muncaster University of Illinois at Urbana-Champaign
February 21 2018
Ivan Contreras, Sergey Dyachenko and Bob MuncasterUniversityApplied Linear of Illinois Algebra——– at Urbana-Champaign February 21 2018 1 / 8 Coordinates of Vectors
Previously we saw that you can express a vector in terms of a basis in exactly one way. Let us formalize that idea now.
Definition: An ordered basis F = (f1, f2, ..., fn) of a vector space V is a basis whose members have been ordered from first to last in some way (as indicated here by the subscripts). Let v be a vector in V . Then there are unique coefficients a1, a2, ..., an such that
v = a1f1 + a2f2 + ··· + anfn
We call the ai ’s the coordinates of v relative to the basis F and adopt the notation a1 . [v]F = . an Note: Even though a vector can be something rather exotic (a polynomial, a digital image, etc.), its coordinate vector relative to a basis is always a column vector. Robert G MuncasterUniversity of Illinois at Urbana-ChampaignApplied Linear Algebra——– June 2015 2 / 1 An Instructive Examples
Recall from a previous part of these notes that v1 1 0 v1 + v2 1 v1 − v2 1 = v1 + v2 = + v2 0 1 2 1 2 −1
Let E denote the ordered basis (e1, e2) of the two columns of the identity I = I2. Also let F = (f1, f2) where f1 has entries 1,1 and f2 has entries 1,-1. Then the above statement can be written
v1+v2 v1 v1 v1 2 [ ]E = and [ ]F = v1−v2 v2 v2 v2 2 When dealing with column vectors, i.e. members of Rn, it is conventional to denote by E = (e1, ..., en) the standard basis consisting of the columns of the identity matrix I = In. The first of the two statements above simply expresses the fact that when we write a column vector as a simple list of numbers, those numbers are implicitly interpreted as the coordinates relative to the standard basis. The second statement above shows that different ordered bases lead to different coordinate vectors. Robert G MuncasterUniversity of Illinois at Urbana-ChampaignApplied Linear Algebra——– June 2015 3 / 1 More Examples
Ex: 5 1 0 0 v = −1 = 5 0 − 1 1 − 2 0 = 5e1 − 1e2 − 2e3 −2 0 0 1 5 =⇒ [v]E = −1 −2 5 1 1 0 v = −1 = 3 1 + 2 0 − 4 0 = 3f1 + 2f2 − 4f3 −2 0 1 1 3 ( ↑ how do you find these numbers? ↑ ) =⇒ [v]F = 2 −4 where F = (f1, f2, f3)
Robert G MuncasterUniversity of Illinois at Urbana-ChampaignApplied Linear Algebra——– June 2015 4 / 1 An Example with Polynomials as Vectors
For the polynomials in Pn we often write these in the form 2 n v(t) = a0 + a1t + a2t + ··· + ant that is, as a linear combo of the special basis 2 n e0(t) = 1, e1(t) = t, e2(t) = t , ..., en(t) = t
We will refer to this basis as the standard basis in Pn and write E = (e0, e1, ..., en). Then we see that for the v above: a0 . [v]E = . an
Ex: In V = P3 we have 2 2 3 3 v(t) = 2 + 3t + 4t + 5t =⇒ [v]E = 4 5 Robert G MuncasterUniversity of Illinois at Urbana-ChampaignApplied Linear Algebra——– June 2015 5 / 1 Example (continued)
Let F = (f0, f1, f2, f3) where 2 2 3 f0(t) = 1, f1(t) = 1 + t, f2(t) = 1 + t + t , f3(t) = 1 + t + t + t
You should verify for yourself that this is another ordered basis of P3 (linearly independent and spanning P3 - what follows now is a suggestion of how you do this). Let’s find the coordinates of the polynomial v above in this new basis. This means we need to find real numbers c0, c1, c2, c3 such that v(t) = 2 + 3t + 4t2 + 5t3 2 2 3 = c0 (1) + c1 (1 + t) + c2 1 + t + t + c3 1 + t + t + t Rearrange the right side by collecting all constant terms, then all linear terms, etc.: v(t) = 2 + 3t + 4t2 + 5t3 2 3 = (c0 + c1 + c2 + c3) + (c1 + c2 + c3)t + (c2 + c3)t + c3t
Robert G MuncasterUniversity of Illinois at Urbana-ChampaignApplied Linear Algebra——– June 2015 6 / 1 An Example with Matrices as Vectors
This leads to the linear system
c0 + c1 + c2 + c3 = 2, c1 + c2 + c3 = 3, c2 + c3 = 4, c3 = 5 This you can solve by G-E (actually just back substitution): c0 = −1, c1 = −1, c2 = −1, c3 = 5. Therefore we have the following coordinate vectors for our polynomial: 2 −1 2 3 3 2 3 −1 [2 + 3t + 4t + 5t ]E = and [2 + 3t + 4t + 5t ]F = 4 −1 5 5
Ex: In this example V = R2×2. The standard basis here is taken to be E = (e1, e2, e3, e4) where 1 0 0 1 0 0 0 0 e = , e = , e = , e = 1 0 0 2 0 0 3 1 0 4 0 1
Robert G MuncasterUniversity of Illinois at Urbana-ChampaignApplied Linear Algebra——– June 2015 7 / 1 Example (continued)
Thus 5 5 9 5 9 9 = 5e1 + 9e2 − 1e3 − 1e4 =⇒ [ ]E = −1 −1 −1 −1 −1 −1
Now set F = (f1, f2, f3, f4) where 1 0 1 0 0 1 0 1 f = , f = , f = , f = 1 0 1 2 0 −1 3 1 0 4 −1 0
This is another basis of R2×2 (how would you show this?). Then
2 5 9 5 9 3 = 2f1 + 3f2 + 4f3 + 5f4 =⇒ [ ]F = −1 −1 | {z } −1 −1 4 how do you find these numbers? 5
Robert G MuncasterUniversity of Illinois at Urbana-ChampaignApplied Linear Algebra——– June 2015 8 / 1 The Coordinate Matrix of a Linear Transformation
Let T : V → W be a linear transformation. Let F = (f1, ..., fn) be an ordered basis of V (i.e dim V = n) and H = (h1, ..., hm) be an ordered basis of W (i.e dim W = m). We have seen previously that T is completely determined by its values on a basis, i.e. by T (f1), ..., T (fn). Each of these is a vector in W and thus uniquely represented in terms of the basis H: T (f1) = a11h1 + ··· + am1hm T (f2) = a12h1 + ··· + am2hm ...... T (fn) = a1nh1 + ··· + amnhm The matrix a11 ··· a1n . .. . [T ]HF = . . . am1 ··· amn is called the coordinate matrix of T relative to the bases F and H.
Robert G MuncasterUniversity of Illinois at Urbana-ChampaignApplied Linear Algebra——– June 2015 9 / 1 The Value of Coordinates
Vectors and linear transformations can at times be rather exotic, but in coordinates they become column vectors and matrices. As such they are easy to program into a computer. But how do you apply T to a vector v in terms of coordinates? If w = T (v) and [w]H = y, [v]F = x, [T ]HF = A, then
w = y1h1 + ··· + ymhm = T (x1f1 + ··· + xnfn)
= x1T (f1) + ··· + xnT (fn)
= x1(a11h1 + ··· + am1hm) + ··· + xn(a1nh1 + ··· + amnhm)
= (a11x1 + ··· + a1nxn)h1 + ··· + (am1x1 + ··· + amnxn)hm
i.e. y1 = a11x1 + ··· + a1nxn, ..., ym = am1x1 + ··· + amnxn i.e. y = Ax In other terms: w = T (v) ⇐⇒ y = Ax i.e multiple the coordinate vector of v by the coordinate matrix of T to get the coordinate vector of w
Robert G MuncasterUniversity of Illinois at Urbana-ChampaignApplied Linear Algebra——– June 2015 10 / 1 Some Examples
With the previous result we can not only represent vectors and linear transformations on a computer, but we can also apply the transformation to vectors to get other vectors! It is just matrix multiplication.
Let’s look now at some computation of coordinate matrices for linear transformations. Ex: First take V = W = R2 and 1 1 E = (e , e ), H = (h , h ) = ( , ) 1 2 1 2 1 −1 and consider the linear transformation v 3v + v T (v) = T ( 1 ) = 1 2 v2 −v1 Compute T applied to the basis E of V : 1 3 0 1 T (e ) = T ( ) = , T (e ) = T ( ) = 1 0 −1 2 1 0
Robert G MuncasterUniversity of Illinois at Urbana-ChampaignApplied Linear Algebra——– June 2015 11 / 1 Example (continued)
In W we could use either E or H as the basis. Consider first E. This means that we need to write T (e1) and T (e2) in terms of this basis. Then we can read off the coordinate matrix: T (e1) = 3e1 − 1e2 3 1 and so [T ]EE = T (e2) = 1e1 + 0e2 −1 0 To check that we are getting things correct, we see that 3v1 + v2 3 1 v1 [T (v)]E = [T ]EE [v]E becomes = −v1 −1 0 v2 We saw previously that every linear transformation of the plane to itself was respresented by a matrix, in this case the one shown here. Therefore we could equally well write 3 1 3 1 [ ] = −1 0 EE −1 0 The matrix of a linear transformation of R2 to R2 is implicitly that relative to the standard basis in both domain and range space. Robert G MuncasterUniversity of Illinois at Urbana-ChampaignApplied Linear Algebra——– June 2015 12 / 1 Example (continued)
Let us continue the example now by using instead the basis H in the range space. We need constants aij such that 3 1 1 1 1 a11 T (e1) = = a11 + a21 = −1 1 −1 1 −1 a21 1 1 1 1 1 a12 T (e2) = = a12 + a22 = 0 1 −1 1 −1 a22
We can find the aij by a double G-E:
1 1 1 3 1 1 0 a11 a12 1 0 1 2 −−→G-E = 1 1 −1 −1 0 0 1 a21 a22 0 1 2 2 Thus 1 1 2 [T ]HE = 1 2 2
Robert G MuncasterUniversity of Illinois at Urbana-ChampaignApplied Linear Algebra——– June 2015 13 / 1 An Example in Polynomial Space
Ex: Let us take V = P3, W = P2 and let T be “differentiation”. We will use bases E = (1, t, t2, t3) in V and E = (1, t, t2) in W . We simply need to compute T applied to the first basis and express the results in terms of the second basis. Here it is:
T (1) = (1)0 = 0 = 0 × 1 + 0 × t + 0 × t2 T (t) = (t)0 = 1 = 1 × 1 + 0 × t + 0 × t2 T (t2) = (t2)0 = 2t = 0 × 1 + 2 × t + 0 × t2 T (t3) = (t3)0 = 3t2 = 0 × 1 + 0 × t + 3 × t2
From this we read off the coordinate matrix: 0 1 0 0 [T ]EE = 0 0 2 0 0 0 0 3
Robert G MuncasterUniversity of Illinois at Urbana-ChampaignApplied Linear Algebra——– June 2015 14 / 1 A Check of the Example
Here is a check:
2 3 0 2 (a0 + a1t + a2t + a3t ) = a1 + 2a2t + 3a3t a0 a1 2 3 a1 2 [a0 + a1t + a2t + a3t ]E = , [a1 + 2a2t + 3a3t ]E = 2a2 a2 3a3 a3
and so a0 a1 0 1 0 0 a1 [T (v)]E = [T ]EE [v]E becomes 2a2 = 0 0 2 0 a2 3a3 0 0 0 3 a3
Differentiation by matrix multiplication!
Robert G MuncasterUniversity of Illinois at Urbana-ChampaignApplied Linear Algebra——– June 2015 15 / 1