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

Reflection of a Line in Another Line

Image of line L₁ in mirror line L₂. Method: reflect any two points on L₁ using the point-reflection formula, then find the line through their images.
Derivation

To reflect line L1L_1 in mirror line L2L_2, note that every point on the image line L1L_1' is the reflection of some point on L1L_1 in L2L_2. A line is determined by two points, so reflecting any two points on L1L_1 and joining their images gives L1L_1'.

Setup

Let L1:a1x+b1y+c1=0L_1: a_1 x + b_1 y + c_1 = 0 and mirror L2:a2x+b2y+c2=0L_2: a_2 x + b_2 y + c_2 = 0.

Pick two convenient points on L1L_1 — typically where L1L_1 cuts the axes, or any two points easy to compute with.

Reflecting Each Point

For each point P(x1,y1)P(x_1, y_1) on L1L_1, its image P(x,y)P'(x', y') in L2L_2 satisfies:

xx1a2=yy1b2=2(a2x1+b2y1+c2)a22+b22\frac{x' - x_1}{a_2} = \frac{y' - y_1}{b_2} = -\frac{2(a_2 x_1 + b_2 y_1 + c_2)}{a_2^2 + b_2^2}

Let k=2(a2x1+b2y1+c2)a22+b22k = -\dfrac{2(a_2 x_1 + b_2 y_1 + c_2)}{a_2^2 + b_2^2}. Then:

x=x1+a2k,y=y1+b2kx' = x_1 + a_2 k, \qquad y' = y_1 + b_2 k

Getting the Image Line

Apply this to two points P1,P2P_1, P_2 on L1L_1 to get P1,P2P_1', P_2'. The image line L1L_1' passes through both.

If P1=(x1,y1)P_1' = (x_1', y_1') and P2=(x2,y2)P_2' = (x_2', y_2'), the image line is:

xx1x2x1=yy1y2y1\frac{x - x_1'}{x_2' - x_1'} = \frac{y - y_1'}{y_2' - y_1'}

or equivalently by the two-point form.

Special Case: L1L2L_1 \parallel L_2

When L1L2L_1 \parallel L_2, the image L1L_1' is also parallel to both, on the opposite side of L2L_2 at the same distance. If dd is the distance between L1L_1 and L2L_2, then L1L_1' is at distance 2d2d from L1L_1.

Special Case: L1L_1 passes through the intersection of L2L_2 with another line

If L1L_1 and L2L_2 intersect at point QQ, then QQ lies on L2L_2 and is its own reflection. So QQ also lies on L1L_1'. Only one more reflected point is needed to determine L1L_1'.

Warning
The image line $L_1'$ is not found by reflecting the coefficients of $L_1$ directly — there is no shortcut on the equation itself. Always work through two points.
Note
Example. Find the image of $L_1: x + y = 3$ in $L_2: x - y = 1$.
> > Take $P_1 = (3, 0)$ on $L_1$. For $L_2: a_2=1, b_2=-1, c_2=-1$: > > $$ > k = -\frac{2(3 - 0 - 1)}{1 + 1} = -\frac{4}{2} = -2 > $$ > > $$ > P_1' = (3 + 1\cdot(-2),\ 0 + (-1)\cdot(-2)) = (1,\ 2) > $$ > > Take $P_2 = (0, 3)$ on $L_1$: > > $$ > k = -\frac{2(0 - 3 - 1)}{2} = -\frac{-8}{2} = 4 > $$ > > $$ > P_2' = (0 + 4,\ 3 + (-1)\cdot 4) = (4,\ -1) > $$ > > Line through $(1, 2)$ and $(4, -1)$: slope $= \dfrac{-1-2}{4-1} = -1$. > > $$ > y - 2 = -1(x - 1) \implies x + y = 3 > $$ > > Here $L_1' = L_1$ because $L_1$ is perpendicular to $L_2$ at their intersection — the line reflects onto itself.