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

# Coordinates with respect to a basis

Understanding alternate coordinate systems. Created by Sal Khan.

## Want to join the conversation?

- at11:40when you move in the v2 direction aren't you also moving in the v1 direction?(12 votes)
- Technically, yes. You're partially moving in the same direction of both vectors.That's why the graph paper is skewed. If the vectors were orthogonal you would move according to the standard basis / normal, unskewed graph paper.(14 votes)

- If i know the global coordinates of a point , How can I find it in my local coordinates. Say the global coordinates of my point is x1,y1,z1 . And my new coordinate system has three basis vectors, e1( e1x,e1y,e1z),e2( e2x,e2y,e2z),e3( e3x,e3y,e3z). How will find the coordintes in my new coordinate system.(8 votes)
- Refer to the following video, "Change of Basis Matrix."(7 votes)

- When we change from a basis to another, does the origin (the intersection of our reference "axes") remain in the same point? In other words, does the origin always have coordinates equal to the zero vector, no matter what basis we consider?(6 votes)
- Yes, because c's for it are always 0, 0, ... 0, no matter what the basis is.(7 votes)

- I was just wondering if back in fourth grade when I was learning how to graph coordinates, why they didn't just tech me this even though it is harder it would have been easier just to have learnt everything all about graphs from the very start, so that later in life I would already know how to do it. And the coordinate plans are easy to understand but. I was just wondering how to exactly make the coordinate plane easier to draw and write in the numbers? Any ideas?(4 votes)
- Imho they cannot teach you everything so there must be a point where they stop. And that point just happens to be an R^2 plane and everything about R^2. Take into consideration fact that Sal shows this in R^2 for easier understanding, but it's more of a R^n connected thing. So it's more of linear algebra than basic algebra and you cannot teach fourth graders whole linear algebra :) All in all, it is not connected with rest of school algebra that much so it isn't necessary there.

For the second part of the question I don't understand it though :) What do you mean by "plane easier to draw".(4 votes)

- where did the essence of linear algebra go(3 votes)
- The essence of linear algebra is spectacular series of videos created by YouTube user 3blue1brown and you can watch them here:

https://youtu.be/kjBOesZCoqc?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab(4 votes)

- Are a vector's coordinates with respect to a basis always unique? If yes, why?(3 votes)
- They are unique to that particular basis. The reason is because two vectors are equal by definition if and only if their coordinates are equal (and this is true regardless of basis), so if a vector had two coordinate representations in the same basis, those two have to be the same, otherwise we would contradict what it means for a vector to equal itself.(3 votes)

- I'm just curious if we could do examples of finding the coordinate vectors, transition matrices, from Polynomial spaces or even Matrice spaces (i.e. P2(t) and M2x2). I understand the logic I think, but the only examples I can find are always using vectors, but my hw uses Polynomial spaces and matrix spaces. So I'm finding it hard to transition this logic from one to the other.. Thank you :)(3 votes)
- Try and think of it as a together type thing and that matrices spaces and polynomial spaces are related in their expressions in logic. Their formulas are different but the logic in polynomial spaces tells us that the examples show us that it is easier to understand when you do the matrices spaces also, learning at the same time. I found it easier, hope this helps!(2 votes)

- At0:43why did he say that the basis B had K vectors? wouldn't it have n vectors because the vector space V is n dimensional? isn't the number of terms of a basis equal to the dimension of the space it's a basis for?

EDIT: Oh! Just because the vector space V is in R^n, doesn't mean the vector space necessarily encompasses everything in R^n! V could be a giant plane in a 3 dimensional space or a 6-dimensional space-volume-thing in an 8-dimensional space! It could be a line in an x y coordinate system! That's what subspace means!(2 votes) - I am facing difficulty understanding the vecotr component in the 2 different co ordinate systems. Kindly help me.

Suppose I have a vector A on the 2d co ordinate system x and y and therefore vector A = Axi + Ayj where i and j are unit vectors along x and y axis.

Suppose a new co ordinate system is introduced in which is x'y' and is titlted from the xy plane by angle theta and both the co ordinate systems (xy and x'y') share the same origin.

The component of the vector seem to change on x'y' plane.

A = i'Ax' + j'Ay' (i' and j' are the unit vectors along the x' and y')

and now i' = i cos (theta) + j sin (theta)

j' = - i sin (theta) + j cos (theta)

Kindly help me understand the concept.(1 vote)- The actual positions of the vectors haven't changed, only the way they are represented. In the first co-ordinate system they are the same, in the second they have different values, because the coordinate system doesn't overlay the first. It's quite useful in physics, when certain coordinate systems yield much simpler math to solve a problem. Even if the answer needs to be in the first coordinate system, once solved it can easily be translated back.(2 votes)

- At3:53, by my understanding, v1 and v2 are defined, without any specification, wrt the std basis. Then, is it correst to say, to some extent, that the std basis is 'superior' to all other bases? That the std basis is the foundation where we 'construct' all other bases? E.g. at7:54, vector a has coordinate (3,2) wrt basis B, but does this mean (3,2) is the vector or (8,7) is the vector?(1 vote)
- I wouldn't say that the standard basis is 'superior' necessarily. I would say sometimes it has some very nice properties, but also that at other times a different basis can be more convenient. As for which of (3,2) and (8,7) is "the" vector, I would say they are both vectors representing the same object.

You could ask which language is 'superior' to all other languages on earth, and I would probably have a similar answer to that question. Or if you like a more math related analogy, you could ask which of 13 1/3 and 40/3 is "the" number when working out the sum, 13 + 1/3. In the former we've given a clearly correct answer while in the latter a little work is necessary to see it as equivalent. Which is better would depend on the needs or circumstances of one working to find a solution. Hope that helps!(2 votes)

## Video transcript

Let's say I've got some
subspace of Rn. Let's say V is a
subspace of Rn. And let's say the set B-- I'll
do it in blue-- let's say the set B is a basis for V,
so it's got a bunch of vectors in it. And let's say it's got v1,
v2, all the way to vk. So you can see we have
k vectors, so v is a k-dimensional subspace. So that means that if I have
some vector a-- let's say I have some vector a that is a
member of my subspace-- that means that I can represent a
as a linear combination of these characters right there. So I could write a as being
equal to some constant times my first basis vector, plus some
other constant, times my second basis vector. And then I can keep going all
the way to a kth constant times my k basis vector. Now, I've used the term
coordinates fairly loosely in the past. And now we're going
to have a more precise definition. I am going to call these
constants here c1, c2, all the way through ck. I'm going to call them the--
I'll do it in a new color-- the coordinates of a, with
respect to our basis B, with respect to B. And we could also write
it like this. We could also write I have
my vector a, so I have my vector a. But if I wanted to write my
vector a in coordinates with respect to this basis set B,
I would write it like this. Put brackets around it, and put
the basis set right there. And this says I'm going to write
this in coordinates with respect to this basis set. So, I will then write
it like this. I'm just going to put these
weights there, these constant terms, on the on the linear
combination that I have to get of my basis vectors to get a. So there's c1, c2, all
the way to ck. Now there's one slightly
interesting thing, or maybe very interesting thing,
to point out here. V is as basis of Rn, so
anything in V is also going to be in Rn. But V has k vectors. It has dimension k. And that k could be as high
as n, but it might be something smaller. Maybe we have two vectors in R3,
in which case v would be a plane in R3, but we can abstract
that to further dimensions. But when you specify something
that is in our subspace, with respect to its basis, notice
you only have to have that many-- the dimension of your
subspaces-- you only have to have that many coordinates. So even though a is a member of
Rn, I only have to give it k coordinates. Because, essentially, you're
giving it positions within, let's say, if this was a plane,
within the plane that is your subspace. Let me make this a little
bit more concrete. Let me do some examples. So let's say we have
some subspace. Let me clear this out. Let's say I have a couple
of vectors. Let's say v1 is the
vector 2, 1. And let's say v2 is
the vector 1, 2. Now you might immediately see
that the basis, or the set, of v1 and v2, this is a basis for
R2, which means that any vector in R2 can be represented
as a linear combination of these guys. I could do a visual argument. Or we also know that, look, R2
is two-dimensional, and we have two basic vectors right
here, and they are linearly independent. You can verify that. In fact, the easiest way to
verify that, is if you just take 2, 1 and 1, 2, and you put
it in reduced row echelon form, you're going to get the
2 by 2 identity matrix. You're going to get 1, 0, 0, 1,
and that lets you know that this guy and this guy are
both basis vectors. So, that's all review. We've seen that before. But let's visualize these. Let's visualize these guys. So if I were to just graph it
in the way we normally graph these vectors, what does
2, 1 look like? let me draw some axes here. Let me draw it. We'll do it in a different
color. Let's say that is my vertical
axis, and this is my horizontal axis. And 2, 1 might look like this. We're going to go out
1, 2, and then we're going to go up 1. So that is our vector
1, right there. That is 2, 1, that's
our vector 1. And then 1, 2 might look like,
or it does look like this, if I draw it in a standard
position. 1, then you go up 2. 1, 2 looks like this. So when we talk about
coordinates with respect to this basis, let me pick
some member of R2. I'll engineer it so that I
can easily find a linear combination. Let me take 3 times v1,
plus 2 times v2. What is that going
to be equal to? That's going to be equal
to the vector. So 3 times 2, which is
6, plus 2 times 1. So it's the vector 8, and then
I have the vector 3 times v1, plus 2 times that. So 8, 7, right? 3 plus 2 times 2 is for 8, 7. So if we were to just graph 8,
7 in the traditional way, we would go 1, 2, 3, 4, 5, 6, 7, 8,
and then we would go up 1, 2, 3, 4, 5, 6, 7. And we would have a vector, I'm
not going to draw it out here, but it would specify
that point right there. That would be this point. If you view these as
coordinates, we would view that as point 8,
7 right there. Maybe I'll write it like that. That's the point 8, 7. If I wanted to draw the spectrum
in standard position, I would draw a vector that
ends right there. Now, we have this is basis
here, this basis B, represented by these
two vectors. This is B1 and B2. And what we want to do is
represent this guy. Let's say that this is vector--
let me call that vector a-- so vector
a is equal to 8, 7. Now, we know that if we wanted
to represent vector a as a linear combination of my basis
vectors, it's going to be 3 times you v1, plus 2 times v2. So just given what we just saw
in the earlier part of this video, we can write that the
vector a, with respect to the basis B-- maybe I'll do it in
the same color as the basis-- with respect to the basis B, is
equal to these weights on the basis vectors, is
equal to 3 and 2. And let's see if we can visually
understand why this makes sense. We're saying that in some new
coordinate system, where this vector can be represented as 3,
2-- and the way you think about the new coordinate
system is, in this old coordinate system we hashed
out 1's in the horizontal axis, and that was our
first coordinate. And we hashed out 1's in
the vertical direction. That was our second
coordinate. Now in our new system, what's
our first coordinate? Our first coordinate is going
to be multiples of v1. This is v1 or this is v1,
so it's multiples of v1. So that's 1 times v1. Then if we do 2 times v1, we're
going to get, over here, 2 times v1 would get
us to, what? 2 would get us to 4, 2. 3 times v1 would
get us to 6, 3. So let's see, 1, 2,
3, 4, 5, 6, 7, 8. So it's 6 and then 3,
just like that. And then 4 times v1 would
get us to 8 and 4. So you can imagine that what I'm
drawing here, this is kind of the axes, the first-term
axis generated by v1. So I could draw it-- let me do
it in this blue color-- so you can imagine it like this. This would be a straight
line, just like that. And then the coordinate tells me
how many v1's do I have. So I would hash off the coordinate
system like this. Instead of doing increments
of 1, I'm going to do increments of v1. I'll write it just like that. As you go 9, 10, we're going
to go up one more to 5, something like that. Now, the second coordinate tells
you increments of v2. So this is our first increment
of v2, then our second increment if we go to 4,
is going to be 4, 2. Just like that. That's going to be 6 and 3. It's going to be
just like that. It's going to be 6 and 3. So it's going to look
something like this. So if you want to think of it
is a bit of a, well, you should be thinking of it
as a coordinate system. You can have this new skewed
graph paper, where any point you can now specify it as going
in the v1 direction by some amount, and then
by going in the v2 direction by some amount. Let me draw that as
this graph paper. So I could draw another version
of v2, just like that, just all the multiples of v2. I could shift them like that. I could do another
one like this. I could do another. That one is a little bit
not neat enough. I could do it like that. I could do-- I think you're
getting the idea. Let me make that a little
bit neater. This might have been useful
to do with another tool. And then I could do all the
multiples of v1 like this. I'm doing a graph paper
right here. So it looks something
like this. It would look something
like this. It would look something
like this. And so you can imagine the
skewed graph paper, if I did it all over the place
with this kind of green and this blue. So in our new coordinate system,
we're seeing 3, 2. So that means 3 times our first
direction, which happens to be the v1 direction. It's no longer the horizontal
direction. It's the v1 direction. We're going 1, 2, and then
we go 3, like that. And then we're going to go
2 in the v2 direction. So we're going to go 1,
2 in the v2 direction. And so our point is going
to be right there. You could imagine
going like this. You go 3 in the v1 direction,
and then you go 1, 2 in the v2 direction and you get
to our point. Or you could go, kind of in
your v2 direction and then your v1 direction, but either
way you're going to get to your original point. So that vector, or the position
specified by the vector, 8, 7, could just as
easily be specified in our new coordinate system by the
coordinates 3, 2. Because we're saying 3 times v1,
and then, plus 3 times v1. It takes us in this direction. We're going 3 notches in the v1
direction, and then we're going 2 notches in
the v2 direction. And so that's why these are
called coordinates. You're literally saying how
many spaces in the v1 direction to go, and then how
many spaces in the v2 direction to go. But this might, I guess, lead
you to the obvious question. Why haven't we been using
the coordinates before? Like I might have been
saying all along. I've been saying all along. Let's say I have some vector
lowercase b, that is equal to, I don't know, let's say it's
equal to-- I'll do it in an R2, just because it's easy to
visualize-- let's say it's equal to 3 minus 1. If we were to graph
it it would look something like this. We would go, 1, 2, 3, and
then we would go down 1. So it would look something
like this. It would specify this point. But why have we been calling 3
and negative 1 coordinates? Why have we been calling 3
and minus 1 coordinates? We've been doing it
well before we learned linear algebra. We called these coordinates all
the way from when we first learned how to graph. Why are we calling those
coordinates? Or how does this meeting of
coordinates relate to these coordinates with respect
to a basis? Well, these are coordinates
with respect to a basis. These are actually coordinates
with respect to the standard basis. If you imagine, let's see,
the standard basis in R2 looks like this. We could have e1, which
is 1, 0, and we have e2, which is 0, 1. This is just the convention for
the standard basis in R2. And so we could say s is equal
to the set of e1 and e2. Then we say that s is the
standard basis for R2. And it's a standard basis
because these two guys are orthogonal. This is 1 in the horizontal
direction. This is 1 in the vertical
direction. And any vector in R2-- let's say
I have some vector x, y in R2-- it's going to be equal to
x times e1, plus y times e2. So we can say that if you want
to write some vector x, y, if you wanted to write with respect
to this standard basis right here, it's going to be
equal to the coordinates by the definition that we did
earlier in this video of the basis vectors right there. Or these weights on our e1's and
e2's, so it's going to be equal to, well the weight
there is x and the weight here is y. So these coordinates that we've
been talking about from the get-go, these are definitely
coordinates. They're consistent with our
definition of coordinates in this video. But we can maybe be a little
bit more precise. We can now call them the
coordinates with respect to the standard basis. Or we could call them, we could
call these right here the standard coordinates. I just wanted to
point this out. This might be almost trivially
simple, or a bit obvious. But I just wanted to show that
our old usage of the word coordinates was not inconsistent
with this new definition of coordinates as
being the weights on some basis vectors. Because even in our old
coordinates, or the old way we used them, these really
were weights on our standard basis vectors.