What this calculator does
This tool finds the mirror image (reflection) of a point across a straight line. Give it any point (x, y) and any line written in the general form \(ax + by + c = 0\), and it returns the reflected point (x', y') — the point on the opposite side of the line, the same perpendicular distance away.
How to use it
Enter the coordinates of your point, then enter the three coefficients a, b, and c of your line. If your line is in slope form like y = mx + k, rewrite it as mx − y + k = 0 so that a = m, b = −1, c = k. The vertical line x = 5 becomes 1·x + 0·y − 5 = 0.
The formula explained
The signed quantity d = (ax + by + c) / (a² + b²) measures how far the point sits off the line, scaled by the line's coefficients. Stepping twice that distance back along the normal vector (a, b) lands you exactly on the mirror image:
$$(x', y') = \left(x - 2a\,d,\; y - 2b\,d\right)$$
where
$$d = \dfrac{a\,x + b\,y + c}{a^{2} + b^{2}}$$If the point already lies on the line, \(ax + by + c = 0\), so it maps to itself.
Worked example
Reflect (3, 4) across the line \(x - y = 0\) (a = 1, b = −1, c = 0). Here \(a^{2} + b^{2} = 2\) and \(ax + by + c = 3 - 4 = -1\), so \(d = -1/2\). Then $$x' = 3 - 2(1)(-0.5) = 4$$ and $$y' = 4 - 2(-1)(-0.5) = 3$$ The reflection of (3, 4) over \(y = x\) is (4, 3) — exactly the swap you'd expect.
FAQ
Can a, b, or c be zero? Yes. Only the case a = b = 0 is invalid, because then there is no line; the calculator guards against dividing by zero.
Does the line have to pass through the origin? No. The constant c shifts the line, and the formula handles any position.
What if my line is y = mx + k? Convert it to m·x − 1·y + k = 0, giving a = m, b = −1, c = k.