Q. How to reflect over the line \(y = x\).
Answer
Reflecting a point across the line \(y = x\): swap coordinates.
For a point \((x,y)\) the image is \((y,x)\).
Matrix form:
\[
\begin{pmatrix}x’ \\[4pt] y’\end{pmatrix}
=
\begin{pmatrix}0 & 1 \\[4pt] 1 & 0\end{pmatrix}
\begin{pmatrix}x \\[4pt] y\end{pmatrix}.
\]
For a graph \(y=f(x)\) the reflection is \(x=f(y)\), equivalently \(y=f^{-1}(x)\) when \(f\) is invertible.
Detailed Explanation
Reflection across the line \(y = x\) — detailed, step-by-step explanation
This guide shows how to reflect a point, a function graph, or a linear map across the line \(y = x\). Each step is written and justified in detail.
[Image of reflection of a point across the line y = x]
1. Reflecting a single point \(P(x, y)\)
Goal: find the coordinates of the reflection \(P'(x’, y’)\) of the point \(P(x, y)\) across the line \(y = x\).
Step 1 — geometric idea:
- The line \(y = x\) passes through the origin and has unit direction vector \[ u = \frac{1}{\sqrt{2}}\begin{pmatrix}1 \\[4pt] 1\end{pmatrix}. \]
- Reflection of a vector \(v\) across the line spanned by the unit vector \(u\) keeps the component parallel to \(u\) and negates the perpendicular component. Using projection, the reflected vector \(R(v)\) is \[ R(v) = 2\bigl(v\cdot u\bigr)u – v. \]
Step 2 — apply the formula to \(v = (x, y)\):
- Compute the dot product: \[ v\cdot u = \begin{pmatrix}x \\[4pt] y\end{pmatrix}\cdot \frac{1}{\sqrt{2}}\begin{pmatrix}1 \\[4pt] 1\end{pmatrix} = \frac{x+y}{\sqrt{2}}. \]
- Compute \(2(v\cdot u) u\): \[ 2\bigl(v\cdot u\bigr)u = 2\cdot\frac{x+y}{\sqrt{2}}\cdot\frac{1}{\sqrt{2}}\begin{pmatrix}1 \\[4pt] 1\end{pmatrix} = 2\cdot\frac{x+y}{2}\begin{pmatrix}1 \\[4pt] 1\end{pmatrix} = \begin{pmatrix}x+y \\[4pt] x+y\end{pmatrix}. \]
- Now subtract \(v\): \[ R\left(\begin{pmatrix}x \\[4pt] y\end{pmatrix}\right) = \begin{pmatrix}x+y \\[4pt] x+y\end{pmatrix} – \begin{pmatrix}x \\[4pt] y\end{pmatrix} = \begin{pmatrix}y \\[4pt] x\end{pmatrix}. \]
Conclusion for a point: the reflection of \(P(x, y)\) across the line \(y = x\) is the point \(P'(y, x)\). In words, swap the x- and y-coordinates.
Example: reflect \(P(3, 1)\). Swapping coordinates gives \(P'(1, 3)\).
2. Matrix of the reflection
Step 1 — from the action on \((x, y)\) we saw \(R(x, y) = (y, x)\). The linear map \(R\) therefore has matrix representation (with respect to the standard basis): \[ R = \begin{pmatrix}0 & 1 \\[4pt] 1 & 0\end{pmatrix}. \]
Step 2 — check: applying this matrix to \((x, y)\) yields \[ \begin{pmatrix}0 & 1 \\[4pt] 1 & 0\end{pmatrix}\begin{pmatrix}x \\[4pt] y\end{pmatrix} = \begin{pmatrix}y \\[4pt] x\end{pmatrix}. \]
3. Reflecting a graph \(y = f(x)\)
Step 1 — description:
- Reflecting the graph of \(y = f(x)\) across \(y = x\) is equivalent to swapping the roles of \(x\) and \(y\) in the equation. That produces the relation \(x = f(y)\).
- If \(f\) is invertible, solving for \(y\) gives \(y = f^{-1}(x)\). Thus the reflected graph is the graph of the inverse function \(f^{-1}\).
Step 2 — example:
- Start with \(y = 2x + 1\). Swap \(x\) and \(y\) to get \(x = 2y + 1\). Solve for \(y\): \[ x = 2y + 1 \quad\Rightarrow\quad y = \frac{x – 1}{2}. \]
- The reflected graph is \(y = (x – 1)/2\), which is the inverse function of \(y = 2x + 1\).
4. Practical steps you can follow (summary)
- To reflect a point \((x, y)\): exchange coordinates to get \((y, x)\).
- To reflect the graph \(y = f(x)\): swap \(x\) and \(y\) to obtain \(x = f(y)\); if possible, solve for \(y\) to get \(y = f^{-1}(x)\).
- To apply the reflection as a linear transform: multiply by the matrix \[ \begin{pmatrix}0 & 1 \\[4pt] 1 & 0\end{pmatrix}. \]
These procedures produce the mirror image of the given geometric object across the line \(y = x\).
Graph
FAQs
How do you reflect a single point over the line y=x?
What is the matrix for reflection across y=x?
How do you reflect a vector using linear algebra?
How does reflection across y=x affect the graph of a function y=f(x)?
How do you reflect a line given by y=mx+b across y=x?
How do you reflect a polygon or shape over y=x?
What are the eigenvectors and eigenvalues of the reflection?
How do you reflect over the line y=x+c (shifted diagonal)?
Try our tools below.
Math, Calculus, Geometry, etc.