---
title: "Reflection about y=x as composite"
subject: "Computer Graphics"
chapter: 3
key: "semester_5/computer_graphics:reflection-y-x-composite-angle"
source: https://www.bctengineer.com/q/semester_5/computer_graphics/reflection-y-x-composite-angle
site: BCT Engineering
---

# Reflection about y=x as composite

Computer Graphics · Chapter 3: Two –Dimensional Transformations

- Asked in: 2071 Chaitra, 10 marks
- Video: [Reflection about a line in Computer Graphics // numerical on reflection about a given line](https://www.youtube.com/watch?v=T3ewDqW0qjs) — Yachana Bhawsar
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_5/computer_graphics/reflection-y-x-composite-angle
- Whole chapter: https://www.bctengineer.com/md/semester_5/computer_graphics/chapter-3

## Question

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 α.

## 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°.

## Answer

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

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

**Reflection about the x-axis:**

```text
Ref_x = | 1  0 |
        | 0 −1 |
```

**Counter-clockwise rotation by α:**

```text
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):

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

For this to equal the reflection about y = x:

```text
| 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.**

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What is the matrix of reflection about y = x?
   A. [[0,1],[1,0]]
   B. [[1,0],[0,-1]]
   C. [[-1,0],[0,1]]
   D. [[0,-1],[-1,0]]
   Answer: A. It swaps x and y. (Key point: Matrix of reflection)

2. For reflection about x-axis followed by rotation, which product is used?
   A. Ref_x · R(α)
   B. R(α) · Ref_x
   C. R(α) + Ref_x
   D. Ref_x · Ref_x
   Answer: B. The later operation is on the left. (Key point: Order of product)

3. R(α)·Ref_x equals?
   A. [[cosα, -sinα],[sinα, cosα]]
   B. [[cosα, -sinα],[-sinα, cosα]]
   C. [[cosα, sinα],[sinα, -cosα]]
   D. [[-cosα, sinα],[sinα, cosα]]
   Answer: C. Multiplying out gives that matrix. (Key point: Equating)

4. What is α?
   A. 45°
   B. 180°
   C. 30°
   D. 90°
   Answer: D. cosα = 0 and sinα = 1 gives 90° counter-clockwise. (Key point: Result)

## Related in Computer Graphics

- [Rotate line about Y-axis by 90°](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Arotate-line-y-axis-90) — Computer Graphics, chapter 4
- [Composite matrix: reflection about y=mx+c](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Areflection-about-y-mx-c) — Computer Graphics, chapter 3, asked 2×
- [Composite rotation and shear in 2D](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Acomposite-rotation-and-shear-2d) — Computer Graphics, chapter 3
- [3D rotation about axis (1,2,3)-(10,20,30)](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Arotate-3d-axis-1-2-3) — Computer Graphics, chapter 4
- [3D rotation about arbitrary axis](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Arotate-3d-arbitrary-axis-steps) — Computer Graphics, chapter 4, asked 2×
- [2D reflection matrices and line y+x=0](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Areflection-matrices-axes-y-plus-x) — Computer Graphics, chapter 3

## Related in other subjects

- [Degree of curve, elements of composite curve](https://www.bctengineer.com/question.md?key=semester_4%2Fsurveying_ii%3Adegree-of-curve-composite-elements) — Surveying II, chapter 6
- [Field of charged rod along its axis](https://www.bctengineer.com/question.md?key=semester_1%2Fengineering_physics%3Acharged-rod-field-along-axis) — Engineering Physics, chapter 7
- [Composite curve with 48 degree deflection](https://www.bctengineer.com/question.md?key=semester_6%2Ftransportation_engineering_i%3An-72m-composite-60) — Transportation Engineering I, chapter 3
- [MOI of composite area about Y axis](https://www.bctengineer.com/question.md?key=semester_1%2Fapplied_mechanics%3Amoi-composite-area-about-y-axis) — Applied Mechanics, chapter 4
