Reflection Across the Line y = x

April 12, 2026

Problem

Reflect a shape across the line y = x. Show the original and the reflected image.

Explanation

A reflection flips the plane over a line called the mirror. Every point and its image are equidistant from the mirror, on opposite sides — like a real mirror reflection.

The Formula for Reflection Across y=xy = x

To reflect a point (x,y)(x, y) across the line y=xy = x, simply swap the coordinates:

(x,y)(y,x)(x, y) \to (y, x)

That's it. The line y=xy = x contains all points where the two coordinates are equal, and reflecting across it interchanges the role of xx and yy.

Other Common Reflection Lines

  • Across the xx-axis (y=0y = 0): (x,y)(x,y)(x, y) \to (x, -y)
  • Across the yy-axis (x=0x = 0): (x,y)(x,y)(x, y) \to (-x, y)
  • Across the origin (point reflection): (x,y)(x,y)(x, y) \to (-x, -y)
  • Across y=xy = x: (x,y)(y,x)(x, y) \to (y, x)
  • Across y=xy = -x: (x,y)(y,x)(x, y) \to (-y, -x)

For an arbitrary line, the formula is more complex — but the idea is the same: drop a perpendicular from the point to the line, then continue an equal distance on the other side.

Step-by-Step Solution

Given: A triangle with vertices A=(1,0)A = (1, 0), B=(4,1)B = (4, 1), C=(2,3)C = (2, 3). Reflect across y=xy = x.

Find: The image vertices.


Step 1 — Apply (x,y)(y,x)(x, y) \to (y, x) to each vertex.

A=(1,0)(0,1)=AA = (1, 0) \to (0, 1) = A'

B=(4,1)(1,4)=BB = (4, 1) \to (1, 4) = B'

C=(2,3)(3,2)=CC = (2, 3) \to (3, 2) = C'

Step 2 — Verify the reflected points are equidistant from the line y=xy = x.

For point (1,0)(1, 0), the closest point on y=xy = x is found by perpendicular projection. The perpendicular to y=xy = x has slope 1-1, so the line through (1,0)(1, 0) perpendicular to y=xy = x is y0=1(x1)y - 0 = -1(x - 1), or y=x+1y = -x + 1. Intersecting with y=xy = x:

x=x+12x=1x=y=0.5x = -x + 1 \Rightarrow 2x = 1 \Rightarrow x = y = 0.5

So the foot of the perpendicular is (0.5,0.5)(0.5, 0.5), which is exactly the midpoint of (1,0)(1, 0) and (0,1)(0, 1). ✓ The original and reflected points are symmetric about this midpoint.

Step 3 — Verify the triangle's shape is preserved.

Compute side lengths of the original:

  • AB=(41)2+(10)2=10|AB| = \sqrt{(4-1)^{2} + (1-0)^{2}} = \sqrt{10}
  • BC=(24)2+(31)2=8|BC| = \sqrt{(2-4)^{2} + (3-1)^{2}} = \sqrt{8}
  • CA=(12)2+(03)2=10|CA| = \sqrt{(1-2)^{2} + (0-3)^{2}} = \sqrt{10}

For the reflected triangle:

  • AB=(10)2+(41)2=10|A'B'| = \sqrt{(1-0)^{2} + (4-1)^{2}} = \sqrt{10}
  • BC=(31)2+(24)2=8|B'C'| = \sqrt{(3-1)^{2} + (2-4)^{2}} = \sqrt{8}
  • CA=(03)2+(12)2=10|C'A'| = \sqrt{(0-3)^{2} + (1-2)^{2}} = \sqrt{10}

All match. ✓

Step 4 — Reflections reverse orientation.

Reflections are unique among rigid motions in that they flip the orientation of figures. If the original triangle has vertices ordered counterclockwise (A,B,C)(A, B, C), the reflected triangle has them ordered clockwise — like looking in a mirror. This is why your reflection in a mirror is "left-right reversed" but not "up-down reversed."


Answer: Reflecting A=(1,0)A = (1, 0), B=(4,1)B = (4, 1), C=(2,3)C = (2, 3) across the line y=xy = x:

  A=(0,1),B=(1,4),C=(3,2)  \boxed{\;A' = (0, 1),\quad B' = (1, 4),\quad C' = (3, 2)\;}

The triangle is preserved in size and shape but flipped — the orientation reverses. Each vertex is the same distance from y=xy = x as its image, on the opposite side.

Try It

  • The original triangle is shown faintly; the reflected triangle is bright.
  • Watch the triangles flip across the cyan diagonal line y=xy = x.
  • Notice that the points exactly on the line ((0,0)(0, 0), (1,1)(1, 1), etc.) stay fixed.

Interactive Visualization

Parameters

Your turn

Got your own math or physics problem?

Turn any problem into an interactive visualization like this one — powered by AI, generated in seconds. Free to try, no credit card required.

Sign Up Free to Try It30 free visualizations every day
Reflection Across the Line y = x | MathSpin