§5.1 Introduction
We encounter coordinates throughout mathematics and its various applications. For example, a point on earth can be described by giving its parallel and meridian coordinates, location in a lecture hall can be given by its x, y and z coordinates, and a path of a cockroach on a kitchen floor can be described by its x and y coordinates. Oftentimes, however, we may choose to switch coordinates to simplify our calculations. You have seen instances of such an approach in your calculus class when you switched from rectangular to polar coordinates to take advantage of spherical symmetry of an object under consideration. Thus, if the cockroach in the kitchen travels in a circular path around the origin, we would rather give its distance from the origin and the angle it makes with the horizontal, than derive an equation of a circle centered at the origin with a given radius. In order for this approach to be effective we must be able to switch freely from one set of coordinates to another. You know how to do that in the case of the cockroach and polar coordinates. The goal of this section of the lab is to talk about linear changes of coordinates, that is, switching from one basis of a vector space to a different basis. Indeed, one may think of a basis simply as some chosen coordinate system, and changing a basis gives us a different coordinate system. Changing from one to the other requires some work, namely computing the change of coordinate matrix. Given coordinates of a point in one basis, we will be able to obtain the coordinates of that point in another basis by applying the change of coordinates matrix to it.
§5.2 Change of Basis Basics
Let us first recall a few basic facts about bases and change of basis matrices. Suppose we have two bases for a vector space V:
B = {v1, ..., vn} and C = {w1, ..., wn}
You may think of different bases as different sets of coordinate systems defined on our vector space. They allow us to describe the elements of V by assigning unique coordinates to each vector in V. That is, if we are given some vector x in V, we can express it either in terms of the coordinate system determined by the basis B or in terms of coordinates determined by the basis C. In each case we may end up with different coordinates for our vector x. That is, we can write:
x = a1v1 + ... + anvn
or
x = b1w1 + ... + bnwn
In the first case the coordinates of the vector x with respect to the basis B are (a1, ..., an)T, and we write [x]B = (a1, ..., an)T. In the second case, the coordinates of the vector x with respect to the basis C are (b1, ..., bn)T and we denote it by [x]C = (b1, ..., bn)T. It is important to keep in mind, that even though these coordinates may be different, they still represent the same vector x. Remember that coordinate representations only describe the vector in a vector space, they are in no way the vector itself. That means that the same vector may look different, depending on our point of view (coordinate system). However, given the coordinates of some vector y with respect to the basis B to be (c1, ..., cn)T, we can uniquely recover our vector y, by the formula
y = c1v1 + ... + cnvn
Finally, recall that given two bases B and C, a change of basis matrix PC ←B is a matrix that allows us to figure out the coordinates of a vector with respect to the basis C, given the coordinates of that vector in basis B. That is if [x]B = (a1, ..., an)T, then [x]C is obtained by (PC ←B)·[x]B. It turns out that this change of basis matrix is given by:
PC ←B = [ [v1]C [v2]C ... [vn]C ]
Now let us get some practice in navigating through these ideas.
| Exercise 5.1 | |
| (a) Consider
three
sets of bases for R2: B = {(1, 3)T, (3, 1)T}, C = {(2, 2)T, (2, 0)T}and the standard basis E = {(1, 0)T, (0, 1)T} What are the standard coordinates of a vector with coordinates (7, -2) in the basis B? |
|
| (b) Compute the change of basis matrix PE ←B from B to E. Now, use this matrix to compute the standard coordinates of the vector (7, -2). | |
So we know how to go from any basis to the standard basis. Indeed, it is very easy: we just write down the matrix whose columns are the vectors from our basis. But can we go in the reverse direction? That is, can we find a matrix that takes some vector with coordinates in the standard basis and computes the coordinates of the same vector in some other basis, for example, C ? This is the question for the next exercise.
| Exercise 5.2 | |
| (a) Must a change of coordinates matrix always be invertible? Explain. (Think about what the inverse matrix would have to do) | |
|
(b) If PE ←C is the change of basis matrix from C to E, what is the change of basis matrix, PC ←E , from E to C in terms of PE ←C ? Explain your answer. With E and C as in the above exercise, use MATLAB to compute PC ←E . Include all MATLAB commands along with the output in the lab write up. |
|
Now we can ask how to switch between two arbitrary bases B and C . That is, we want to find a matrix that, given some coordinates with respect to the basis B, will give us the coordinates of the same vector in the basis C. The answer is simple enough. We first change coordinates from B to the coordinates in the standard basis E, and then, using the result you got in Exercise 5.2, change coordinates from E to C. Here is a chart to help you digest this process:

| Exercise 5.3 | |
|
(a) Use MATLAB to compute the change of basis matrix from B to C with the bases as in Exercise 5.1. You may use the chart above to help you. Include all your MATLAB commands in your lab write up. |
|
|
(b) Let us see if this computation works if we try to apply it to a simple example. Suppose we have a vector with coordinates (3, 5) with respect to the basis B. Use part (a) above to compute the coordinates of this vector in the basis C. Include your commands and output in your write up. |
|
| (c) Compute the standard coordinates of the vector you obtained in part (b). (Do not compute any transformation matrices for this question. Simply use the vectors in the basis and the coordinates of the vector in that basis). Compare this to the answer in Exercise 5.1(a). How do they compare? | |
Remark 5.1 An important thing to try to do while you are learning this is not to confuse a vector with its coordinates. For example, pretend you are walking around in a desert (assume it's flat) and you want to tell someone where you are. You see a green cactus some distance from you and you radio in to the Desert Rescue Unit that you are 3 meters west and 5 meters south of the green cactus. In this case, the green cactus is the origin of your coordinate system, "south" and "west" are your axes, and (3, 5) are your coordinates in these axes. Without such coordinates, you would have no way of describing where you are. However, the fact that you cannot describe where you are does not prevent you from existing in the desert abstractly and sufficiently hydrated. Vectors don't need a coordinate system to exist, they only need it to be described. Just as you are sure that YOU are not a pair of numbers (3, 5), you must not confuse vectors with their coordinate representations! The ideas discussed above may be a little confusing at first, but with enough practice you can start to feel comfortable with it.
| Exercise 5.4 | |
|
(a) Let B = {(1, 2, 0)T, (4, 1, 3)T, (1, 0, 1)T}, C = {(0, 1, 1)T, (1, 0, 1)T, (1, 1, 0)T} and E be the standard basis for R3. What is PE ←B? |
|
|
(b) Use MATLAB to compute PC ←E . If x = (2, 3, 4)T is a vector in standard coordinates, find the coordinates of this vector in the basis C. Include all relevant commands with the output in your write up. |
|
|
(c) Compute PC ←B . Include all relevant commands you use along with the output in your write up. |
|
|
(d) If x = (1, 1, 1)T are coordinates with respect to B, compute the coordinates of this vector with respect to C. What are the standard coordinates of this vector? Include all relevant commands and output in your lab write up. |
|
Let B = {v1, v2, ..., vn} and C = {w1, w2, ..., wn} be two bases for some vector space V. We know that to obtain a transition matrix PB ←C , we must figure out a way to write every vector of C as a linear combination of vectors from B. Once we know how to do that, the matrix PB ←C , is simply
PB ←C = [ [w1]B [w2]B ... [wn]B ]
For the next exercise let V = {polynomials of degree ≤ 4}, B = {1, x, x2, x3, x4} and C = {1, (x - 1), (x - 1)2, (x - 1)3, (x - 1)4}
| Exercise 5.5 | |
|
(a) Express every element of C as a linear combination of elements of B. Write down the change of coordinate matrix PB ←C and store it in MATLAB with name P. (For example (x - 1)2 = 1 - 2x + x2, so [(x - 1)2]B = (1, -2, 1, 0, 0)T) |
|
|
(b) Use MATLAB to find the inverse of P. Store it in the variable called Q. Fill in the blanks in the following sentence: "Q takes in the coordinates of a vector in the basis _____ , and returns the coordinates of this vector in the basis _____" |
|
|
(c) Use the results of the previous part of this exercise and MATLAB to write down the polynomial p(x) = 5 - 3x - 2x2 + 4x3 + 7x4 as a linear combination of elements from C. (For those of you who know about Taylor series, this problem is asking you to find the Taylor expansion of p(x) around x = 1) |
|
§5.3 Application of Coordinate Transformations
In this section you will see how changing coordinates may simplify the object of study. Consider, for example, the following curve in the plane:
5x2 + 5y2 - 6xy = 8
|
Exercise 5.6 We want to plot this curve using MATLAB. The command we are going to use is 'ezplot'. Here is how it works. Type in the following: >> ezplot ('5*x^2 + 5*y^2 - 6*x*y - 8', [-2, 2], [-2, 2]) >> grid on >> hold on This command tells MATLAB to set the expression in quotes to zero and plot the resulting curve for -2 < x < 2 and -2 < y < 2. A figure window should appear with your curve. In the figure window go to Edit -> Copy Figure. Then paste this figure in your lab write up. |
It appears that the equation above describes an ellipse rotated 45 degrees counter clockwise. The question is, can we make a clever coordinate change that will bring this ellipse into its "standard" horizontal position? The answer turns out to be yes.
| Exercise 5.7 | |
| (a) Let B = {(√2/2, √2/2)T, (-√2/2, √2/2)T} and E be the standard basis in R2. What is the transition matrix from B to E? | |
| (b) Suppose (x, y) are the coordinates of some point in the standard coordinates E, and let (x', y') be the coordinates of the same point in the basis B. Express x and y in terms of x' and y'. | |
| (c) By substituting the result in part (b) into the equation of the
ellipse above, verify that the equation of that ellipse in the new coordinates
is: ( x' )2 / 4 + ( y' )2 = 1 |
|
|
(d) Use 'ezplot' to plot the curve in (c). (When you enter the equation into 'ezplot', just use x instead of x' and y instead of y'.) Describe what you see. Copy your input and the resulting figure into your write up. |
|
What we did in the above exercise was choose a new coordinate system that consists of the axes of the ellipse in question. Of course, if we choose the axes of the ellipse as our coordinate system and rewrite the equation in terms of the new basis, we will get an ellipse that looks straight and not tilted. Just look at the figure below and tilt your head in such a way that the red x' axis looks horizontal.

§5.4 Conclusion
No doubt, the concept of coordinate changes may seem very confusing at first. The author of this lab himself remembers struggling with it as an undergraduate. Nevertheless, as confusing as it is, its importance cannot be stressed enough. It is, therefore, very important for you to spend some time and get used to these concepts. A firm grasp of this topic will, no doubt, help you in doing well in this course.
Last Modified:
07/08/2008