If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

# Changing coordinate systems to help find a transformation matrix

Changing our coordinate system to find the transformation matrix with respect to standard coordinates. Created by Sal Khan.

## Want to join the conversation?

• Shouldn't C be
[2,1]
[-1,2]
?
• Shouldn't the basis be [2,-1] and [1,2]?
• This question suggested by - but is not directly related to - any specific point in the actual video.
Start with a Cartesian 3D (x,y,z) coordinate system and draw the corresponding 3 axes as a right-hand system in the usual way.
Consider now drawing an overlay of a Spherical 3D (r,theta,phi) coordinate system on top of the original Cartesian, where positive, constant r defines a spherical surface with radius r measured from the common origin, positive, constant theta defines a "longitude" (or azimuth) great circle, and positive, constant phi defines a "zenith" (or co-latitude) open conical surface. Consider a fixed point and show its "unit vectors" in each system.
Note the positive directions of both (x,y,z) and (r,theta,phi) axes.
Why is it that the Cartesian (x,y,z) is clearly a right-hand system while the Spherical (r,theta,phi) seems to be a left-hand system? I'm missing something here. Thanks, Ed
• I have answered my own question with further study.
The Spherical (r,theta,phi) system IS a left-hand system because phi is defined as a "co-latitude" measured "down" from a North Pole instead of a "latitude" measured "up" from an Equator, thereby reversing the sense of increasing, positive phi.
Thus the "reference" Cartesian"(x,y,z) is right-hand while the "standard" mathematics Spherical system is left-hand. This may not cause any problems with correctly-defined transformations, but it may be worthy of note for educational purposes.
• I'm curious why the placing of the negative matters so much, as it changes the answer completely. If I place the negative where he put it, <2, -1>, then the matrix comes out fine and dandy, nothing to complain about; however, if I change the place of the negative (and thus the direction) to <-2, 1>, the whole system goes out of wack. Take, for example:

I decide to change the placing of the negative, thus the new A will look like this if I am correct
[-2 1] * [1 0] [2 -1] *(-1/5)
[1 2] [0 1] [-1 -2]

I changed the matrix D to include only positive values of 1; however, even if you switch the sign on either the bottom right "1" of D or top left "1", the answer still does not turn out to be the matrix A that Khan got. Even more interesting, some results compute to be the reflection over a separate axis (I can't remember which version of A it did it to). There is something fundamentally conceptual that I am missing, as a change this small making such a large effect has pretty big ramifications on the future of doing these problems because I'm not sure how you would determine which terms the (-1) should go on. There could also be a mistake on how I am generally setting it up. If I haven't confused you, I would love a response so I can stop beating my head over this.
• I tried it like you say, v1=<-2,1> instead of <2,-1> and I'm getting the right answer.
The key is to realize that even if we choose the flipped v1 axis, D remains exactly the same, because in this new coordinate system universe, [v1]_B is still [1 0], not [-1 0].
Also make sure you update C to have the new v1.
• So now that we have A, I guess I need a little clarity on what using it will do.

Am I understanding things correctly to say that if you multiply any vector in the standard basis by A, you will output that vector flipped about the line L?
• Yes, that's correct.
• At ish, isn't that transformation with respect to the basis B?
• No. `T` is a transformation with respect to standard basis.
The reason that `T(v1) = -v1` is because `v1` itself, in standard basis, is orthogonal to reflection line.
• OOH he sooo screwed up the C(inv).

C = [[2, -1], [1, 2]]

So C(inv) = 1/4[[2, 1], [-1, 2]]

Which changes his final answer quite a bit.
• Actually no, C(inv) = 1/5[[2, 1], [-1, 2]] is correct.
• is this only right when our transformation is some how related to some basis vector or would be useful in every case.
• Why not use [1,2] and [2,-1] as the base of Matrix B for the change basic. In the video, v1 is [2,-1]
The dot product of [1,2] and [2,-1] is zero, they're perpendicular. While, the video chose [2,1] and [1,2] let me quite confuse, because they are not perpendicular. If we chose [1,2] and [2,-1], my result is nearly same as the video one except for the sign. The result is 1/5 [3,-4][-4,-3].
• Old question, but for the rest of you who are writing/reading comments before watching the whole video - watch till the end first :)
• At (ignoring the lack of negative number) you had B={v_1, v_2}, the way basis work could you swap the set around and have B={v_2, v_1} instead?
Or does it matter which vector comes first because of the 2D graph shown at ?
• You are allowed to change the coordinate system however you like. The matrix D will be slightly different, but it should still be pretty simple.
• In the very start, given [x] in B shouldn't D = C*A*C^-1 to get [T(x)] in B instead of D = C^-1*A*C?
• I found this required a little effort get clear.

The short answer: What's (T(x))_B in terms of x_B?
(T(x))_B = (C inverse)*T(x) = (C inverse)*Ax = (C inverse)*A*C*x_B = ((C^-1)AC)*x_B = D*x_B.

Here it is in more detail in case that helps:

To get D in terms of A, compose the transformations from x_B to x, (of x out of basis B into the standard basis), from x to T(x) (from and to vectors with standard basis coordinates), and from T(x) to (T(x))_B (of T(x) out of standard basis into basis B). In R^2:

If the basis B is {b1, b2}, what's the transformation matrix from basis "B" to standard basis?
([b1, b2]; Sal calls this matrix "C").

What's the transformation matrix from standard basis to basis "B"?
(C inverse = "[b1 b2] inverse").

So what's x in terms of x_B?
(Cx_B)

What's T(x) in terms of x?
(Ax)

What's (T(x))_B in terms of T(x)?
((C inverse)*T(x))

So what's (T(x))_B in terms of x_B?
(T(x))_B = (C inverse)*T(x) = (C inverse)*Ax = (C inverse)*A*Cx_B = ((C^-1)AC)x_B = Dx_B