Main content

## Linear algebra

### Course: Linear algebra > Unit 3

Lesson 3: Change of basis- Coordinates with respect to a basis
- Change of basis matrix
- Invertible change of basis matrix
- Transformation matrix with respect to a basis
- Alternate basis transformation matrix example
- Alternate basis transformation matrix example part 2
- Changing coordinate systems to help find a transformation matrix

© 2023 Khan AcademyTerms of usePrivacy PolicyCookie Notice

# Alternate basis transformation matrix example

Example of finding the transformation matrix for an alternate basis. Created by Sal Khan.

## Want to join the conversation?

- hey sal, great vid, but can we get some practice problems? please(30 votes)
- he doent even read these comments i believe. But Hey, I agree(5 votes)

- where can i find practice questions for this?

thanks(14 votes) - It is possible to find a transformation matrix with respect to the standard basis and another basis? I mean only ONE matrix?(1 vote)
- In general, no. Different bases will have different transformation matrices to represent the same transformation. Although, there are some situations where the two can be identical.

For example, a transformation which flips the direction of all vectors will be the same no matter which basis you use (it will be -1's all the way down the diagonal and 0's everywhere else). Similarly, a transformation which scales up all vectors by a factor of 2 will be the same for all bases (2's down the diagonal). Any scalar matrix (which is a scaled identity matrix) will have this property.

[edit]

Using the equation for a transformation under a change of basis:`A = CBC⁻¹`

We can find the general solution for when the transformation matrix is the same by setting A equal to B:`A = CAC⁻¹`

By right-multiplying both sides by C, we get:`AC = CA`

This means that the two transformation matrices are the same iff the transformation matrix and the change of basis matrix commute (this also means they're simultaneously diagonalizable). Intuitively, this means that for an n-dimensional vector space, there has to be n dimensions of eigenspace. Put another way, it has to be possible to use a basis where the basis vectors only get scaled.(9 votes)

- In this video I'm feel confuse about use the same vector for B(basic matrix) and for C(matrix)(2 votes)
- what is the purpose of transformation matrix?(2 votes)
- Exactly what is says - transform some vector from one space to another space. For instance, say you have a triangle defined by three points and wanted to find a triangle with the same relationship between the three points but in quadrant 4 instead of 3. You would find a transformation matrix and use it on every point to move the triangle from one space (Q3) to another (Q4).(1 vote)

- If there is two different basis M N for R3, its basis matix is A and B(both invertible). So A[x]m=B[x]n=x, which also means B^(-1)A[x]m=[x]n. Are the column vecors of B^(-1)A the same as the column vectors in A if we think they are respect to B coordinate? If they are, our take away can be extended to a general form. Exciting!(1 vote)
- standard basis of deivative map(1 vote)
- Does the order of the vector matter in the basis matrix? I mean, can I use either [(1, 2)(2, 1)] or [(2, 1)(1, 2)]?(1 vote)
- i need to find the representing matrix of the transformation according these basis...how i do that?

B ={(1,0,0), (0,1,1), (2,1,0)} E ={(1,0,0), (0,1,0), (0,0,1)}

T : R3 ->R3

T(x, y, z) = (x - 2y, y + 2z, x - 2z)(1 vote)- first, you need to transform all the vectors of the INPUT basis, [(100)(011)(210)]. That should give you these vectors: (101)(-23-2)(011) -I could be mistaken..- Then, since your OUTPUT basis is the standard one, you just create a matrix in which the columns are the transformed vectors' coordinates in the output basis (like I said, since you have the standard basis the coordinates for any vector in relation to that is the vectors coefficients themselves. In this case, the columns for your transformation matrix are just that, so you should get:

1 0 1

-2 3 -2

0 1 1(1 vote)

- Hi I need to determine f(x,y)=?; I have [f]B B'=(2 -1

0 1) where B={(1,1),(1,2)} and B'={(1,0),(0,1)} can please someone show me how to do that? thans(1 vote)- question isn't written clearly enough to be understandable(1 vote)

## Video transcript

Let's review a bit of what we
learned in the last video. If I have some linear
transformation that's a mapping from rn to rn, and if
we're dealing with standard coordinates, that transformation
-- applied to some vector x in standard
cooridenties -- will be equal to the matrix a times x. So let me write this down. If we are dealing with standard
coordinates-- So I have x in standard
coordinates . If I apply the transformation,
that is equivalent to multiplying x by a. If I multiply x by a then
I'm going to get the transformation of x in
standard corodinates. This is a world that we're
very, very familiar with. Now, let's say that we have
an alternate basis to rn. So let's say that b is equal to
v1, v2, all the way to vn. So it has n linearly independent
vectors. Let's say b is a basis for rn. So it's a basis for rn, but
it's a nonstandard basis. These aren't just our standard
basis vectors. So b is a basis for rn. And let's say that c , which
just has these guys as it's column vectors, v1, v2, all the
way to vn , is the change of basis matrix for
the basis b. Now, we've learned -- we've
seen this several times already -- that if I have some
vector x in rn represented in b coordinates, or in coordinates
with respect to b, I can multiply it by the change
of basis matrix and then I'll get just the standard
coordinates for x. Or, if you multiply both sides
of this equation by c inverse, you can get -- And, if I start
with the standard coordinates for x , I can multiply it by c
inverse and then I can get the b coordinates for x, or the
alternate nonstandard coordinates for x. So we've seen both
of these before. So let's apply that to this
little diagram here. So if I want to get x and if
I wanted to write it in nonstandard coordinates,
what do I do? Well, if I have x, and if I want
to write it, what do I multiply it by if I want to go
to nonstandard coordinates? Well, I multiply it
by c inverse. If I multiply it by c inverse--
Whatever I write next to this line. You could say, what matrix do
you have to multiply by to get to the other end point
on your line? So I multiply x by c inverse
then I get the b coordinates for x. So these are coordinates
with respect to b. I could do the same thing here
with the transformation of x. This is just the standard
representation of the transformation of x. So I could multiply it by c
inverse if we want to go in that direction. And then we're going to get
the transformation of x represented in b coordinates. Now, in the last video what we
saw was, hey, why do these separately? Maybe there is some matrix --
and we found out what it is -- maybe there's some matrix d that
if we multiply this guy times it, I can go straight from
the b coordinates of x to the b coordinates of the
transformation of x. And we said that is matrix d. And in that last video we
showed that d can be represented by a-- Actually you
could go around the circle and rederive it, if you like. But we found out that -- let me
write in another color -- that d is equal to c inverse
times a times c. Now, this is all a review of
everything that we learned in the last video. Hopefully, it clarified things
up a little bit. It's nice to just realize that
these are just alternate ways of doing the same thing. Both of these are the
transformation. When you multiply by a you're
applying the same transformation when
you multiply by d. You're just doing it in a
different coordinate system. Different coordinate systems
are just different ways of representing the same vector. This and this are different
labels for the same vector. This and this are different
labels for the same vector. So these are both performing
the transformation d. Now, this was a relation we
got in the last video. That if we have our change of
basis matrix, we have it's inverse, and we have just our
standard basis linear transformation matrix, we're
able to get this. Let's see if we can
go the other way. If we have d, can
we solved for a? Well, if you multiply both sides
of this equation on the right by c inverse, you get dc
inverse is equal to c inverse acc inverse. I just put a c inverse on the
right-hand side of both sides of this equation. This is going to be the
identity matrix, so we can ignore it. And then let's multiply both
sides on the left by c. So then you get cdc inverse
is equal to cc inverse a. And this is going to be
the identity matrix. And then you're left with a is
equal to c times d c inverse. Which is another interesting
result. It's another thing to
put in our tool kit. Now, everything I've been doing has been fairly abstract. Let's actually apply some of
these principles with a real concrete example. So let's say that I have a
transformation T -- I'll keep these guys around just because
they might be useful -- that is a mapping from R2 to R2. And let's say that the
transformation matrix for T, so let's say that T of x in
standard coordinates, is equal to the matrix 3, 2, minus 2,
minus 2, minus 2 times x. In the example we just said,
this would be our transformation matrix with
respect to the standard basis. And we could call that
a right there. Now let's say we have some
alternate basis. So alternate R2 basis. Let's call that b, because
we've been calling it b so far. And let's say this alternate
R2 basis is vectors 1, 2 and 2, 1. So let's see, given this
alternate basis, whether we can come up for a transformation
matrix in that coordinate world. So we're looking for some matrix
d such that, if I apply my transformation to x and b
coordinates, or in coordinates with respect to this alternate
basis, it should be equal to this matrix. It should be equal to d times
x in the v coordinates. So this is what I'm
looking for. I'm looking for that. Or, if we go back to our
diagram, I'm looking for that. You give me x and b coordinates
and you multiply it by d, and I'm going to give
you the transformation of x and b coordiniates. Now, just applying it to this
concrete example here. We have this formula
right here. This is the formula
for d, which we proved in the last video. So we have to figure
out c inverse. So what is the change of
basis matrix for b. I want to leave this up here. So change of basis matrix for b
is just going to be -- let's just call it c. And it's going to be the basis
vectors for b's within the columns so 1, 2 and 2, 1. And then we're going to want
to figure out it's inverse. So let's figure out it's
determinant first. So the determinate of c is equal to
1 times 1 minus 2 times 2. So 1 minus 4 is minus 3. And so c inverse is going to
be equal to 1 over the determinent. 1 over minus 3 or minus
1/3 times -- We switch these two guys. So we switched the 1 and the 1,
and then we make these two guys negative minus
2, minus 2. That is c inverse. So this d vector right here is
going to be equal to c inverse times a times the transformation
matrix with respect to the standard
basis times c. Let me write it down here. So the d that we're looking for
is going to be equal to c inverse times a times c. Which is equal to-- c inverse
is minus 1/3 times 1 minus 2 minus 2, 1 times a -- Let me do
this in a different color, I like to switch colors. So c inverse times a -- a is
right there -- times 3 minus 2, 2 minus 2 times c. c is right there. I'll do it in yellow. Times c, which is 1,
2 and then 2, 1. Let's do this piece by piece. Let's work through this. So what is this piece going
to be equal to? We have a 2 by 2
times a 2 by 2. That's going to give us
another 2 by 2 matrix. So this first term right here is
going to be 3 times 1 plus minus 2 times 2. So 3, 3 minus 4. So it's going to be
minus 1, right? 3 times 1 plus minus
2 times 2. Right, it's minus 1. Then you have 3 times 2, which
is 6, minus 2 times 1. So that is 4. 3 times 2 minus 2 is 4. And then when you go down
here, 2 times 1 minus 2 times 2. That's 2 minus 4. That's minus 2. And then 2 times 2 is
4 minus 2 times 1. So 4 minus 2 is just 2. So our matrix d is going to be
equal to minus 1/3 times this guy -- 1 minus 2 minus 2, 1 --
times this guy, which was just the product of those
two matrices. Now let's figure out
what this is. If I take the product of these
two guys it's going to be another 2 by 2 matrix. So 1 times minus 1. which is minus 1, plus minus
2 times minus 2-- So let me be sure. So minus 2 times minus 2
is 4, and then 1 times minus 1 is minus 1. So it's going to be 3. And then we go to
the next term. We have 1 times 4 plus
minus 2 times 2. So that's 4 minus
4, which is 0. And then we have minus 2 times
minus 1 which is 2 plus 1 times minus 2. So that is 0. And then finally, we have minus
2 times 4, which is minus 8, right? Plus 1 times 2. So minus 8 -- minus 2 times
4 is minus 8 -- plus 2 is minus 6. And all that times minus 1/3. So this is going to be equal
to-- 3 times minus 1/3 is minus 1 --0 and then 0. Minus 6 times minus 1/3 is 2. So d is now our transformation
matrix with respect to the basis b. So we were able to figure
it out just applying this formula here. Now, what happens -- Actually
I'll save that for the next video. Where we actually show
that it works. We can actually take some
vectors x, apply the transformation or apply the
change of coordinates, get to this, and then apply d. And then maybe we could go up
that way, multiply by c to get the transformation. It's going to be equivalent
to a. I'll do that in the
next video.