# Change of basis explained simply | Linear algebra makes sense

Linear Algebra courses often include a part about changing the basis of a vector or a
matrix, and in my experience, this part of the course can be a bit confusing- especially
this mysterious change of basis formula they give you. What you’ll see in this video
is, if you really understand what changing a basis actually is, how to do it will become
obvious to you, and you won’t really need the formula after all.
So here’s what change of basis is. Imagine Alice is trying to describe a vector to Bob.
The way to describe any vector is to pick a basis, then the vector can be described
as a linear combination of those basis vectors. She can write this compactly by writing it
as a column like this... and she can tell Bob that column is. But there’s a problem.
Bob isn’t using the same basis vectors as her. He’s using this basis instead. And
so to him, this column vector means this sum, which is this vector- which is completely
different from the one Alice has in mind. Alice realises that, for Bob to understand
what vector she meant, she needs to describe her vector in his basis for him. That’s
what change of basis is. Taking a vector written in one basis and writing it in another basis.
Let’s see how we can do this in a simple example first. Pretend that Bob’s basis
is this one, and Alice’s basis is exactly the same, but rotated by 45 degrees. Say the
vector that Alice wants to communicate to Bob is her second basis vector, this one here.
She knows exactly what Bob’s basis vectors are, and now she wants to write her vector
in his basis. As in, she wants to write that a2 equals something times b1 plus something
times b2. What should these numbers be? Here are 4 different options, choose which it is,
and put the answer in the poll in the corner. Don't worry, you don’t need to do any calculation
to figure it out, you should be able to work it out from where the minus signs are. Pause
the video now to think about it.
The answer is 2), b1 -b2 divided by square root 2. This is because if you turn b2 around
to get -b2, then add these two vectors, you do get something in the same direction as
a2, but it needs to be shorted. If you weren’t sure how to approach that question, may I
suggest my video on vectors as a refresher? The link is in the description and in the
corner. Now say that Alice wanted to write her first
vector in Bob’s basis. Which one of these options would that be? Hopefully you can see
it’s 1.
Ok, so Alice now knows how to write these two basis vectors in Bob’s language. But
what if she wants to send some other vector? Well now she basically can! Why? Imagine she
writes her vector as this column of numbers. That means the vector is this linear combo
of her basis vectors. She needs to translate this whole thing to Bob’s basis. But she
already knows how to translate her own basis vectors. After doing that, she’s done right?
Because the resulting column in Bob’s basis now.
What we’ve learnt from this example is, no matter what kind of vector Alice has and
what basis she’s written it in, as long as Alice somehow figures out how to write
each one of her basis vectors in Bob’s basis, that’s enough to translate her vector to
his basis.
We could leave this here and be happy, but there’s a really convenient way for Alice
to do all this translating. We could represent it as a matrix. As in, Alice just puts in
her vector in her basis and the matrix spits out what it should be in Bob’s. We’re
going to call this the change of basis matrix.
Going back to our example, Alice knows that her first basis vector is written like this
in Bob’s basis. From this fact alone, and not from any calculations, work out what the
first column of the change of basis matrix should be. Pause the video and give yourself
a minute to think about it.
If you weren’t sure how to do this, I explain it in my video about matrices so go have a
look at that in the description, and in my playlist linked in the corner. But remember,
the columns of a matrix just tell you what happens to the basis vectors. The first column
is what happens to the first basis vector, here it becomes this. Similarly, the second
basis vector becomes this, so that’s your second column.
This is exactly the matrix we want, because if Alice puts in the column c d, it comes
out as this column, just as we calculated earlier. But there’s one really strange
other vector. That’s not what’s happening here. The matrix takes a vector, and gives
you back the exact same vector, it just changes how you describe it. That’s something to
keep in mind. But despite this, the change of basis matrix is very useful.
For example, you can compute it’s inverse, which has an important property. The inverse
takes a vector that’s in Bob’s basis, and translates it back to Alice’s basis.
That’s just because that what inverses do, they undo the original matrix. So once Alice
has figured out what the change of basis matrix Q is, if she wants to translate a vector Bob
tells her, to something she understands, she just applies Q inverse to it.
There’s another reason that these two matrices are super useful. If Alice now wants to describe
a whole linear transformation to Bob, not just a vector, she can use Q and Q inverse
to do it. Let’s see how this works for the case when the linear transformation is from
n dimensions to n dimensions.
The easiest way to describe a linear transformation is to write it as a matrix, but the problem
is, the way your matrix looks depends on which basis you’ve used. This is what her’s
looks like in her basis. Now, she needs to translate it to Bob’s basis, which means
it will look very different from her own.
Here’s how. She wants this matrix to take a vector written in Bob’s basis and then
do the linear transformation, but her current matrix only takes vectors written in her basis.
So why don’t we just translate Bob’s vector by applying the Q inverse? This writes Bob’s
vector in her basis, and in this new form, you can apply her matrix to it.
OK great. Are we done? Pause the video to think about whether this matrix, M_A Qinverse
is the linear transform we want in Bob’s basis. Then choose one of these options in
the poll. 1 yes
2 no, but I don't know what to do next 3 She should apply M inverse again
4 She should apply M. Pause the video now and try work it out.
The answer is, she’s not quite done, because the column vector you end up with is in Alice's
basis now. But that’s no good because Bob is expecting that his new matrix takes a vector
written his way to another vector also written in his basis, unlike this which is in Alice’s
basis. We have the right vector, it's just written the wrong way, so we should apply
Q to it to get it to Bob’s basis. And now it’s perfect! Overall, what happened is,
it got translated into Alice’s basis, then you apply Alice’s matrix, then you translate
back to Bob’s basis. In other words, Bob’s matrix is Q M_A Qinverse.
It’s a really simple concept when you understand it, but it’s super important, for example
when you have some x, y, coordinates, and someone else is using different coordinates
to you. You’ll also see it crop up lots in my quantum mechanics videos, and I’ll
explain the link more once I’ve covered Dirac notation.
But before you go, I’d really recommend you try these 2 simple multiple choice questions
to test whether you really understood this video and to help it stick.
Question 1: Suppose that Bob’s basis is this, and Alice’s basis is exactly the same,
except she switches which one she calls her first basis vector and which she calls her
second. What is the change of basis matrix? Pick from these options and put your answer
in the poll.
Question 2: I did the simple case were Alice’s matrix is square. What happens in the general
case when her matrix is from vector space 1 to vector space 2? She has this basis for
the first vector space and this one for her second. Bob has these baseis, and say that
Q and W are the change of basis vectors between these spaces. What is the formula for Bob’s
version of this matrix? Here are your options, and again put it in the poll. As always, there
are hints in the description.
You're final homework, which I'd really appreciate if you did, is if you could tell me what you
think of these series so far and how you think I can improve because I'd really like to get
better at this.
Anyway, the next video will be about inner products aka scalar products or dot products.
Well almost. After that we can start slowly linking all this linear algebra back up to
quantum mechanics by talking about fun stuff like dirac notation, and unitary time evolution.
I’ll try have the next one up in 2 weeks, so subscribe if you’d like to see it. Thanks
a lot for watching.