Squaring and square-rooting are inverse operations. If y = x^2 and you want to recover x, you take the square root: x = \sqrt{y}. The two undo each other. That is the algebraic story, and it is usually where the conversation ends. But there is a geometric story too. On a graph, the curves y = x^2 and y = \sqrt{x} are mirror images of each other across the line y = x. Not approximately — exactly. Fold the paper along the diagonal and the parabola lands precisely on the square-root curve. This page gives you a widget that performs that fold in slow motion.

The widget

fold = 0.00; curve is y = x²

The solid curve is the one you control. At fold = 0 it sits on the parabola y = x^2, blue, rising steeply. Drag the slider (or press Play) and every point slides along a straight-line path to its mirror position on the other side of the dashed diagonal. By fold = 1 the whole curve has landed on y = \sqrt{x}, red, rising flatly. The two faint "ghost" curves show start and end shapes for context. A filled dot marks one specific point — watch it travel from (1.5, 2.25) on the parabola to (2.25, 1.5) on the square-root curve. The coordinates have simply been swapped.

Observations

At fold = 0, every point on the curve has the form (u, u^2). At fold = 1, every point has the form (u^2, u). In between, a point starting at (u, u^2) travels in a straight line to (u^2, u). At fold = \tfrac{1}{2} the point is exactly halfway along that line — and you can check by eye that the halfway point lies on the diagonal y = x. That is the key geometric fact: the straight-line path from a point to its mirror image crosses the mirror at the halfway mark, at right angles. The fold slider is literally reflecting the curve across the line y = x.

For intermediate fold values the shape is not even the graph of a function — it may fail the vertical line test. That is fine. The intermediate shapes are just frames; the two endpoints are the functions that matter.

Why the reflection IS the inverse

Algebraically, the inverse of f(x) = x^2 (restricted to x \ge 0) is f^{-1}(y) = \sqrt{y}. Check: f^{-1}(f(x)) = \sqrt{x^2} = x for x \ge 0, and f(f^{-1}(y)) = (\sqrt{y})^2 = y for y \ge 0. The two are inverses.

Geometrically, the graph of y = f(x) is the set of points (x, f(x)). The graph of its inverse is the set of points (x, f^{-1}(x)) — which, by the definition of the inverse, is the same as the set of points (f(x), x), with the two coordinates swapped. Swapping x and y for every point on the plane is exactly a reflection across the line y = x. So the graph of f^{-1} is the reflection of the graph of f across the diagonal. Every function-and-inverse pair are mirror images, with y = x as the mirror.

Check a point

Pick the point (2, 4): it lies on y = x^2 because 2^2 = 4. Reflect across y = x — swap coordinates — to get (4, 2). Is (4, 2) on y = \sqrt{x}? Plug in x = 4: y = \sqrt{4} = 2. Yes. The same check works for any starting point: (3, 9) reflects to (9, 3), and \sqrt{9} = 3. The fold is not an accident of the animation — it is the content of the inverse relationship.

Why the domain is x ≥ 0

There is a subtlety in the phrase "inverse of x^2". The full function y = x^2 on all real x is not one-to-one — both x = 2 and x = -2 give output 4. A function that is not one-to-one has no inverse: there is no single rule that recovers the input. To get an inverse you restrict x^2 to a region where it is one-to-one, and the standard choice is x \ge 0. The right half of the parabola is one-to-one, and its inverse is \sqrt{x} — the "principal" (positive) square root.

This is why \pm appears when you solve quadratic equations. If x^2 = 9, the algebra says x = \pm 3. But \sqrt{9} returns only 3, not -3 — the radical symbol is defined to return the principal root, and the \pm is added separately when solving. The widget shows only the x \ge 0 branch, whose inverse is \sqrt{x}. The x < 0 branch has its own inverse -\sqrt{x}.

The general pattern

The n = 2 story generalises. For any positive integer n, the function f(x) = x^n (restricted to x \ge 0 when n is even) has inverse \sqrt[n]{x}. Cubing and cube-rooting are a pair; fourth powers and fourth roots are a pair; and so on. Every such pair, drawn on the same axes, is a pair of mirror images across y = x. When n is odd, the restriction x \ge 0 is not even needed — x^n is already one-to-one on all reals.

The identity (x^n)^{1/n} = x^{n \cdot 1/n} = x^1 = x is the algebraic echo of the geometric fact you just watched: apply the power, then the root, and you get back what you started with. See Radicals and Rational Exponents for the algebraic side.

Why the line y = x matters

The line y = x is the set of points where the two coordinates are equal — every such point is unchanged by the swap (x, y) \leftrightarrow (y, x). Every other point moves. So the line is the "fixed line" of the swap, and reflecting across it is the geometric realisation of the swap itself. "Swap x and y" and "reflect across y = x" are two descriptions of the same operation.

A function whose graph crosses y = x at a point (a, a) has f(a) = a — a fixed point. If the function has an inverse, the inverse also passes through (a, a), because the point is its own mirror image. Fixed points of a function and its inverse are the same points.

Closing

Inverse functions are not abstract bookkeeping. They are a geometric reflection — a fold across the diagonal — that you can watch happen in real time. Once the fold is in your head, the square root stops being a new rule and becomes exactly what the name says: a mirror image of squaring. The same mirror sends every power to its corresponding root. Next time someone asks what it means for two functions to be inverses, you can answer with a picture instead of a formula.