To reflect a figure over a line, you find the mirror image of every point in that figure so that each point and its reflection are the same distance from the line, on opposite sides. The line acts as a mirror: points on it stay put, and everything else flips. The reflected figure keeps its original size, shape, and angles, but its orientation reverses (like how your left hand becomes a right hand in a mirror).
What a Reflection Actually Does
A reflection is a type of transformation called an isometry, meaning it preserves all distances and angles. If two points in your original figure are 5 units apart, they’ll still be 5 units apart after the reflection. The only thing that changes is orientation: if the vertices of a triangle go clockwise in the original, they’ll go counterclockwise in the reflection.
The core idea is simple. For any point not on the mirror line, you drop a perpendicular from that point to the line, then continue the same distance on the other side. The mirror line becomes the perpendicular bisector of the segment connecting each original point to its reflected point. Points that sit directly on the mirror line don’t move at all.
Reflecting Over the X-Axis or Y-Axis
These are the two most common reflections in coordinate geometry, and the rules are straightforward.
- Over the x-axis: Keep the x-coordinate the same and negate the y-coordinate. The point (x, y) becomes (x, −y).
- Over the y-axis: Keep the y-coordinate the same and negate the x-coordinate. The point (x, y) becomes (−x, y).
So if you have a triangle with vertices at (2, 3), (5, 1), and (4, 6), reflecting it over the x-axis gives you (2, −3), (5, −1), and (4, −6). To reflect an entire figure, just apply the rule to every vertex, then connect the new vertices in the same order.
Reflecting Over y = x and y = −x
These diagonal lines come up frequently in algebra and geometry courses. The rules are nearly as simple as the axis reflections.
- Over y = x: Swap the x- and y-coordinates. The point (x, y) becomes (y, x).
- Over y = −x: Swap the coordinates and negate both. The point (x, y) becomes (−y, −x).
For example, reflecting the point (3, 7) over the line y = x gives (7, 3). Reflecting it over y = −x gives (−7, −3). These rules work because swapping coordinates is geometrically equivalent to folding the coordinate plane along that diagonal.
Reflecting Over Any Other Line
When the mirror line isn’t one of the convenient cases above, you need a step-by-step process. Suppose you want to reflect a point P over the line y = mx + b. Here’s how to find its reflected image.
Step 1: Find the Perpendicular Line Through P
The perpendicular to a line with slope m has slope −1/m. Write the equation of the line that passes through your point P and has this perpendicular slope. If your mirror line is vertical (undefined slope), the perpendicular is horizontal, and vice versa.
Step 2: Find Where the Two Lines Intersect
Solve the system of equations formed by the mirror line and your perpendicular line. This intersection point, call it M, is the foot of the perpendicular from P to the mirror line.
Step 3: Use the Midpoint Formula
Point M is the midpoint between P and its reflection P’. If P = (x₁, y₁) and M = (xₘ, yₘ), then the reflected point is:
P’ = (2xₘ − x₁, 2yₘ − y₁)
This comes directly from the midpoint formula rearranged. Since M is halfway between P and P’, you just go the same distance past M to land on P’.
A Worked Example
Reflect the point (1, 2) over the line y = 2x + 1.
The mirror line has slope 2, so the perpendicular slope is −1/2. The perpendicular line through (1, 2) is y − 2 = −1/2(x − 1), which simplifies to y = −1/2 x + 5/2.
Set the two equations equal: 2x + 1 = −1/2 x + 5/2. Solving gives x = 3/5, and plugging back in gives y = 11/5. So the foot of the perpendicular is M = (3/5, 11/5).
Now apply the midpoint formula: P’ = (2(3/5) − 1, 2(11/5) − 2) = (1/5, 12/5). The reflected point is (1/5, 12/5). To reflect an entire figure, repeat this process for each vertex.
Using a Matrix for Reflections
If you’re reflecting many points at once, or working in a programming context, a reflection matrix is more efficient. For a line through the origin with slope m, you can multiply each point by this matrix:
1/(m² + 1) × [[1 − m², 2m], [2m, m² − 1]]
Each column represents how the x- and y-components transform. You multiply the matrix by the column vector of your point’s coordinates, and the result is the reflected point. For a line that passes through the origin at angle θ from the positive x-axis, the equivalent matrix uses cos 2θ and sin 2θ.
This matrix method only works directly for lines through the origin. If the mirror line doesn’t pass through the origin (like y = 2x + 3), you first translate the figure so the line does pass through the origin, apply the matrix, then translate back. In practice, this means subtracting a point on the line from all your coordinates, reflecting, then adding that point back.
Quick-Reference Summary of Rules
- Over x-axis: (x, y) → (x, −y)
- Over y-axis: (x, y) → (−x, y)
- Over y = x: (x, y) → (y, x)
- Over y = −x: (x, y) → (−y, −x)
- Over any line: Find the perpendicular from your point to the line, locate the intersection, and go the same distance on the other side.
Common Mistakes to Watch For
The most frequent error is reflecting over the wrong axis. When reflecting over the x-axis, the y-values flip, not the x-values. A useful way to remember: the axis you’re reflecting over is the one that stays fixed. Points reflected over the x-axis keep their x-coordinates because they’re only moving vertically.
Another common mistake is forgetting to reflect every vertex. A figure’s reflection is only correct if you transform all of its key points. If you’re reflecting a quadrilateral, you need four reflected vertices. Connect them in the same order as the original, and the reflected shape will be accurate.
Finally, when reflecting over an arbitrary line, students sometimes use the regular slope instead of the negative reciprocal for the perpendicular. If the mirror line has slope 3, the perpendicular slope is −1/3, not −3. Getting this wrong shifts the reflected point to the wrong location entirely.

