I’m prepping for a geometry test and reflections are frying my brain a little. I’m fine reflecting across the x- or y-axis, but when the mirror is a slanted line like y = -x + 1, I get super tangled. I know it’s supposed to be a mirror image with equal perpendicular distance, but I keep second-guessing myself when I try to get the actual coordinates without drawing it. Is there a clean, reliable way to reflect a point across a general line (like ax + by + c = 0) purely with calculations? And if it’s a whole triangle, should I just reflect each vertex, or is there a smarter shortcut?
Follow-up: if I do two reflections in a row across two intersecting lines, is that always a rotation? If so, how do I figure out the center and the angle just from the equations of the lines? I love the pattern-y vibe here, but I keep getting answers that don’t match my sketches, and I’m not sure where I’m messing up.
















3 Responses
Clean mirror trick: to reflect (x, y) across ax+by+c=0, bounce it off the tilted mirror with d=(ax+by+c)/(a^2+b^2) and land at (x’,y’)=(x−2ad, y−2bd); for a triangle, just do that to each vertex-like giving each corner its own little periscope flip.
Two reflections across L1 then L2 make a rotation about their intersection by angle 2θ, where θ = atan2(a1 b2 − b1 a2, a1 a2 + b1 b2) (direction follows the order of mirrors); derivation and details: https://en.wikipedia.org/wiki/Reflection_(mathematics)#In_a_plane.
For a clean, no-drawing reflection across a line ax + by + c = 0, use the normal vector n = (a, b). For a point P = (x0, y0), compute s = (a x0 + b y0 + c) / (a^2 + b^2), then reflect by P’ = P − 2 s n, i.e., x’ = x0 − 2 a s and y’ = y0 − 2 b s. That’s just “push the point straight onto the line along the normal, then overshoot by the same amount” in one shot. For y = −x + 1, that’s a = 1, b = 1, c = −1; same formula, done. For a triangle, yes-reflect each vertex with the same formula; edges will follow automatically, and there’s no smarter shortcut that beats that for speed. For two reflections across intersecting lines, you always get a rotation: the center is the intersection of the lines, and the angle is twice the signed angle from the first line to the second. To compute that angle robustly, take direction vectors t1 = (−b1, a1) and t2 = (−b2, a2) for the lines a1x + b1y + c1 = 0 and a2x + b2y + c2 = 0, then θ = atan2(t1_x t2_y − t1_y t2_x, t1_x t2_x + t1_y t2_y); the rotation angle is 2θ, and order matters (swap the reflections, flip the sign). If the lines are parallel, the composition is a translation perpendicular to them by twice the distance between them. Hope this helps!
Totally feel you-when I first met slanted mirrors, I kept sketching like a maniac and still doubting myself! What finally settled it for me (after a late-night “aha!” moment while lining up my reflection in a shop window) was this clean formula: to reflect a point (x, y) across the line ax + by + c = 0, use x’ = x − 2a(ax + by + c)/(a² + b²) and y’ = y − 2b(ax + by + c)/(a² + b²). It’s just “push straight to the line and go the same distance past,” encoded with the line’s normal (a, b). For your y = −x + 1, that’s a = 1, b = 1, c = −1, so it simplifies beautifully to (x, y) ↦ (1 − y, 1 − x)-like swapping and flipping around the point (1/2, 1/2). For a triangle, I just reflect each vertex with that formula; it’s quick and guaranteed. Now the cool patterny bit: the composition of two reflections across intersecting lines is a rotation about their intersection by twice the angle between the lines. So first solve the two line equations to get the center (their meeting point). Then get a direction vector for each line-say v1 = (b1, −a1) and v2 = (b2, −a2)-and compute θ = atan2(v1x v2y − v1y v2x, v1·v2); the overall rotation is by 2θ, and the sign (clockwise vs counterclockwise) matches the order you reflect in. I like thinking of it as a door hinge: two mirror flips act like one smooth spin around the hinge point by twice the wedge between the mirrors.