Reflection Transformation Calculator – Mirror Over Line or Axis
A reflection is a rigid transformation that “flips” points across a mirror line.
It preserves distances, angles, perimeter, and area,
but it reverses orientation (clockwise becomes counterclockwise).
1) Common axis reflections
-
Over the x-axis (mirror line \(y=0\)):
\[
(x,y)\;\to\;(x,-y)
\]
-
Over the y-axis (mirror line \(x=0\)):
\[
(x,y)\;\to\;(-x,y)
\]
-
Over the line \(y=x\):
\[
(x,y)\;\to\;(y,x)
\]
-
Over the line \(y=-x\):
\[
(x,y)\;\to\;(-y,-x)
\]
2) Reflection across a general line \(ax+by+c=0\)
Any mirror can be written in the general form:
\[
ax + by + c = 0,\quad \text{with }(a,b)\neq(0,0).
\]
The vector \((a,b)\) is perpendicular (normal) to the line.
Given a point \(P=(x_0,y_0)\), define
\[
t = \frac{a x_0 + b y_0 + c}{a^2 + b^2}.
\]
Then the reflected point \(P'=(x',y')\) is:
\[
\begin{aligned}
x' &= x_0 - 2a\,t,\\
y' &= y_0 - 2b\,t.
\end{aligned}
\]
3) NEW: Line through \((h,k)\) at angle \(\theta\)
A very common description of a mirror is:
“the line passing through \((h,k)\) making angle \(\theta\) with the +x axis.”
(Angle is measured counterclockwise.)
A direction vector for the line is
\[
\mathbf{d}=(\cos\theta,\ \sin\theta),
\]
so a perpendicular (normal) vector is
\[
\mathbf{n}=(-\sin\theta,\ \cos\theta).
\]
The line through \((h,k)\) is:
\[
\mathbf{n}\cdot\bigl((x,y)-(h,k)\bigr)=0
\quad\Rightarrow\quad
-\sin\theta\,(x-h)+\cos\theta\,(y-k)=0.
\]
Expanding to the standard \(ax+by+c=0\) form gives:
\[
a=-\sin\theta,\qquad b=\cos\theta,\qquad c=\sin\theta\,h-\cos\theta\,k.
\]
Once you have \(a,b,c\), you can use the same reflection formula from Section 2.
4) Point-to-line distance
The shortest distance from \(P=(x_0,y_0)\) to the line \(ax+by+c=0\) is:
\[
d=\frac{|a x_0 + b y_0 + c|}{\sqrt{a^2+b^2}}.
\]
Under reflection, the distance to the mirror line stays the same.
5) What reflection preserves
- Lengths: segments keep the same length.
- Angles: angle measures are unchanged.
- Perimeter and area: polygons keep the same perimeter and area.
- Fixed points: points on the mirror line stay unchanged.
6) Reading the diagram in this tool
- The plot uses square units, so one unit in \(x\) matches one unit in \(y\).
- You can pan by dragging and zoom using wheel/trackpad or pinch.
- Play animates an intermediate morph from the original to the reflected figure.
- In point mode, the tool can show the perpendicular from the point to the mirror line.
7) Quick example
Reflect \(P=(3,4)\) over the y-axis (\(x=0\)):
\[
(x,y)\to(-x,y)\quad\Rightarrow\quad (3,4)\to(-3,4).
\]
8) Common mistakes
- Using a general line with \(a=0\) and \(b=0\) (not a valid line).
- Entering two identical points in “line through two points” mode (no unique line exists).
- Mixing degrees and radians when defining an angled mirror line.