Order of transformations: reflect in y=x, then 90° rotation – what am I missing?

I’m revising transformations to strengthen my fundamentals, and I’m stuck on composing them in the right order.

Example: Take triangle PQR with P(2, -3), Q(4, 1), and R(0, 0). The instruction is: reflect the triangle in the line y = x, then rotate it 90° counterclockwise about the origin. I keep second-guessing the formulas and the order.

My (probably wrong) attempt: I reflected using (x, y) -> (x + y, x – y), and then I rotated using (x, y) -> (x, y) because I thought a 90° turn would bring it back if one coordinate was zero. That clearly doesn’t make sense once I plot it, so I think I’ve messed up both steps.

Could someone explain the clean, step-by-step way to apply these two transformations to the coordinates without drawing everything? Also, if I swap the order (rotate first, then reflect in y = x), do I end up at the same image, or does the order matter here?

Side question: Is there a quick, reliable method (like a small 2×2 matrix approach) that I can use to combine these without re-deriving rules every time, or is that overkill for this level?

3 Responses

  1. Love this question! Think of “reflect in y = x” as swapping name tags: every point (x, y) just trades places to become (y, x). Then a 90° counterclockwise rotation is the quarter-turn rule (x, y) → (−y, x). So do it step by step:
    – Reflect first: P(2, −3) → (−3, 2), Q(4, 1) → (1, 4), R(0, 0) → (0, 0).
    – Then rotate: (−3, 2) → (−2, −3), (1, 4) → (−4, 1), (0, 0) → (0, 0).
    Final positions: P′′(−2, −3), Q′′(−4, 1), R′′(0, 0). A neat surprise: this composition is exactly the reflection across the y-axis, (x, y) → (−x, y). Your earlier rule (x + y, x − y) isn’t a reflection; it distorts lengths, so it couldn’t match “mirror + turn.”

    If you like quick, reliable methods, 2×2 matrices are your best pocket tool. Reflection in y = x is the swap matrix [[0, 1], [1, 0]], and 90° CCW rotation is [[0, −1], [1, 0]]. Multiply in the order you perform them: rotation × reflection = [[−1, 0], [0, 1]] (reflect in the y-axis). If you swap the order (reflect after rotating), you get [[1, 0], [0, −1]] (reflect in the x-axis). So yes, the order matters-just like putting on socks before shoes vs. after!

    Follow-up: Want to try one more? What single transformation do you get if you reflect in y = −x and then rotate 90° counterclockwise-and how does it change if you reverse the order?

  2. Reflect in y = x swaps coordinates (x, y) → (y, x) and a 90° CCW rotation is (x, y) → (−y, x), so doing them in that order gives (x, y) → (−x, y), hence P→(−2, −3), Q→(−4, 1), R→(0, 0); reversing the order gives (x, y) → (x, −y), so the images differ and the order matters. A quick check I rely on is the 2×2 matrices S=[[0,1],[1,0]] (reflect y=x) and R=[[0,−1],[1,0]] (90° CCW), with R·S=[[-1,0],[0,1]] and S·R=[[1,0],[0,−1]]-I finally stopped second‑guessing after keeping these on a sticky note and just multiplying to confirm the order.

  3. Short rules you can trust
    – Reflect in the line y = x: (x, y) → (y, x).
    – Rotate 90° counterclockwise about the origin: (x, y) → (−y, x).
    – Reflections and rotations do not, in general, commute. Order matters.

    Your example: reflect in y = x, then rotate 90° CCW
    1) Start with a general point (x, y).
    – After reflecting in y = x: (y, x).
    – Then rotate 90° CCW: (−x, y).

    So the combined effect is (x, y) → (−x, y). That’s simply a reflection in the y-axis.

    Apply this to the triangle:
    – P(2, −3) → (−2, −3)
    – Q(4, 1) → (−4, 1)
    – R(0, 0) → (0, 0)

    If you swap the order (rotate first, then reflect in y = x)
    1) Start with (x, y).
    – Rotate 90° CCW: (−y, x).
    – Reflect in y = x: (x, −y).

    So the combined effect is (x, y) → (x, −y), which is a reflection in the x-axis.

    Apply once to see the difference:
    – P(2, −3) → (2, 3) (not the same as (−2, −3))
    Hence, the order matters here.

    Fixing the two mistakes in your attempt
    – Reflection in y = x is not (x + y, x − y); it is just swapping the coordinates: (x, y) → (y, x).
    – A 90° rotation is never the identity unless the point is at the origin. The correct 90° CCW rule is (x, y) → (−y, x).

    A quick, reliable 2×2 matrix method
    – Write each transformation as a 2×2 matrix acting on column vectors.
    – Reflect in y = x: S = [[0, 1], [1, 0]].
    – Rotate 90° CCW: R = [[0, −1], [1, 0]].
    – Composition “reflect then rotate” corresponds to the product R·S (note the order: the rightmost matrix acts first):
    – R·S = [[0, −1], [1, 0]] · [[0, 1], [1, 0]] = [[−1, 0], [0, 1]].
    – That matrix sends (x, y) to (−x, y): reflection in the y-axis.
    – The reversed order S·R = [[1, 0], [0, −1]] is reflection in the x-axis.

    This matrix approach is not overkill. It is the cleanest way to combine transformations and avoids re-deriving rules.

    Simple worked example (single point)
    – Start with A(1, 2).
    – Reflect then rotate: (1, 2) → (2, 1) → (−1, 2).
    – Rotate then reflect: (1, 2) → (−2, 1) → (1, −2).
    Different results, as expected.

    Handy cheatsheet
    – Reflect in x-axis: (x, −y).
    – Reflect in y-axis: (−x, y).
    – Reflect in y = x: (y, x).
    – Rotate 90° CCW: (−y, x); 90° CW: (y, −x); 180°: (−x, −y).

    For a clear overview of composing transformations with matrices, see Khan Academy: https://www.khanacademy.org/math/linear-algebra/matrix-transformations/compositions-of-transformations/a/compositions-of-linear-transformations

Leave a Reply

Your email address will not be published. Required fields are marked *

Join Our Community

Ready to make maths more enjoyable, accessible, and fun? Join a friendly community where you can explore puzzles, ask questions, track your progress, and learn at your own pace.

By becoming a member, you unlock:

  • Access to all community puzzles
  • The Forum for asking and answering questions
  • Your personal dashboard with points & achievements
  • A supportive space built for every level of learner
  • New features and updates as the Hub grows