14
Change of basis
When we rst set up a problem in mathematics, we normally use the most familiar coordinates. In R3 , this means using the Cartesian coordinates x, y, and z . In vector terms, this is equivalent to using what weve called the standard basis in R3 ; that is, we write x 1 0 0 y = x 0 + y 1 + z 0 = xe 1 + y e 2 + z e 3 , z 0 0 1 where {e1 , e2 , e3 } is the standard basis. But, as you know, for any particular problem, there is often another coordinate system that simplies the problem. For example, to study the motion of a planet around the sun, we put the sun at the origin, and use polar or spherical coordinates. This happens in linear algebra as well. Example: Lets look at a simple system of two rst order linear dierential equations dx1 = 3 x1 + x2 dt dx2 = x1 + 3 x2 . dt (1)
To solve this, we need to nd two functions x1 (t), and x2 (t) such that both equations hold simultaneously. Now theres no problem solving a single dierential equation like dx/dt = 3x. In fact, we can see by inspection that x(t) = ce3t is a solution for any scalar c. The diculty with the system (1) is that x1 and x2 are coupled, and the two equations must be solved simulataneously. There are a number of straightforward ways to solve this system which youll learn when you take a course in dierential equations, and we wont worry about that here. But theres also a sneaky way to solve (1) by changing coordinates. Well do this at the end of the lecture. First, we need to see what happens in general when we change the basis. For simplicity, were just going to work in R2 ; generalization to higher dimensions is (really!) straightforward. Suppose we have a basis {e1 , e2 } for R2 . It doesnt have to be the standard basis. Then, by the denition of basis, any vector v R2 can be written as a linear combination of e1 and e2 . That is, there exist scalars c1 , c2 such that v = c1 e1 + c2 e2 . 1
Definition: The numbers c1 and c2 are called the coordinates of v in the basis {e1 , e2 }. And c1 ve = c2 is called the coordinate vector of v in the basis {e1 , e2 }. Theorem: The coordinates of the vector v are unique. Proof: Suppose there are two sets of coordinates for v. That is, suppose that v = c1 e1 + c2 e2 , and also that v = d1 e1 + d2 e2 . Subtracting the two expressions for v gives 0 = (c1 d1 )e1 + (c2 d2 )e2 . But {e1 , e2 } is linearly independent, so the coecients in this expression must vanish: c1 d1 = c2 d2 = 0. That is, c1 = d1 and c2 = d2 , and the coordinates are unique, as claimed. Example: Let us use the basis {e1 , e2 } = and suppose v= 3 5 . 1 2 , 2 3 ,
Then we can nd the coordinate vector ve in this basis in the usual way, by solving a system of linear equations. We are looking for numbers c1 and c2 (the coordinates of v in this basis) such that 1 2 3 c1 + c2 = . 2 3 5 In matrix form, this reads Ave = v, where A= 1 2 2 3 , v= 3 5 , and ve = c1 c2 .
We solve for ve by multiplying both sides by A1 : 3 2 2 1 3 5 19 1 19/7 1/7
ve = A1 v = (1/7)
= (1/7)
Exercise: Find the coordinates of the vector v = (2, 4)t in this basis.
14.1
Notation
In this section, well develop a compact notation for the above computation that is easy to remember. Start with an arbitrary basis {e1 , e2 } and an arbitrary vector v. We know that v = c1 e 1 + c2 e 2 , where c1 c2 = ve
is the coordinate vector. We see that the expression for v is a linear combination of two column vectors. And we know that such a thing can be obtained by writing down a certain matrix product: If we dene the 2 2 matrix E = (e1 |e2 ) then the expression for v can be simply written as v = E ve . Now suppose that {f1 , f2 } is another basis for R2 . Then the same vector v can also be written uniquely as a linear combination of these vectors. Of course it will have dierent coordinates, and a dierent coordinate vector vf . In matrix form, well have v = F vf . Exercise: Let {f1 , f2 } be given by 1 1 If v= 3 5 , , 1 1 .
(same vector as above) nd vf and verify that v = F vf = E ve . Remark: This works just the same in Rn , where E = (e1 | |en ) is n n, and ve is n 1. Continuing along with our examples, since E is a basis, the vectors f1 and f2 can each be written as linear combinations of e1 and e2 . So there exist scalars a, b, c, d such that f1 = f2 = 1 1 1 1 = a = c 1 2 1 2 +b +d 2 3 2 3
We wont worry now about the precise values of a, b, c, d, since you can easily solve for them. 3
Definition: The change of basis matrix from E to F is P = a c b d .
Note that this is the transpose of what you might think it should be; this is because were doing column operations, and its the rst column of P which takes linear combinations of the columns of E and replaces the rst column of E with the rst column of F , and so on. In matrix form, we have F =EP and, of course, E = F P 1 . Exercise: Find a, b, c, d and the change of basis matrix from E to F . Given the change of basis matrix, we can gure out everything else we need to know. Suppose v has the known coordinates ve in the basis E , and F = E P . Then v = E ve = F P 1 ve = F vf . Remember that the coordinate vector is unique. This means that vf = P 1 ve . If P changes the basis from E to F , then P 1 changes the coordinates from ve to vf 1 . Compare this with the example at the end of the rst section. For any nonsingular matrix P , the following holds: v = E ve = E P P 1 ve = G vg , where P is the change of basis matrix from E to G: G = E P , and P 1 ve = vg are the coordinates of the vector v in this basis. This notation is consistent with the standard basis as well. Since e1 = we have E = I2 , and v = I2 v Remark: When we change from the standard basis to the basis {e1 , e2 }, the corresponding matrices are I (for the standard basis) and E . So according to whats just been shown, the change of basis matrix will be the matrix P which satises E = I P. In other words, the change of basis matrix in this case is just the matrix E .
Warning: Some texts use P 1 instead of P for the change of basis matrix. This is a convention, but you need to check.
1
1 0
, and e2 =
0 1
Exercises: Let E = (e1 |e2 ), and F = (f1 |f2 ), where E= 1 1 2 1 , and F = 2 1 2 1 .
1. Using the technique described in the notes, nd the change of basis matrix P from E to F by expressing {f1 , f2 } as linear combinations of e1 and e2 . 2. Now that you know the correct theology, observe that F = EE 1 F , and therefore the change of basis matrix must, in fact, be given by P = E 1 F . Compute P this way and compare with (1) First example, contd We can write the system of dierential equations in matrix form as dv = dt 1 3 3 1 v = Av . (2)
We change from the standard basis to F via the matrix F = 1 1 1 1 .
Then, according to what weve just worked out, well have vf = F 1 v, and taking derivatives, So using v = F vf and substituting into (2), we nd dvf dvf = AF vf , or = F 1 AF vf . dt dt Now an easy computation (do it!) shows that F 1 AF = 4 0 0 2 , dvf dv = F 1 . dt dt
and in the new coordinates, we have the system dvf1 dt dvf2 dt = 4vf 1 = 2vf 2
In the new coordinates, the system is now decoupled and easily solved to give vf1 = c1 e4t vf2 = c2 e2t , 5
where c1 , c2 are arbitrary constants of integration. We can now transform back to the original (standard) basis to get the solution in the original coordinates: v = F vf = v1 v2 = 1 1 1 1 c1 e4t c2 e2t = c1 e4t + c2 e2t c1 e4t c2 e2t .
A reasonable question at this point is How does one come up with this new basis F ? It clearly was not chosen at random. The answer has to do with the eigenvalues and eigenvectors of the coecient matrix of the dierential equation, namely the matrix A= 1 3 3 1 .
All of which brings us to the subject of the next lecture.