Across the x-axisFlips the curve upside down — every point (x, y) becomes (x, −y).Across the y-axisMirror image left ↔ right — every point (x, y) becomes (−x, y).Across the line y = xSwaps x and y coordinates. Reflects every point of f across the diagonal.Across the horizontal line y = cMirrors the curve across a horizontal line. Each (x, y) becomes (x, 2c − y).Across the vertical line x = cMirrors the curve across a vertical line. Each (x, y) becomes (2c − x, y).|f(x)| — output absolute valueReflects only the parts of f below the x-axis. Non-negative parts stay put.f(|x|) — input absolute valueReplaces the left half of the graph with a mirror copy of the right half.
No parameters for this reflection — see the Explanation panel.
Reflection — A geometric transformation that produces the mirror image of a curve across a chosen axis or line.
Axis of reflection — The line that acts as the mirror. Every point of the original is mapped to a partner the same perpendicular distance on the opposite side.
Even function — A function satisfying f(−x)=f(x). Its graph is unchanged by the y-axis reflection.
Odd function — A function satisfying f(−x)=−f(x). Its graph is unchanged by a 180° rotation about the origin.
One-to-one — A function where every output corresponds to exactly one input. Only one-to-one functions have inverses that are themselves functions.
Inverse function — The reflection of f across the line y=x. Written f−1, it satisfies f−1(f(x))=x.
Fixed point — A point that does not move under a transformation. For reflection across an axis, fixed points are those already sitting on the axis.
Getting Started
The visualizer has three columns. On the left is the base function picker with ten families. In the center sits the plot with the original curve f in slate gray and the reflected curve g in blue. On the right are the explanation panel and the reflection tab strip with seven tabs.
The page launches with the quadratic as base and the x-axis reflection active, so g(x)=−x2 appears as the upside-down parabola.
To explore, click a different base in the left column or pick a different reflection tab on the right. Equation badges above the plot rewrite to match. Tabs whose reflection has no parameters apply instantly; the y = c and x = c tabs expose a slider for the line offset c, which you can drag, animate, or step through.
Choosing a Base Function
The left column lists ten common function families, with sine and cosine grouped under Trigonometric. Each entry shows a small glyph of the family's characteristic shape next to its name.
Click any family to load it as the new f. The plot redraws with the original curve and the reflected curve, the equation badges update, and the explanation panel rewrites its "Applied to" section to describe what the current reflection does to this specific family.
Some families have symmetry properties that make certain reflections trivial — reflecting an even function across the y-axis leaves it unchanged, for example, and the explanation panel calls this out explicitly. Other families have restricted domains — the square root and the logarithm only exist for positive inputs — and reflections that flip the input swap the domain to the other side of the y-axis.
The Seven Reflection Tabs
Seven tabs on the right control which reflection applies to the current base.
x-axis (g(x)=−f(x)) — flips the curve upside down through the x-axis
y-axis (g(x)=f(−x)) — mirrors the curve left to right across the y-axis
y = x — swaps x and y coordinates; produces the inverse function, or all branches if f is not one-to-one
y = c (g(x)=2c−f(x)) — mirrors across a horizontal line; the slider controls c
x = c (g(x)=f(2c−x)) — mirrors across a vertical line; the slider controls c
|f| (g(x)=∣f(x)∣) — partial reflection: flips only the parts of f below the x-axis
f(|x|) (g(x)=f(∣x∣)) — replaces the left half of f with a mirror of the right half
Hover any tab to see its formula and a one-line description in a tooltip.
The Parameter Tabs: y = c and x = c
The y = c and x = c tabs each expose a slider controlling the line offset c. Values range from −6 to 6 in steps of 0.1, with a default of c=1.
For y = c, the axis of reflection is the horizontal line y=c, drawn in orange on the plot. Each point (x,y) of f maps to (x,2c−y), the same vertical distance from the line but on the opposite side. When c=0, the result coincides with the x-axis reflection.
For x = c, the axis is the vertical line x=c, marked by an orange band on the plot. Each point (x,y) maps to (2c−x,y) — same height, mirrored left-right. When c=0, the result coincides with the y-axis reflection.
Slider values appear in a small monospace badge on the tab. A Reset button restores the default c=1 for the active tab without disturbing the other.
Manual vs Auto Mode
The y = c and x = c tabs include a Manual / Auto toggle.
In Manual mode (default), drag the slider yourself. Each drag updates the reflection in real time.
In Auto mode, the slider becomes a playback target. A play/pause button starts the animation: c sweeps from minimum to maximum and back, ping-ponging indefinitely. Step backward and step forward buttons let you advance one increment at a time.
Below the play controls, a Speed selector offers four presets: 0.5×, 1×, 2×, and 4×. Slower speeds are best for inspecting how the reflected curve aligns with the axis at specific values of c; faster speeds let you sweep through the full range quickly to see the global pattern.
Auto mode is the fastest way to watch the line of reflection slide and see exactly how the reflected curve tracks the change.
The y = x Reflection and Multivalued Inverses
The y = x tab swaps the roles of x and y, mapping each point (x,y) of f to (y,x).
For one-to-one functions — linear, cubic, reciprocal, exponential, logarithmic, and square root in this set — the reflection is itself a function: the inversef−1. The two curves form a perfect mirror image across the orange diagonal.
For functions that are not one-to-one, the reflection is multivalued — a single x can correspond to multiple y values. The visualizer plots all branches of the reflection:
Quadratic→±x — two branches forming a sideways parabola
Absolute value→±x for x≥0 — two rays forming a sideways V
Sine→arcsin(x)+2πk and π−arcsin(x)+2πk — many periodic branches
Cosine→±arccos(x)+2πk — many periodic branches
To get a single-valued inverse from one of these, you must restrict f to a principal branch before reflecting.
Partial Reflections: |f(x)| and f(|x|)
Two tabs perform reflections that affect only part of the graph.
|f(x)| keeps the portion of f that sits on or above the x-axis and flips the portion below up. The roots of f become corners of ∣f∣ — the curve touches the x-axis and bounces. Applied to the quadratic, ∣f∣ has no effect (the parabola is already non-negative). Applied to the cubic or to sine, the negative arches flip into matching positive ones.
f(|x|) uses the right half of f for both sides. For x≥0, g(x)=f(x) unchanged. For x<0, g(x)=f(−x) — the right half mirrored over. The result is always even, no matter what f is.
The two are easy to confuse. The mnemonic: outer absolute value acts on outputs (flips below up); inner absolute value acts on inputs (mirrors the right onto the left).
What is a Reflection?
A reflection of a function f across a chosen axis or line produces a new function g whose graph is the mirror image of f across that axis. The defining property is that every point of f has a partner on g at the same perpendicular distance from the axis, on the opposite side.
The standard reflections fall into three groups:
Axis reflections — across the x-axis (g(x)=−f(x)) or the y-axis (g(x)=f(−x))
Line reflections — across any horizontal line y=c, vertical line x=c, or the diagonal y=x
Partial or piecewise reflections — ∣f(x)∣ and f(∣x∣), which only affect part of the graph
All reflections are isometries in the plane: they preserve distances, so the shape of f is preserved and only its orientation changes. For a deeper treatment of reflections as rigid motions, see the geometric transformations page.
Reflections, Symmetry, and Function Types
Reflections are tied to symmetry properties of functions.
A function is even when f(−x)=f(x) — its graph is symmetric about the y-axis. Equivalently, the y-axis reflection of an even function is identical to the function itself. Examples: x2, ∣x∣, cosx.
A function is odd when f(−x)=−f(x) — its graph has 180° rotational symmetry about the origin. The y-axis reflection of an odd function gives the same result as the x-axis reflection. Examples: x, x3, sinx, 1/x.
A function is one-to-one when each output corresponds to exactly one input. The y = x reflection of a one-to-one function is itself a function — the inverse. Without one-to-one-ness, the reflection across y=x is multivalued.
These symmetries are encoded in the visualizer's explanation panel, which recognizes the active base's type and adapts the "applied" notes accordingly.
Reflection Across the X-Axis
The simplest flip: g(x)=−f(x) negates every output, turning the whole curve upside down through the x-axis.
x-axis flip, frozen
The parabola and its upside-down twin pinching together at the origin — roots are the fixed points of this mirror.
Everything on the axis stays put — roots of f are fixed points of this reflection, which is why the frozen parabola and its flipped twin pinch together exactly at the origin. Above and below simply trade places: maxima become minima, valleys become peaks.
For odd functions the x-axis flip coincides with the y-axis flip — one of the identities the symmetry section collects.
This reflection is also the c=0 special case of the horizontal-line family, the first rung of a whole ladder of mirrors.
Reflection Across the Y-Axis
The left-right mirror: g(x)=f(−x) negates every input, so the curve's left and right halves swap sides.
y-axis flip, frozen
√x lives on the right; √(−x) lives entirely on the left — the mirror relocated the domain itself.
The frozen square root makes the move unmistakable: x lives on the right half-line, and −x lives entirely on the left — the reflection relocated the domain itself, not just the shape.
Even functions are invisible to this mirror: x2, ∣x∣, and cosx map onto themselves, which is precisely what "even" means. Odd functions land on their own x-axis reflection instead.
Input-side and output-side negation are the two atoms of reflection; every other tab combines or restricts them.
Reflection Across the Line y = x
The diagonal mirror swaps coordinates outright: every point (x,y) of f becomes (y,x) — the reflection that manufactures inverse functions.
Diagonal mirror, frozen
Reflecting x² across the amber diagonal stacks two branches over each input — a multivalued inverse, both branches drawn.
The frozen parabola shows the catch: reflecting x2 produces the sideways parabola x=y2, whose two branches ±x stack two outputs over each input. The reflection of a graph is always a set of points — it is a function only when f was one-to-one.
That is the horizontal line test seen geometrically: horizontal lines through f become vertical lines through the reflection, and multiple crossings become multiple branches.
Points on the diagonal itself — where f(x)=x — do not move: fixed points of the mirror, and the pivots around which function and inverse rotate into each other.
Reflection Across a Horizontal Line
Raising the mirror off the axis: g(x)=2c−f(x) reflects the curve across y=c, with the slider (or the animation) moving the mirror in real time.
Mirror at y = 1, frozen
The parabola and its reflection 2 − x² crossing exactly on the amber line — the fixed points where f(x) = c.
The algebra reads as a recipe: flip across the x-axis (−f), then shift up by twice the mirror height (+2c). At the frozen c=1, the parabola x2 becomes the downward 2−x2, and the two curves cross exactly on the amber line — the fixed points where f(x)=c.
Animating c is this tab's best trick: the reflected curve slides while the original stands still, making the mirror's role kinetic instead of static.
Setting c=0 collapses this family back to the plain x-axis reflection — the whole tab is that one move, parametrized.
Reflection Across a Vertical Line
The vertical counterpart: g(x)=f(2c−x) mirrors the curve across x=c, moving the y-axis mirror to any position.
Mirror at x = 1, frozen
Two square roots opening toward each other, meeting on the vertical amber mirror.
The frozen square root tells the story: x opens rightward from the origin, and 2−x opens leftward from x=2 — the two curves meeting on the amber mirror at x=1, where 2c−x=x.
The composition reading — shift, y-axis flip, shift back — is the standard trick for moving any axis-based operation to an arbitrary line, and it reappears throughout transformation theory.
Together with the horizontal-line tab, this completes the free-mirror pair: any horizontal or vertical line in the plane can now serve as an axis of symmetry.
Output Reflection: |f(x)|
The first partial reflection: g(x)=∣f(x)∣ flips only the parts of the curve below the x-axis, leaving everything non-negative untouched.
|f(x)|, frozen
The rectified sine: every dip bounced upward, corners where the wave used to cross zero.
The frozen sine wave becomes the rectified ∣sinx∣: every dip bounces upward, the period halves to π, and the roots of f turn into corners — the curve touches the axis and rebounds instead of crossing.
Those corners are the visible cost of the operation: wherever f crossed zero transversally, ∣f∣ is continuous but not differentiable.
Unlike the full x-axis reflection, which moves the whole curve, this one is conditional — a reflection applied pointwise only where the output is negative. Its input-side sibling is f(|x|).
Input Reflection: f(|x|)
The second partial reflection works on inputs: g(x)=f(∣x∣) evaluates f only at non-negative arguments, so the right half of the graph is duplicated leftward as a mirror image.
f(|x|), frozen
A left half conjured from nothing: √|x| mirrors the right branch of √x into a fully even curve.
The frozen square root is the dramatic case: x has no left half at all, yet ∣x∣ conjures one — a full symmetric curve manufactured from half a function. Whatever f does for x<0 is discarded, sight unseen.
The output is always even, regardless of what f was: g(−x)=f(∣−x∣)=f(∣x∣)=g(x) by construction. This tab is a machine for forcing y-axis symmetry.
Together with |f(x)|, it completes the partial-reflection pair the tabs overview groups at the end: one folds outputs, one folds inputs.
Related Concepts
Function Transformations — the companion visualizer for shifts and scales: g(x)=a⋅f(b(x−h))+k. Reflections are the special case where a=−1 or b=−1.
Inverse Functions — the formal theory of f−1, when it exists, and how to compute it analytically.
Even and Odd Functions — full treatment of the two main symmetry types and their consequences for integration and Fourier series.
Composition of Functions — how multiple reflections can be chained (two reflections in a row give a rotation or translation).
Parent Functions — the canonical untransformed members of each family used as the base here.
Absolute Value Function — the specific function ∣x∣, whose graph appears in both the ∣f(x)∣ and f(∣x∣) partial reflections.
Symmetry in Geometry — broader perspective on reflection as a geometric operation, beyond functions.