 The third type of geometric transformation I want to talk about on the plane is the idea of a reflection. We've talked about shears and we've talked about scaling previously. So what does a reflection do? Well, the general idea is if you have some point, let's say the vector v right here, a reflection is determined by an axis of reflection. So you have some line going through the plane. Reflection means that if you take the distance from v to that line here, you're going to go that same distance in the other direction. To be more precise, this is going to be a right angle right here, and orthogonality is something we'll talk about a little bit later in this lecture series, but we can intuitively understand what this means in R2. So we're going to reflect this point on the other side of the line, the exact same distance. So the distance from the point to the line is the same on either side of the line when we do reflections. Now, we're going to keep things simple and we're going to worry about reflections across the x-axis and the y-axis first. So consider the following matrices, 1, 0, 0, negative 1, and negative 1, 0, 0, 1. So these are diagonal matrices. And in fact, since all of the entries along the diagonal are 1, except for maybe one of the numbers here, which is a negative 1, these are actually elementary matrices of scaling type. So previously we talked about this with respect to dilations and contractions, but in that situation, we required the numbers on the diagonal that weren't 1 to be positive. We're now allowing for negatives here. So what happens is when you have a negative, it causes a reflection of some kind. So take this matrix right here, negative 1, 0, 0, negative 1. If I multiply this by the matrix by the vector x, what you're going to see is this matrix over here, since it's diagonal, it times the first entry by negative 1 and the second one by just 1. So what happens is you change the x-coordinate, but the y-coordinate's left alone. So what is that doing geometrically? It's like saying we have this point over here, x comma y, but then you replace the x-coordinate with negative x, and so it's going to be moving this point over here. So this would be a reflection across the y-axis. We'd be reflecting across the y-axis right here. In contrast, if we multiplied this matrix by x, y, we would end up with the vector x negative y, which has the effect of doing something like the following. We have the point x, y. You then change its y-coordinate down here to be x comma negative y. That would be reflection across the x-axis. And so this first matrix, this is going to be reflection across the x-axis. And then the second matrix has the effect of reflecting across the y-axis. Okay? There's a third type of reflection I want to bring up is, what if we use the interchange matrix 0, 1, 1, 0? This is the only possible permutation matrix you can get for 2 by 2 matrices. What does this have? What does this do to a matrix, to a vector? If we multiply this by the vector x, y, notice you're going to get a y, x, like so. It swapped the order of x, y. And so geometrically what this is doing, and this is actually causing a reflection, in fact, but the reflection is going to be across the diagonal line, y equals x. And so if we take a point, like say this one right here, x comma y, reflection across this line, y equals x, actually switches the x and y coordinates around. And so multiplying by this interchange matrix is reflection across the line, y equals x. So it's also reflection that we're going to incorporate here. Now the general reflection, so if you take some diagonal line, you know, where the angle could be anything with respect to the x-axis, that one's a little bit more difficult to take care of. And actually there's, I have a homework question in the textbook that deals with this very thing in steps. I would encourage you to take a look at that as well. Now if you were to compose reflection with the x-axis and reflection across the y-axis together, this actually gives you reflection across the origin. That's just doing both reflections together. So if you want to reflect across the origin, you would multiply these two things, which notice here that the net product is just negative 1, 0, 0, negative 1. So if you were to times, if you scale vector by negative 1, both the x and y coordinates, that causes reflection through the origin, which is the same thing as reflecting across the x-axis and the y-axis. Let's see some examples of this. All right, so let's consider the point v equals 2 comma 1. Let's reflect it across the x-axis. We can see very quickly what happens here. If we take our point v, 2, 1, reflection across the x-axis, we'll send it to the point 2 comma negative 1. We should change the y coordinate there. And therefore, we see that if you multiply by the matrix 1, 0, 0, negative 1, by the vector 2, 1, you're going to get 2 negative 1, and that reflects across the x-axis. So having the number in the second column be negative reflects across the x-axis. If we do this to the unit square, notice the unit square is going to reflect downward like we see right there. Reflection across the y-axis, like we said earlier, that should be multiplication by the matrix negative 1, 0, 0, 1. So you're going to put a negative 1 in the x-position, and this will cause reflection across the y-axis. We can see this numerically why it happens. If you take the first row times this, you're going to get a negative 2. The second row times the vector will just give you back a 1. So the y-coordinate didn't change. The x-coordinate changes right here. And reflecting across the y-axis is actually considered a horizontal change, a horizontal transformation. The y-coordinate didn't change. The x-coordinate changed. And so you get that by multiplying by this matrix right here. Notice what it does to the unit square. You reflect across the y-axis right there. If we want to reflect our 0.2 comma 1 across the diagonal line, y equals x, remember that means multiply by this permutation matrix, 0, 1, 1, 0. 2, 1 will swap to be 1, 2, so it switches positions. And so you see this right here. V will translate to its reflection there. So the 0.2, 1 turned into the 0.1, 2, like we see it. So that's reflection across this diagonal line. It's hard to see this when you look at just the unit square. Because the unit square, when you reflect it across the diagonal line, this diagonal line is actually a line of symmetry for the unit square. So the image will actually be itself. But as you can see with the j's, things do get moved around. And actually, if you look at the color, the colors blended together, the cyan and magenta together, because the reflection lands on itself. And that's what we mean by symmetry after all. Symmetry is when you perform a transformation on a shape, and then you end up with the original shape again. And then the last one to mention is that you want to reflect through the origin. I said that was just multiplying by the negative one scalar matrix that has negative ones along the diagonal. So 2, 1 will map to negative 2, negative 1, which you can see right here. Here's 2, 1. Here's negative 2, negative 1 reflection through the origin. You can think of this geometrically in the following way. You take the path from your point to the origin, and then continue in that same trajectory, the same distance. That'll give you reflection through the origin. This is what happens to the unit square when we reflect through the origin. Now, I want to mention that reflection through the origin is actually equivalent to just rotating the plane by 180 degrees. And rotation is something we'll talk about a little bit later in this lecture. So because of that, we're not going to be too interested in reflections through points, because reflections through points basically can be taken care of by rotation. So we'll just worry about reflections really across lines, again with the emphasis on the x-axis, y-axis, and the diagonal line y equals x.