Reflecting Points Across a Line
Or: How I Learned to Stop Worrying and Trust the Process
Let’s talk about reflections over a line. This is a topic that comes up in geometry and can usually be solved through visual inspection.
We know that a point and its reflection are the same distance away from the line of reflection. Thus, we can solve for the reflected point by counting how far away the point of interest is from the line of reflection, and then counting that same distance on the other side to plot the reflected image.
However, as clever math students we can figure out a few general rules and tricks to speed up the process… in most cases :)
Simple Reflections
For these examples, visual inspection is usually enough. But as you’ll see, when we tilt our line of reflection, there will be a nice shortcut.
Horizontal Lines:
Suppose we have some point, , and a horizontal line of reflection, . Because is a horizontal line, the distance between the point and the line is completely determined by their -coordinates. Therefore, the point is units away from the line. And because the reflected point will be the same distance away from the line on the opposite side, the reflected point will sit units away from the line on the opposite side.
In other words, we can pretty much count how far away is from the line, and then just count the same distance on the other side to plot the reflected image.
In fact, if we have line of reflection , then the reflected point is simply !
Reflection Over a Horizontal Line
Interactive will load as you scroll.
We can actually derive an exact algebraic formula for the reflected point. Let’s call the reflected point . The original point is a distance of units away from the line. The reflected point is also a distance of units away from the line on the other side. Because the reflected point is the same distance away from the line as the original point, we can equate them and solve for :
Because we know that line is horizontal, it must sit in between the two points. Without loss of generality, we will assume that , so that the reflected point is below the line of reflection. Then and (before taking the absolute values, one side will be positive and the other will be negative). But because we’re taking absolute values, we can rewrite the order of the expressions (e.g., )!
So we find that
Then, in general, when reflecting a point across a horizontal line , the reflected point is located at:
Vertical Lines:
Great! That wasn’t too bad. Now we’ll move on to vertical lines, which follow the same pattern.
Suppose we have some point, , and a vertical line of reflection, . Because is a vertical line, the distance between the point and the line is completely determined by their -coordinates. Therefore, the point is units away from the line. And because the reflected point will be the same distance away from the line on the opposite side, the reflected point will sit units away from the line on the opposite side.
We have the same situation as above, but in the -direction instead of the -direction.
And, for example, if we have line of reflection , then the reflected point is simply !
Reflection Over a Vertical Line
Interactive will load as you scroll.
Now you try! Try deriving the general formula for reflecting a point across a vertical line using the same method as above.
Reveal solution
We have point and reflected point . The original point is a distance of units away from the line. The reflected point is a distance of units away from the line on the other side. Because the reflected point is the same distance away from the line as the original point, we can equate them and solve for :
So, in general, when reflecting a point across a vertical line , the reflected point is located at:
Diagonal Line:
Now let’s move on to something a bit more interesting. How do we reflect a point across the line ?
First, let’s try to solve this problem visually. We count how far away our point is from the line in the -direction, and then plot the reflected point the same distance away in the -direction on the other side of the line.
Reflection Over y = x
Interactive will load as you scroll.
But what if we have a weird point at that’s difficult to count? Now it’s time to learn a quick trick that will save you a lot of time! We can use a bit of handwaving to figure this out.
We know that a horizontal line of reflection at completely flips the sign of the -coordinate, and a that a vertical line of reflection at flips the sign of the -coordinate. Then, naturally, a diagonal line in between at flips both the - and -coordinates, resulting in a swap! The proof is left as an exercise to the reader :)
So, the reflected point is located at:
Shifted Diagonal Lines:
This one is a bit more tricky, but it will serve us well to wrap our heads around it before we dive into the general case.
We know that if we could just make this problem be a reflection in instead of , then it would be trivial to solve — just swap the - and -coordinates!
So, why not try exactly that? Let’s reframe this difficult problem into in easier one. We need to turn into , and back then back again. But how do we do that?
Reflection Over y = x + b Three-Step Shift
Interactive will load as you scroll.
Well, we can start by subtracting the from the -coordinate of the line of reflection to move it up/down to the origin. Anything we do to the line of reflection, we’ll have to do to the point of interest, , to keep the problem consistent. It’s like we’re dragging everything up/down by units.
Now that we have a line of reflection at , we can reflect the point across it as usual by swapping the - and -coordinates.
Now we need to push everything back in place by adding back to the -coordinates.
So, we find that the reflected point is located at:
Reflection Over y = x + b
Interactive will load as you scroll.
General Reflections
Rotation Matrices
We’ll be taking a slight detour to talk about rotation matrices — basically, a set of numbers that represent how we can rotate a point about the origin. This is a little advanced (you’ll see it come up in linear algebra, which, among other things, formalizes the concept of transformations like reflections and rotations using matrices) so feel free to skip this section.
The general rotation matrix for rotating a point about the origin by an angle in the clockwise direction is:
where is the angle between the line of reflection and the -axis.
For any point , which we can represent as a column vector, the rotated point is given by:
For example, say we have point and we want to rotate it by clockwise. We’d expect it to land at . Let’s check:
So, we see that rotating a point by clockwise results in the point .
Rotation matrices and vector operations will be discussed in more detail in a future post.
General Lines:
Now let’s do something crazy :)
Say we want to find out how to reflect a point across some general line . We might be able to do this through visual inspection, but it can be pretty difficult, especially for points not on lattice points. Instead, we aim to derive a general formula for the reflected point.
Let’s think back to our simple reflections. It would be so nice if we could somehow turn this general line into the simple horizontal line , where the rule is to simply flip the sign of the -coordinate, . Hmm… we’ve found ourselves in a similar situation before!
Recall, when we were dealing with the diagonal line , we found that we could subtract off the to move the line to the origin, reframing the problem into a simple reflection across the line . We’ll take a similar, albeit slightly more involved, approach here. It might be worthwhile to pause here and make sure you understand the steps we took to simplify the problem before continuing.
The general procedure to “simplify” the problem is as follows:
- Translate the line of reflection to the origin by subtracting off the . Anything we do to the line of reflection, we must do to , so we also subtract off from ’s -component.
- Rotate point and the line of reflection by a clockwise angle , the angle that the line makes with the -axis. We know that , so we can take the inverse tangent to find . We can then use our rotation matrix to rotate the line onto the -axis, making it the horizontal line .
- Reflect point across the -axis by flipping the sign of the -coordinate to find the reflected point .
- Rotate the line of reflection back to its original slope, , by a counter-clockwise angle . We can rotate point back into this frame by multiplying be the inverse rotation matrix .
- Translate the line of reflection back to its original position, , by adding back the . And of course, we must do the same to point to keep the problem consistent.
Reflection Over y = mx + b Steps
Interactive will load as you scroll.
Okay… nice procedure, but that’s not very helpful! We could manually perform this (or more likely write a program to do it for us), but why go through all this trouble everytime we want to reflect a point?!
If we could find a formula that would give us the reflected point directly, we could use it to easily reflect any point across any line! What follows is exactly that derivation. Brace yourself — this is not for the faint of heart!
Full derivation... here it comes!
Tricked ya! Work in progress :)
Wow! Glad that’s over :) Welcome back!
To review, we found that given a point and a line , the reflected point is located at:
Now we can just plug and chug to find any reflected point across any line.
Recovering the rules for simple reflections
How do we know this crazy formula is correct? Well, because this is the general formula for any line , it should work for any particular line we choose to throw at it. Let’s try a few:
Horizontal line:
We know the reflected point should be . A horizontal line has slope of zero, so we can plug in and to see if we get the correct answer:
Diagonal line:
We know the reflected point should be . This line has slope and intercept :
Awesome! So, as we can see, the formula works! But it would still be a pain to manually compute every point by hand.
Desmos
Instead, we can enter the reflection formula into Desmos and let it do all the heavy lifting. Try dragging the purple point to see the reflected point update in real time.
You can tinker around with the graph more here.
Reflections Cheat Sheet
For a point :
Horizontal line:
Vertical line:
Diagonal line:
Shifted diagonal:
General line: