# Nakafa Framework: LLM

URL: /en/subject/high-school/11/mathematics/geometric-transformation/reflection-over-y-equals-minus-x
Source: https://raw.githubusercontent.com/nakafaai/nakafa.com/refs/heads/main/packages/contents/subject/high-school/11/mathematics/geometric-transformation/reflection-over-y-equals-minus-x/en.mdx

Output docs content for large language models.

---

import { getColor } from "@repo/design-system/lib/color";
import { LineEquation } from "@repo/design-system/components/contents/line-equation";

export const metadata = {
  title: "Reflection over Line y = -x",
  description: "Explore diagonal line reflections y = -x with comprehensive tutorials. Master coordinate swapping rule P'(-y, -x) through detailed examples.",
  authors: [{ name: "Nabil Akbarazzima Fatih" }],
  date: "05/10/2025",
  subject: "Geometric Transformation",
};

## Understanding Reflection over the Line y = -x

Reflection over the line <InlineMath math="y = -x" /> is a geometric transformation where each point of an object is mapped to a new position, with the line <InlineMath math="y = -x" /> acting as a mirror.

The line connecting the original point to its image will be perpendicular to the line <InlineMath math="y = -x" />, and the distance from the original point to the mirror line is equal to the distance from its image to the mirror line.

### Rule for Reflection over the Line y = -x

If a point <InlineMath math="P(x, y)" /> is reflected over the line <InlineMath math="y = -x" />, its image's coordinates, <InlineMath math="P'(x', y')" />, are determined by the rule:

<div className="flex flex-col gap-4">
  <BlockMath math="x' = -y" />
  <BlockMath math="y' = -x" />
</div>

Thus, the image of point <InlineMath math="P(x, y)" /> is <InlineMath math="P'(-y, -x)" />. Notice that the x and y coordinates swap places AND change signs (become their negatives).

## Reflecting a Point

Suppose we have point <InlineMath math="D(2, 1)" />. If point D is reflected over the line <InlineMath math="y = -x" />, its image, <InlineMath math="D'" />, is:

<div className="flex flex-col gap-4">
  <BlockMath math="x' = -(1) = -1" />
  <BlockMath math="y' = -(2) = -2" />
</div>

Thus, the image of point D is <InlineMath math="D'(-1, -2)" />.

Let's visualize the reflection of several points over the line <InlineMath math="y = -x" />:

<LineEquation
  title={
    <>
      Image of Points over the Line <InlineMath math="y=-x" />
    </>
  }
  description={
    <>
      Visualization of the reflection of several points over the line{" "}
      <InlineMath math="y=-x" />.
    </>
  }
  data={[
    {
      points: [
        { x: -6, y: 6, z: 0 },
        { x: 6, y: -6, z: 0 },
      ],
      color: getColor("INDIGO"),
      labels: [{ text: "y=-x", at: 1, offset: [0.5, 0.5, 0] }],
    }, // Line y=-x
    // Point A and A'
    {
      points: [{ x: -2, y: 4, z: 0 }],
      color: getColor("AMBER"),
      showPoints: true,
      labels: [{ text: "A(-2,4)", at: 0, offset: [0.3, 0.3, 0] }],
    },
    {
      points: [{ x: -4, y: 2, z: 0 }],
      color: getColor("AMBER"),
      showPoints: true,
      labels: [{ text: "A'(-4,2)", at: 0, offset: [0.3, 0.3, 0] }],
    },
    // Point D and D'
    {
      points: [{ x: 2, y: 1, z: 0 }],
      color: getColor("SKY"),
      showPoints: true,
      labels: [{ text: "D(2,1)", at: 0, offset: [0.3, 0.3, 0] }],
    },
    {
      points: [{ x: -1, y: -2, z: 0 }],
      color: getColor("SKY"),
      showPoints: true,
      labels: [{ text: "D'(-1,-2)", at: 0, offset: [0.3, 0.3, 0] }],
    },
  ]}
  showZAxis={false}
  cameraPosition={[0, 0, 15]}
/>

## Reflecting a Triangle

Determine the image of triangle ABC with vertices <InlineMath math="A(-2,4)" />, <InlineMath math="B(3,1)" />, and <InlineMath math="C(-3,-1)" /> reflected over the line <InlineMath math="y=-x" />.

To reflect the triangle, we reflect each of its vertices:

1.  Point <InlineMath math="A(-2, 4)" />: Its image is <InlineMath math="A'(-4, 2)" />.
2.  Point <InlineMath math="B(3, 1)" />: Its image is <InlineMath math="B'(-1, -3)" />.
3.  Point <InlineMath math="C(-3, -1)" />: Its image is <InlineMath math="C'(1, 3)" />.

The image triangle <InlineMath math="A'B'C'" /> is formed by connecting the points <InlineMath math="A'(-4, 2)" />, <InlineMath math="B'(-1, -3)" />, and <InlineMath math="C'(1, 3)" />.

<LineEquation
  title={
    <>
      Triangle <InlineMath math="ABC" /> and its Image{" "}
      <InlineMath math="A'B'C'" /> over <InlineMath math="y=-x" />
    </>
  }
  description={
    <>
      Visualization of the reflection of triangle <InlineMath math="ABC" /> over
      the line <InlineMath math="y=-x" />.
    </>
  }
  data={[
    {
      points: [
        { x: -7, y: 7, z: 0 },
        { x: 7, y: -7, z: 0 },
      ],
      color: getColor("INDIGO"),
      labels: [{ text: "y=-x", at: 1, offset: [0.5, 0.5, 0] }],
    }, // Line y=-x
    // Triangle ABC (Original)
    ...[
      {
        from: { x: -2, y: 4, z: 0, label: "A(-2,4)" },
        to: { x: 3, y: 1, z: 0, label: "B(3,1)" },
      },
      {
        from: { x: 3, y: 1, z: 0, label: "B(3,1)" },
        to: { x: -3, y: -1, z: 0, label: "C(-3,-1)" },
      },
      {
        from: { x: -3, y: -1, z: 0, label: "C(-3,-1)" },
        to: { x: -2, y: 4, z: 0, label: "A(-2,4)" },
      },
    ].map((segment) => ({
      points: [segment.from, segment.to],
      color: getColor("AMBER"),
      showPoints: true,
      labels: [{ text: segment.from.label, at: 0, offset: [0.4, 0.4, 0] }],
    })),
    // Triangle A'B'C' (Image)
    ...[
      {
        from: { x: -4, y: 2, z: 0, label: "A'(-4,2)" },
        to: { x: -1, y: -3, z: 0, label: "B'(-1,-3)" },
      },
      {
        from: { x: -1, y: -3, z: 0, label: "B'(-1,-3)" },
        to: { x: 1, y: 3, z: 0, label: "C'(1,3)" },
      },
      {
        from: { x: 1, y: 3, z: 0, label: "C'(1,3)" },
        to: { x: -4, y: 2, z: 0, label: "A'(-4,2)" },
      },
    ].map((segment) => ({
      points: [segment.from, segment.to],
      color: getColor("TEAL"),
      showPoints: true,
      labels: [{ text: segment.from.label, at: 0, offset: [0.4, 0.4, 0] }],
    })),
  ]}
  showZAxis={false}
  cameraPosition={[0, 0, 18]}
/>

## Reflecting a Line Equation

If a line has the equation <InlineMath math="y = -4x - 2" /> is reflected over the line <InlineMath math="y=-x" />, determine the equation of its image.

To find the equation of the image, we use the rule <InlineMath math="x' = -y" /> and <InlineMath math="y' = -x" />. This means we replace every <InlineMath math="x" /> in the original equation with <InlineMath math="-y" /> and every <InlineMath math="y" /> with <InlineMath math="-x" />.

Original equation:

<BlockMath math="y = -4x - 2" />

Substitute <InlineMath math="x \rightarrow -y" /> and <InlineMath math="y \rightarrow -x" />:

<BlockMath math="(-x) = -4(-y) - 2" />

Simplify the equation for the image line:

<div className="flex flex-col gap-4">
  <BlockMath math="-x = 4y - 2" />
  <BlockMath math="-x + 2 = 4y" />
  <BlockMath math="y = -\frac{1}{4}x + \frac{2}{4}" />
  <BlockMath math="y = -\frac{1}{4}x + \frac{1}{2}" />
</div>

So, the equation of the image of the line <InlineMath math="y = -4x - 2" /> after reflection over <InlineMath math="y=-x" /> is <InlineMath math="y = -\frac{1}{4}x + \frac{1}{2}" />.

<LineEquation
  title={
    <>
      Line <InlineMath math="y=-4x-2" /> and its Image over{" "}
      <InlineMath math="y=-x" />
    </>
  }
  description={
    <>
      Reflection of the line <InlineMath math="y=-4x-2" /> over the line{" "}
      <InlineMath math="y=-x" />.
    </>
  }
  data={[
    {
      points: [
        { x: -7, y: 7, z: 0 },
        { x: 7, y: -7, z: 0 },
      ],
      color: getColor("INDIGO"),
      labels: [{ text: "y=-x", at: 1, offset: [0.5, 0.5, 0] }],
    }, // Line y=-x
    {
      // Original Line y = -4x - 2
      points: Array.from({ length: 11 }, (_, i) => {
        const xVal = (i - 5) * 0.5; // x range to prevent it from being too steep
        return { x: xVal, y: -4 * xVal - 2, z: 0 };
      }),
      color: getColor("PURPLE"),
      smooth: true,
      labels: [{ text: "y=-4x-2", at: 6, offset: [1, 0.5, 0] }],
    },
    {
      // Image Line y = (-1/4)x + 1/2
      points: Array.from({ length: 11 }, (_, i) => {
        const xVal = (i - 5) * 2; // x range to prevent it from being too flat
        return { x: xVal, y: (-1 / 4) * xVal + 1 / 2, z: 0 };
      }),
      color: getColor("PINK"),
      smooth: true,
      labels: [{ text: "y=(-1/4)x+1/2", at: 8, offset: [0.5, -1, 0] }],
    },
  ]}
  showZAxis={false}
  cameraPosition={[0, 0, 18]}
/>

## Exercises

1.  Determine the coordinates of the image of point <InlineMath math="S(5, -9)" /> if it is reflected over the line <InlineMath math="y = -x" />!
2.  Determine the image of triangle ABC with vertices <InlineMath math="A(1, -2)" />, <InlineMath math="B(2, 3)" />, and <InlineMath math="C(-2, 0)" /> reflected over the line <InlineMath math="y = -x" />.
3.  If a line has the equation <InlineMath math="4x + 3y - 2 = 0" /> is reflected over the line <InlineMath math="y = -x" />, determine the equation of its image.

### Key Answers

1.  The image of point <InlineMath math="S(5, -9)" /> is <InlineMath math="S'(9, -5)" />.

    **Explanation:**

    <div className="flex flex-col gap-4">
      <BlockMath math="x' = -(-9) = 9" />
      <BlockMath math="y' = -(5) = -5" />
    </div>

2.  The coordinates of the image triangle <InlineMath math="A'B'C'" /> are:

    - <InlineMath math="A'(2, -1)" /> (from <InlineMath math="A(1, -2)" />)
    - <InlineMath math="B'(-3, -2)" /> (from <InlineMath math="B(2, 3)" />)
    - <InlineMath math="C'(0, 2)" /> (from <InlineMath math="C(-2, 0)" />)

3.  The equation of the image of the line <InlineMath math="4x + 3y - 2 = 0" /> is <InlineMath math="4(-y) + 3(-x) - 2 = 0" />.

    **Explanation:** Substitute <InlineMath math="x \rightarrow -y" /> and <InlineMath math="y \rightarrow -x" /> into the original equation:

    <div className="flex flex-col gap-4">
      <BlockMath math="4(-y) + 3(-x) - 2 = 0" />
      <BlockMath math="-4y - 3x - 2 = 0" />
      <BlockMath math="3x + 4y + 2 = 0" />
    </div>
