2D Reflection
Reflection is a transformation that produces a mirror image of an object across a given line, called the axis (or line) of reflection. It's often described as a "flip" the object is mirrored to the opposite side of the reference line, exactly as if reflected in a mirror placed along that line.
What is 2D Reflection?
Reflection flips an object across a line of reflection so that the object's mirror image appears on the opposite side of that line, at an equal perpendicular distance.
The size and shape of the object remain unchanged, but its orientation is reversed a reflected object cannot be obtained from the original purely by translation and rotation; it is "handedness-flipped," much like your left hand is a mirror image of your right hand.
The most commonly used lines of reflection are:
- The X-axis
- The Y-axis
- The origin (reflection through a point)
- The line y = x
- The line y = -x
- An arbitrary line
Reflection about the X-axis
When reflecting about the X-axis, the x-coordinate stays the same, while the y-coordinate is negated (flipped to the opposite side of the X-axis):
x' = x
y' = -yMatrix form:
Rx-axis = | 1 0 0 |
| 0 -1 0 |
| 0 0 1 |Reflection about the Y-axis
When reflecting about the Y-axis, the y-coordinate stays the same, while the x-coordinate is negated:
x' = -x
y' = yMatrix form:
Ry-axis = | -1 0 0 |
| 0 1 0 |
| 0 0 1 |Reflection about the Origin
Reflecting a point about the origin negates both coordinates equivalent to reflecting across the X-axis and then the Y-axis (or rotating the object by 180°):
x' = -x
y' = -yMatrix form:
Rorigin = | -1 0 0 |
| 0 -1 0 |
| 0 0 1 |Reflection about the Line y = x
Reflecting about the line y = x swaps the x- and y-coordinates:
x' = y
y' = xMatrix form:
Ry=x = | 0 1 0 |
| 1 0 0 |
| 0 0 1 |Reflection about the Line y = -x
Reflecting about the line y = -x swaps the coordinates and negates both:
x' = -y
y' = -x
Matrix form:Ry=-x = | 0 -1 0 |
| -1 0 0 |
| 0 0 1 |Reflection about an Arbitrary Line
Reflecting an object about a line that does not pass through the origin, or is not aligned with the X-axis, Y-axis, or the lines y = ±x, requires a more general procedure the same "translate–transform–translate back" pattern used for rotation and scaling about an arbitrary point.
Case A: Arbitrary line through the origin, at angle θ to the X-axis
- Rotate the line (and the object) by -θ, so the line of reflection aligns with the X-axis: R(-θ)
- Reflect about the X-axis: Rx-axis
- Rotate back by +θ: R(θ)
Combined matrix:
R' = R(θ) · Rx-axis · R(-θ)Case B: Arbitrary line not passing through the origin
If the line of reflection has the form y = mx + c (does not pass through the origin):
- Translate the line down so it passes through the origin: T(0, -c)
- Rotate the line so it aligns with the X-axis (using θ = tan⁻¹(m)): R(-θ)
- Reflect about the X-axis: Rx-axis
- Rotate back: R(θ)
- Translate back: T(0, c)
Combined matrix:
R' = T(0, c) · R(θ) · Rx-axis · R(-θ) · T(0, -c)Reflection as a Special Case of Scaling
An important conceptual link: reflection about the X-axis is identical to scaling with factors (sx, sy) = (1, -1), and reflection about the Y-axis is identical to scaling with (sx, sy) = (-1, 1). Reflection about the origin is identical to scaling with (sx, sy) = (-1, -1).
This is why a negative scale factor always introduces a reflection alongside the resizing.
Properties of 2D Reflection
- Preserves size and shape: Like translation and rotation, reflection does not change an object's size or shape distances and angles between points are preserved.
- Reverses orientation: Unlike translation and rotation, reflection is not orientation-preserving. A shape and its reflection cannot be made to coincide using only translation and rotation this is the defining characteristic of reflection.
Self-inverse: Reflecting an object twice about the same line returns it to its original position:
R · R = I (identity matrix)This means every reflection matrix is its own inverse: R^-1 = R.
- Determinant: The determinant of a 2D reflection matrix is always -1 (in contrast to rotation, which has determinant +1). This negative determinant is the mathematical signature of an orientation-reversing transformation.
- Composition of two reflections: Reflecting about two different lines in sequence is equivalent to a rotation about the point where the two lines intersect, by an angle equal to twice the angle between the two lines. This is a classical result connecting reflections and rotations.
Solved Numerical Problems
Problem 1
Reflect the point P(3, 5) about the X-axis. Find the new coordinates.
Solution:
x' = x = 3
y' = -y = -5New point P' = (3, -5)
Problem 2
Reflect the point P(-4, 2) about the Y-axis. Find the new coordinates.
Solution:
x' = -x = 4
y' = y = 2New point P' = (4, 2)
Problem 3
Reflect the point P(2, 7) about the origin. Find the new coordinates.
Solution:
x' = -x = -2
y' = -y = -7New point P' = (-2, -7)
Problem 4
Reflect the point P(3, 6) about the line y = x. Find the new coordinates, and verify the result by checking it forms a mirror image (i.e., the line y = x is the perpendicular bisector of the segment joining P and P').
Solution:
x' = y = 6
y' = x = 3New point P' = (6, 3)
Verification: The midpoint of P(3,6) and P'(6,3) is ((3+6)/2, (6+3)/2) = (4.5, 4.5), which lies exactly on the line y = x. Also, the segment PP' has slope (3-6)/(6-3) = -1, which is perpendicular to the line y = x (slope 1), confirming the line y = x is indeed the perpendicular bisector.
Problem 5
A triangle has vertices A(1, 1), B(4, 1), and C(1, 3). Reflect the triangle about the X-axis. Find the new coordinates of all three vertices, and verify that the area of the triangle remains unchanged.
Solution:
Original area:
Area = ½ × base × height = ½ × 3 × 2 = 3(base AB = 4-1 = 3, height AC = 3-1 = 2)
Reflected vertices (negate y):
A' = (1, -1)
B' = (4, -1)
C' = (1, -3)New area (same base and height, just flipped):
Area' = ½ × 3 × 2 = 3Area is unchanged (3 square units), confirming reflection preserves size — only orientation is mirrored.
Problem 6 (Practice try it yourself)
A point P(5, 2) is reflected about the line y = -x. Find the new coordinates using the formula x' = -y, y' = -x. Then verify that the line y = -x is the perpendicular bisector of the segment joining the original and reflected points.
(Hint: after finding P', compute the midpoint of P and P' and confirm it lies on y = -x; also check the slope of segment PP' is perpendicular to the line y = -x.)
Conclusion
Reflection introduces an important new idea not present in translation, rotation, or uniform scaling: orientation reversal. While it preserves size and shape just like rotation, its negative determinant marks it as fundamentally different it cannot be achieved by combining only translations and rotations.
Recognizing reflection as a special case of scaling with a negative scale factor ties together the full family of 2D linear transformations, and understanding the "translate–rotate–reflect–rotate back–translate back" technique for reflecting about an arbitrary line prepares you for similarly structured problems in 3D transformations.
Was this article helpful?