{
  "id": "reflection",
  "version": "937d2fce8d07",
  "status": "published",
  "name": "Reflection Calculator",
  "question": "Where do points go in a reflection?",
  "summary": "Reflects points in the coordinate plane across the x-axis, the y-axis, the origin, y = x, y = −x, a line x = h or y = k, or any line y = mx + b, with the rule and the working.",
  "category": "math",
  "subcategory": "geometry",
  "url": "https://www.acalculator.org/math/reflection-calculator",
  "markdown": "https://www.acalculator.org/math/reflection-calculator.md",
  "kind": "function",
  "method": "x-axis (x, −y); y-axis (−x, y); origin (−x, −y); y = x (y, x); y = −x (−y, −x); x = h (2h − x, y); y = k (x, 2k − y); y = mx + b: d = (x + m(y − b)) ÷ (1 + m²), (2d − x, 2md − y + 2b).",
  "assumptions": [
    "Typed decimals are read exactly, so each image coordinate is the exact value, rounded once to 10 significant figures.",
    "A reflection keeps every length and angle; it flips the figure over the line."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "line": {
        "title": "Reflect across",
        "description": "The line (or point) of reflection.",
        "type": "string",
        "enum": [
          "x",
          "y",
          "o",
          "yx",
          "ynx",
          "v",
          "h",
          "m"
        ]
      },
      "h": {
        "title": "h",
        "description": "Where the vertical line x = h crosses the x-axis.",
        "type": "number",
        "minimum": -1000000000000,
        "maximum": 1000000000000
      },
      "k": {
        "title": "k",
        "description": "Where the horizontal line y = k crosses the y-axis.",
        "type": "number",
        "minimum": -1000000000000,
        "maximum": 1000000000000
      },
      "m": {
        "title": "Slope m",
        "description": "The slope of the line y = mx + b.",
        "type": "number",
        "minimum": -1000000000000,
        "maximum": 1000000000000
      },
      "b": {
        "title": "Intercept b",
        "description": "Where the line y = mx + b crosses the y-axis.",
        "type": "number",
        "minimum": -1000000000000,
        "maximum": 1000000000000
      },
      "points": {
        "title": "Points",
        "description": "The points of the figure to reflect, A, B, C and so on, up to 12.",
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "x": {
              "title": "x",
              "description": "The x coordinate of the point.",
              "type": "number",
              "minimum": -1000000000000,
              "maximum": 1000000000000
            },
            "y": {
              "title": "y",
              "description": "The y coordinate of the point.",
              "type": "number",
              "minimum": -1000000000000,
              "maximum": 1000000000000
            }
          }
        }
      }
    }
  },
  "outputs": {
    "image": {
      "label": "Image points",
      "description": "Each point after the reflection, as A′(x, y); B′(x, y) and so on.",
      "format": "text"
    },
    "rule": {
      "label": "Rule",
      "description": "Where a point (x, y) goes, for the chosen line.",
      "format": "text"
    },
    "steps": {
      "label": "Working",
      "description": "Each point put through the rule.",
      "format": "text"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "line": "x",
      "h": 0,
      "k": 0,
      "m": 1,
      "b": 0,
      "points": [
        {
          "x": 3,
          "y": 2
        },
        {
          "x": 5,
          "y": 2
        },
        {
          "x": 4,
          "y": 6
        }
      ]
    },
    "outputs": {
      "image": "A′(3, −2); B′(5, −2); C′(4, −6)",
      "rule": "(x, y) → (x, −y)",
      "steps": "rule (x, y) → (x, −y); A(3, 2) → A′(3, −2); B(5, 2) → B′(5, −2); C(4, 6) → C′(4, −6)"
    },
    "text": "The image points are A′(3, −2); B′(5, −2); C′(4, −6)."
  },
  "examples": [
    {
      "given": {
        "line": "x",
        "points": [
          {
            "x": 3,
            "y": 2
          }
        ]
      },
      "expect": {
        "image": "A′(3, −2)",
        "rule": "(x, y) → (x, −y)"
      },
      "source": "CK-12 Foundation, Geometry, 8.14 Rules for Reflections ((x, y) → (x, −y) over the x-axis, (−x, y) over the y-axis, (y, x) over y = x, (−y, −x) over y = −x; (3, 2) over the x-axis is (3, −2), over y = x is (2, 3)), https://k12.libretexts.org/Bookshelves/Mathematics/Geometry/08%3A_Rigid_Transformations/8.14%3A_Rules_for_Reflections (retrieved 2026-10-05)"
    },
    {
      "given": {
        "line": "yx",
        "points": [
          {
            "x": 3,
            "y": 2
          }
        ]
      },
      "expect": {
        "image": "A′(2, 3)"
      },
      "source": "CK-12 Foundation, Geometry, 8.14 Rules for Reflections ((x, y) → (x, −y) over the x-axis, (−x, y) over the y-axis, (y, x) over y = x, (−y, −x) over y = −x; (3, 2) over the x-axis is (3, −2), over y = x is (2, 3)), https://k12.libretexts.org/Bookshelves/Mathematics/Geometry/08%3A_Rigid_Transformations/8.14%3A_Rules_for_Reflections (retrieved 2026-10-05)"
    },
    {
      "given": {
        "line": "y",
        "points": [
          {
            "x": 3,
            "y": 2
          },
          {
            "x": -1.5,
            "y": 4
          }
        ]
      },
      "expect": {
        "image": "A′(−3, 2); B′(1.5, 4)"
      },
      "source": "hand calculation in content.mdx: (x, y) → (−x, y); OpenStax, Algebra and Trigonometry 2e, §3.5 Transformation of Functions (−f(x) reflects about the x-axis, f(−x) about the y-axis), https://openstax.org/books/algebra-and-trigonometry-2e/pages/3-5-transformation-of-functions (retrieved 2026-10-05)"
    },
    {
      "given": {
        "line": "v",
        "h": 2,
        "points": [
          {
            "x": 5,
            "y": -1
          }
        ]
      },
      "expect": {
        "image": "A′(−1, −1)"
      },
      "source": "hand calculation in content.mdx: x′ = 2 × 2 − 5 = −1"
    },
    {
      "given": {
        "line": "m",
        "m": 2,
        "b": 1,
        "points": [
          {
            "x": 3,
            "y": 2
          }
        ]
      },
      "expect": {
        "image": "A′(−1, 4)"
      },
      "source": "hand calculation in content.mdx: d = (3 + 2 × (2 − 1)) ÷ 5 = 1, x′ = 2 − 3 = −1, y′ = 2 × 2 × 1 − 2 + 2 = 4; the midpoint (1, 3) is on y = 2x + 1"
    }
  ],
  "sources": [
    "CK-12 Foundation, Geometry, 8.14 Rules for Reflections (the rules over the x-axis, the y-axis, y = x and y = −x; (3, 2) over the x-axis is (3, −2) and over y = x is (2, 3)), on K12 LibreTexts. https://k12.libretexts.org/Bookshelves/Mathematics/Geometry/08%3A_Rigid_Transformations/8.14%3A_Rules_for_Reflections (retrieved 2026-10-05)",
    "OpenStax, Algebra and Trigonometry 2e, §3.5 Transformation of Functions (−f(x) is a reflection about the x-axis and f(−x) about the y-axis), CC BY 4.0. https://openstax.org/books/algebra-and-trigonometry-2e/pages/3-5-transformation-of-functions (retrieved 2026-10-05)"
  ],
  "related": [
    "rotation",
    "dilation",
    "midpoint",
    "distance-formula"
  ],
  "changelog": []
}
