Academy
Formulas/maths/Straight Lines/Reflection of a Point in a Line

Reflection of a Point in a Line

Image (reflection) of point (x₁, y₁) in the line ax + by + c = 0.
Derivation

The image PP' of point P(x1,y1)P(x_1, y_1) in line L:ax+by+c=0L: ax + by + c = 0 is the point such that LL is the perpendicular bisector of PPPP'.

From the foot of perpendicular derivation, the foot NN corresponds to parameter:

t=ax1+by1+ca2+b2t = -\frac{ax_1 + by_1 + c}{a^2 + b^2}

Since NN is the midpoint of PPPP', the image P=P+2PNP' = P + 2\overrightarrow{PN}. The displacement PN=(at,bt)\overrightarrow{PN} = (at, bt), so:

P=(x1+2at,  y1+2bt)P' = (x_1 + 2at,\; y_1 + 2bt)

Substituting tt:

xx1a=yy1b=2(ax1+by1+c)a2+b2\boxed{\frac{x - x_1}{a} = \frac{y - y_1}{b} = -\frac{2(ax_1 + by_1 + c)}{a^2 + b^2}}

The foot uses parameter tt once; the image uses 2t2t. This is the only difference between the two results.

Note
Special cases — all follow by substituting into the general formula.
> > | Mirror line | $a$ | $b$ | $c$ | Image of $(x_1, y_1)$ | > |---|---|---|---|---| > | $x$-axis ($y = 0$) | $0$ | $1$ | $0$ | $(x_1,\ -y_1)$ | > | $y$-axis ($x = 0$) | $1$ | $0$ | $0$ | $(-x_1,\ y_1)$ | > | $y = x$ | $1$ | $-1$ | $0$ | $(y_1,\ x_1)$ | > | $y = -x$ | $1$ | $1$ | $0$ | $(-y_1,\ -x_1)$ | > | Origin | — | — | — | $(-x_1,\ -y_1)$ | > | $x = k$ | $1$ | $0$ | $-k$ | $(2k - x_1,\ y_1)$ | > | $y = k$ | $0$ | $1$ | $-k$ | $(x_1,\ 2k - y_1)$ | > > The origin is a point, not a line — its reflection is a rotation by $180°$, equivalent to reflecting twice (in $x$-axis then $y$-axis).