6. Change of Basis and Coordinate Transformations

    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 would give 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.

§6.1 Change of Basis Basics

Exercise 6.1

Do work by hand.

(a)  Consider two sets of bases for R2:

B1 = {(2, 4)T, (4, 2)T} and B2 = {(5, 3)T, (3, 2)T}

What are the standard coordinates of a vector with coordinates (4, 1) in the basis B1?

Do work by hand. (b)  Compute the change of basis matrix from B1 to the standard basis E.  Now, use this matrix to compute the standard coordinates of the vector (4, 1).

    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 B2?  This is the question for the next exercise.

Exercise 6.2

Include full-sentence response.

(a)  Must a change of coordinates matrix always be invertible? Explain.

Include input and output. Include full-sentence response.

(b)  If is the change of basis matrix from B2 to E, what is the change of basis matrix, , from E to B2 in terms of ?  Explain your answer.  With E and B2 as in the above example, compute .  Include all MATLAB commands along with the output in the lab write up.

    Now we can ask how to switch between two arbitrary bases B1 and B2.  That is, we want to find a matrix that, given some coordinates with respect to the basis B1, will give us the coordinates of the same vector in the basis B2.  The answer is simple enough.  We first change coordinates from B1 to the coordinates in the standard basis E, and then, using the result you got in Exercise 6.2, change coordinates from E to B2.  Here is a chart to help you digest this process:

Exercise 6.3

Include input and output.

(a)  Compute the change of basis matrix from B1 to B2 with the bases as in Exercise 6.1.  You may use the chart above to help you.  Include all your MATLAB commands in your lab write up.

Include input and output.

(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 (4, 1) with respect to the basis B1.  Use part (a) above to compute the coordinates of this vector in the basis B2.  Include your commands and output in your write up.

Do work by hand.

(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 6.1(a).  How do they compare?

    The ideas discussed above may be a little confusing at first, but with enough practice you can start to feel comfortable with it.

Exercise 6.4

Include full-sentence response.

(a)  Let B1 = {(1, 0, 1)T, (2, 0, 1)T, (2, 3, 4)T}B2 = {(1, 0, 0)T, (1, 1, 0)T, (1, 1, 1)T} and E be the standard basis for R3. What is ?

Include input and output.

(b)  Use MATLAB to compute .  If x = (3, 2, 1)T is a vector in standard coordinates, find the coordinates of this vector in the basis B2.  Include all relevant commands with the output in your write up.

Include input and output.

(c)  Compute .  Include all relevant commands you use along with the output in your write up.

Include input and output.

(d)  If x = (1, 2, 1)T are coordinates with respect to B1, compute the coordinates of this vector with respect to B2.  What are the standard coordinates of this vector?  Include all relevant commands and output in your lab write up.

§6.2 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

Include input and output. Include plots and graphs.

Exercise 6.5  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 what's 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 6.6

Include full-sentence response.

(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?

Do work by hand.

(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'.

Do work by hand.

(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

Include input and output. Include plots and graphs. Include full-sentence response.

(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 to 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.


Last Modified:

01/08/05