Skip to main content

Reflection about y=x as composite

Short answer

Equating reflection about y = x (swaps coordinates) to reflection across x-axis followed by counterclockwise rotation by α gives α = 90°. The matrix product R(α)·Ref_x must equal [0 1; 1 0], so cosα=0, sinα=1, hence α=90°.

The reflection along the line y = x is equivalent to the reflection along the X-axis followed by counter clock wise rotation by α (alpha) degree. Find the angle α.

Reflection about y = x swaps the coordinates, so its matrix is

Ref_{y=x} = | 0 1 |
            | 1 0 |

Reflection about the x-axis:

Ref_x = | 1  0 |
        | 0 −1 |

Counter-clockwise rotation by α:

R(α) = | cosα  −sinα |
       | sinα   cosα |

The reflection about the x-axis followed by rotation (the rotation is applied after, so it is the left matrix):

R(α) · Ref_x = | cosα  −sinα | · | 1  0 |  =  | cosα   sinα |
               | sinα   cosα |   | 0 −1 |     | sinα  −cosα |

For this to equal the reflection about y = x:

| cosα   sinα |   | 0 1 |
| sinα  −cosα | = | 1 0 |

so cosα = 0 and sinα = 1, giving α = 90°.

Check: take the point (2, 1). Reflection about the x-axis gives (2, −1); rotating it by 90° counter-clockwise gives (x', y') = (−y, x) = (1, 2). This is the reflection of (2,1) about y = x.

Answer: α = 90° counter-clockwise.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Computer Graphics chapter 3 questions →