- Introduction to orthonormal bases
- Coordinates with respect to orthonormal bases
- Projections onto subspaces with orthonormal bases
- Finding projection onto subspace with orthonormal basis example
- Example using orthogonal change-of-basis matrix to find transformation matrix
- Orthogonal matrices preserve angles and lengths
- The Gram-Schmidt process
- Gram-Schmidt process example
- Gram-Schmidt example with 3 basis vectors
Looking at sets and bases that are orthonormal -- or where all the vectors have length 1 and are orthogonal to each other. Created by Sal Khan.
Let's say I've got me a set of vectors. So let me call my set B. And let's say I have the vectors v1, v2, all the way through vk. Now let's say this isn't just any set of vectors. There's some interesting things about these vectors. The first thing is that all of these guys have length of 1. So we could say the length of vector vi is equal to 1 for i is equal to-- well we could say between 1 and k or i is equal to 1, 2, all the way to k. All of these guys have length equal 1. Or another way to say it is that the square of their lengths are 1. The square of a vi whose length is equal to 1. Or vi dot vi is equal to 1 for i is any of these guys. Any i can be 1, 2, 3, all the way to k. So that's the first interesting thing about it. Let me write it in regular words. All the vectors in B have length 1. Or another way to say is that they've all been normalized. That's another way to say that is that they have all been normalized. Or they're all unit vectors. Normalized vectors are vectors that you've made their lengths 1. You're turned them into unit vectors. They have all been normalized. So that's the first interesting thing about my set, B. And then the next interesting thing about my set B is that all of the vectors are orthogonal to each other. So if you dot it with itself, if you dot a vector with itself, you get length 1. But if you take a vector and dot it with any other vector-- if you take vi and you were to dot it with vj. So if you took v2 and dotted it with v1, it's going to be equal to 0 for i does not equal j. All of these guys are orthogonal. Let me write that down. All of the vectors are orthogonal to each other. And of course they're not orthogonal to themselves because they all have length 1. So if you take the dot product with itself, you get 1. If you take a dot product with some other guy in your set you're going to get 0. Maybe I can write it this way. vi dot vj for all the members of the set is going to be equal to 0 for i does not equal j. And then if these guys are the same vector-- I'm dotting with myself-- I'm going to have length 1. So it would equal length 1 for i is equal to j. So I've got a special set. All of these guys have length 1 and they're all orthogonal with each other. They're normalized and they're all orthogonal. And we have a special word for this. This is called an orthonormal set. So B is an orthonormal set. Normal for normalized. Everything is orthogonal. They're all orthogonal relative to each other. And everything has been normalized. Everything has length 1. Now, the first interesting thing about an orthonormal set is that it's also going to be a linearly independent set. So if B is orthonormal, B is also going to be linearly independent. And how can I show that to you? Well let's assume that it isn't linearly independent. Let me take vi, let me take vj that are members of my set. And let's assume that i does not equal j. Now, we already know that it's an orthonormal set. So vi dot vj is going to be equal to 0. They are orthogonal. These are two vectors in my set. Now, let's assume that they are linearly dependent. I want to prove that they are linearly independent and the way I'm going to prove that is by assuming they are linearly dependent and then arriving at a contradiction. So let's assume that vi and vj are linearly dependent. Well then that means that I can represent one of these guys as a scalar multiple the other. And I can pick either way. So let's just say, for the sake of argument, that I can represent vi-- let's say that vi is equal to sum scalar c times vj. That's what linear dependency means. That one of them can be represented as a scalar multiple of the other. Well if this is true, then I can just substitute this back in for vi. And what do I get? I get c times vj-- which is just another way of writing vi because I assumed linear dependence. That dot vj has got to be equal to 0. This guy was vi. This is vj. They are orthogonal to each other. But this right here is just equal to c times vj dot vj which is just equal to c times the length of vj squared. And that has to equal 0. They are orthogonal so that has to equal 0. Which implies that the length of vj has to be equal to 0. If we assume that this is some non-zero multiple, and this has to be some non-zero multiple-- I should have written it there-- c does not equal 0. Why does this have to be a non-zero multiple? Because these were both non-zero vectors. This is a non-zero vector. So this guy can't be 0. This guy has length 1. So if this is a non-zero vector, there's no way that I can just put a 0 here. Because if I put a 0 then I would get a 0 vector. So c can't be 0. So if c isn't 0, then this guy right here has to be 0. And so we get that the length of vj is 0. Which we know is false. The length of vj is 1. This is an orthonormal set. The length of all of the members of B are 1. So we reach a contradiction. This is our contradiction. Vj is not the 0 vector. It has length 1. Contradiction. So if you have a bunch of vectors that are orthogonal and they're non-zero, they have to be linearly independent. Which is pretty interesting. So if I have this set, this orthonormal set right here, it's also a set of linearly independent vectors, so it can be a basis for a subspace. So let's say that B is the basis for some subspace, v. Or we could say that v is equal to the span of v1, v2, all the way to vk. Then we called B-- if it was just a set, we'd call it a orthonormal set, but it can be an orthonormal basis when it's spans some subspace. So we can write, we can say that B is an orthonormal basis for v. Now everything I've done is very abstract, but let me do some quick examples for you. Just so you understand what an orthonormal basis looks like with real numbers. So let's say I have two vectors. Let's say I have the vector, v1, that is-- say we're dealing in R3 so it's 1/3, 2/3, 2/3 and 2/3. And let's say I have another vector, v2, that is equal to 2/3, 1/3, and minus 2/3. And let's say that B is the set of v1 and v2. So the first question is, is what are the lengths of these guys? So let's take the length. The length of v1 squared is just v1 dot v1. Which is just 1/3 squared, which is just 1 over 0. Plus 2/3 squared, which is 4/9. Plus 2/3 squared, which is 4/9. Which is equal to 1. So if the length squared is 1, then that tells us that the length of our first vector is equal to 1. If the square of the length is 1, you take the square root, so the length is 1. What about vector 2? Well the length of vector 2 squared is equal to v2 dot v2. Which is equal to-- let's see, two 2/3 squared is 4/9-- plus 1/3 squared is 1/9. Plus 2/3 squared is 4/9. So that is 9/9, which is equal to 1. Which tells us that the length of v2, the length of vector v2 is equal to 1. So we know that these guys are definitely normalized. We can call this a normalized set. But is it an orthonormal set? Are these guys orthogonal to each other? And to test that out we just take their dot product. So v1 dot v2 is equal to 1/3 times 2/3, which is 2/9. Plus 2/3 times 1/3, which is 2/9. Plus 2/3 times the minus 2/3. That's minus 4/9. 2 plus 2 minus 4 is 0. So it equals 0. So these guys are indeed orthogonal. So B is an orthonormal set. And if I have some subspace, let's say that B is equal to the span of v1 and v2, then we can say that the basis for v, or we could say that B is an orthonormal basis. for V.