 Suppose u is an in-by-in complex matrix, we're going to prove in this video that the following three conditions are equivalent to each other. So first that u is a unitary matrix, that means that the inverse of u is equal to u star. Condition two, that for any vector x and y, u x dot u y is equal to x dot y. Just as a reminder for this video, when we talk about this dot product, we really mean the Hermitian product. X dot y is going to be x conjugate transpose y, that's what the star means here, the conjugate transpose. Now some people like to use x dot y as x transpose y bar. That does make for a little bit of a difference, but logically the two things are the same thing, so it doesn't matter which one in a proof you use. And so for convenience, I'm going to set x dot y to be x star y. And then lastly, the third condition is that the length of the vector u x is equal to length of x for any vector x right here. Which is a reminder, the length of the vector, this means the square root of x dot x, like so. Now of course if you square both sides, this is just going to be x dot x. And so assuming that the length of u x equals the length of x is the same thing as assuming the length of u x squared is equal to the length of x squared. So we're going to also use that second condition more often here. To prove that these things are equivalent, we'll assume one and apply two. We then assume two and it applies three. And then we'll assume three and show that it implies one just like that. So let's first assume the first one. So assume one. So our matrix is unitary. It's inverse is its conjugate transpose. So then consider the calculation u x dot u y. This is equal to u x star times u y for which by properties of the conjugate transpose, this is x star u star u y for which we're associative. And when you look at the matrix in the middle, this is u star u for which by assumption u star is just u inverse. So the product of u star u is the identity. This just gives back x star y, which is the same thing as x dot y. So this then proved that one implies two. Okay. So then the next one, let's assume the second statement. So we'll assume that u x dot u y equals x dot y for any vectors x and y. And then we need to prove this right here. So we start off with u x squared. This is the same thing as u x dot u x, which this equals by property to this is the same thing as just x dot x. Basically, this statement has two vectors, but I only need one of them. And x dot x is the same thing as the length of the vector x squared. So if the length of u x squared equals the length of x squared, then the length of u x equals the length of x as x was arbitrary. We've now proven to. So we got that one. Those are the two easy directions. The third direction is actually the longest one to do. And as I contemplated how to best do this, I opted to take an approach using spectral theory that is we're going to use eigenvalues here. Because what we're going to do is we're going to assume three. Great. And I want us to consider the matrix u star u, right? Which at the moment, the only thing we know about u because we're assuming only three is that the length of u x is the same as the length of x for any vector x. That's what we know. So we don't know that u is unitary. We're trying to prove that. But what we do know is that u star u, irrelevant of what u is, u star u is Hermitian. It's a Hermitian matrix. A Hermitian matrix is the complex equivalent of a symmetric matrix. A Hermitian matrix means that if you take the matrix and you take its conjugate transpose, you get back the original matrix as well. Why does that matter? Well, for Hermitian matrices, that means there exists an eigenbasis. An eigenbasis, some vectors x1, x2, all the way down to xn. So these are eigenvectors for the matrix u star u. So we could say something like the following. Say that u star u xi is equal to lambda xi. We have a basis of cn using eigenvectors for u star u. Now, this is a property for Hermitian matrices. And while there is a relationship between Hermitian matrices and unitary matrices, this statement about being diagonalizable, the Hermitian matrix, then that doesn't require unitary matrices. At least it doesn't require the theorem that we're talking about right now. So there's no circular reasoning going on there. So because u star u is Hermitian, its diagonalizable has a basis of eigenvectors. Now let's see what happens when we consider those eigenvectors. So by assumption, we know that the length of u xi squared is equal to the length of xi squared, for which then the right hand side becomes xi dot xi. That's important. On the left hand side, we end up with xi star u star u xi. But then when we look at this statement here, u star u xi, that is where we can pull out the eigenvalue. Lambda, lambda i, I should say, is equal to xi star dot xi. And this equals xi dot xi. So notice what happens here. We have this factorization that something times xi, I guess I don't need the star in this situation. It's kind of redundant. So I put the dot product in the star. So we have xi dot xi. And then we have xi dot xi on both sides of the equation here. Well, how's this going to happen? Either xi dot xi equals zero or lambda equals one. So lambda is one or we have that xi dot xi equals zero. That second case only happens if xi is the zero vector. But as this is an element of an eigenbasis, that's not possible. So we get this. And so that means lambda i is always one for all, for all i, like so. So now we're basically in the situation where we can conclude things, right? We have a matrix which has only one eigenvalue. We only have one eigenvalue. So if you think of like the Jordan canonical form, we see there's a bunch of ones across the diagonal zeros here. What's above? Well, since this is a Hermitian matrix, this is going to have to actually be a diagonal matrix. You're going to have to have zeros up here as well. If you don't like that, you can get it from where we are. That doesn't, you don't have to use the Jordan canonical form here. But the fact is that we looked at any vector, right? Any vector x looks like some combination of the ci xi's like so. If I times this by u star u, you put this in here as well, u star u. Since the eigenvalues are all one, we're going to get that this is equal to just c1 x1. Take the sum of those and that just gives you back x. So in particular, u star u times x is always equal to x. This means that u star u is the identity matrix, which then proves that u star is its inverse. So the last case definitely was a lot more complicated than the previous ones, but it's the hardest direction to go.