00:02
Okay, this question asks us about the matrix a from last time, but this time it wants us to normalize it.
00:10
So here i am in python again, and we have our matrix a, and in order to normalize it, i just took each column and divided it by its magnitude.
00:25
And just to see, we can print this matrix u, and as we can see, it's our original matrix, except this time.
00:37
Everything is scaled so that we have normal columns.
00:44
So now what it wants us to do is to compute u transpose u and u -u -transpose.
00:53
So first we're going to print the matrix multiplication of u -transpose and u -transpose.
01:07
And remember, this should give us the identity.
01:11
So let's check.
01:13
And we have some rounding going on with the computer.
01:16
Code, but we can see we have 1, 1, 1, 1 on the diagonal, and then 0 everywhere else, because these are just rounding errors by the computer.
01:30
So we know that u transpose u gives us the identity matrix, which makes sense because we have orthonormal columns now.
01:39
But then it wants us to see what u times u transpose gives us.
01:47
And this actually gives us something completely different.
01:56
And the most obvious difference is in the matrix size.
02:00
So first, we had a 4 by 8 multiplied by an 8 by 4, which gave us a 4 by 4.
02:11
But now we have an 8 by 4 times a 4 by 8, giving us an 8 by 8.
02:20
Next, it tells us to generate a random vector in r8.
02:33
And i didn't think of this ahead of time.
02:39
So we're just going to generate a vector.
02:41
Let's say 1, 4, negative 8, negative 5, 10, 2, 3, 3, 3, 1.
02:56
Let's count 1, 2, 3, 4, 6, 7, 8.
03:00
Up, and we have an extra...