In short
y = -f(x) reflects the graph of f in the x-axis (flip top-to-bottom). y = f(-x) reflects it in the y-axis (flip left-to-right). y = |f(x)| takes every negative output and makes it positive — any part of the curve below the x-axis gets flipped above it. y = f(|x|) keeps the right half of the graph and mirrors it onto the left, creating a symmetric curve. y = [f(x)] maps every output to its greatest integer (floor), producing a step-like version of the curve.
You are standing at the edge of a still lake, looking at a temple on the far bank. The temple and its reflection in the water are identical in shape, but the reflection is upside down — every point above the waterline has a twin the same distance below it. That waterline is the x-axis. The transformation that produces the reflection is y = -f(x).
Now imagine a different kind of mirror — a tall vertical mirror placed along the y-axis. The right side of the temple produces a mirror image on the left. That is y = f(-x).
These two reflections, plus the absolute-value and greatest-integer transformations, complete your toolkit for reshaping graphs.
Reflection in the x-axis: y = -f(x)
Take f(x) = x^2 - 4, a parabola with vertex at (0, -4) and roots at x = \pm 2. What does y = -f(x) = -(x^2 - 4) = -x^2 + 4 look like?
Every output is negated. A point that was at y = -4 (the vertex) moves to y = 4. A point that was at y = 0 (the roots) stays at y = 0. A point that was at y = 5 moves to y = -5. The curve flips upside down, with the x-axis as the mirror line.
Reflection in the $x$-axis
The graph of y = -f(x) is the graph of y = f(x) reflected in the x-axis. Every point (a, b) maps to (a, -b). Points on the x-axis (where f(x) = 0) remain fixed.
This follows the outside-rule pattern from translations and scaling: the negation is applied to the output (y-side), so it acts directly on the y-coordinates. Positive outputs become negative, and negative outputs become positive.
Reflection in the y-axis: y = f(-x)
Take f(x) = \sqrt{x}, defined for x \ge 0, with the curve rising to the right. What does y = f(-x) = \sqrt{-x} look like?
This function is defined when -x \ge 0, that is, x \le 0. At x = -1: \sqrt{-(-1)} = \sqrt{1} = 1. At x = -4: \sqrt{-(-4)} = \sqrt{4} = 2. The curve is a mirror image of \sqrt{x}, extending to the left instead of the right.
Reflection in the $y$-axis
The graph of y = f(-x) is the graph of y = f(x) reflected in the y-axis. Every point (a, b) maps to (-a, b). Points on the y-axis (where x = 0) remain fixed.
This follows the inside-rule: the negation is applied to the input (x-side), so it acts in the opposite direction on the x-coordinates. Left becomes right, and right becomes left.
Connection to even and odd functions
A function is even if f(-x) = f(x) for all x — its graph is symmetric about the y-axis. Reflecting it changes nothing. Examples: x^2, \cos x, |x|.
A function is odd if f(-x) = -f(x) for all x — reflecting in the y-axis gives the same result as reflecting in the x-axis. The graph has rotational symmetry about the origin. Examples: x^3, \sin x, 1/x.
The absolute value of a function: y = |f(x)|
This transformation keeps all the positive parts of the graph untouched and flips the negative parts above the x-axis. Any portion of the curve that dips below the x-axis is reflected upward — like folding a sheet of paper along the x-axis.
Take f(x) = x^2 - 4 again. Below the x-axis (between x = -2 and x = 2), f is negative. The absolute value flips that portion up:
Key observations about y = |f(x)|:
- The graph is never below the x-axis. The range changes from [m, M] to [0, M] (if m < 0), or more precisely, the minimum value of |f(x)| is either 0 (if f crosses the x-axis) or \min(|m|, |M|).
- Sharp corners (cusps) appear at every x-intercept of f, because the slope jumps from negative to positive (or vice versa) at those points.
- If f(x) \ge 0 everywhere, then |f(x)| = f(x) — nothing changes.
Absolute value of the input: y = f(|x|)
This one is different. Instead of taking the absolute value of the output, you take the absolute value of the input before feeding it to f.
Since |x| = x when x \ge 0 and |x| = -x when x < 0, the function f(|x|) uses the right-half graph of f for x \ge 0 and reflects it onto the left half. The left side of the original is discarded.
Take f(x) = x^2 - 2x, a parabola with vertex at (1, -1) and roots at x = 0 and x = 2. The graph of y = f(|x|) = |x|^2 - 2|x| = x^2 - 2|x|:
For x \ge 0: this is just x^2 - 2x — unchanged. For x < 0: f(|x|) = f(-x) = (-x)^2 - 2(-x) = x^2 + 2x, which is the mirror image of the right half.
The result of y = f(|x|) is always symmetric about the y-axis. This is guaranteed because f(|-x|) = f(|x|), so the function values at x and -x are always equal.
The greatest integer function: y = [f(x)]
The greatest integer function [t] (also written \lfloor t \rfloor) returns the largest integer less than or equal to t. For example: [3.7] = 3, [5] = 5, [-1.2] = -2, [-3] = -3.
Applying this to a function f: y = [f(x)] takes each output value and rounds it down to the nearest integer. The smooth curve becomes a series of horizontal steps.
Take f(x) = x, the identity line. The graph of y = [x] is a staircase: on the interval [0, 1), the value is 0. On [1, 2), the value is 1. On [-1, 0), the value is -1. Each step is a half-open interval — closed on the left, open on the right.
For a general function, y = [f(x)] produces a stepped version of the curve. Wherever f(x) is between two consecutive integers n and n+1, the output of [f(x)] is n. The steps jump at every point where f(x) is an integer.
Two worked examples
Example 1: Combining reflection with absolute value
Sketch the graph of y = |2 - x^2| and find its range.
Step 1. Rewrite the function. Note that 2 - x^2 = -(x^2 - 2). So |2 - x^2| = |-(x^2 - 2)| = |x^2 - 2|. The absolute value absorbs the leading negative sign.
Why: |{-t}| = |t| for all t. This simplifies the analysis — you only need to study g(x) = x^2 - 2 and then take its absolute value.
Step 2. Analyse g(x) = x^2 - 2. This is a parabola with vertex at (0, -2) and roots at x = \pm\sqrt{2} \approx \pm 1.41. It is negative between -\sqrt{2} and \sqrt{2}, and positive outside that interval.
Why: finding where g is negative tells you exactly which part of the curve gets flipped by the absolute value.
Step 3. Apply the absolute value. For |x| \ge \sqrt{2}: g(x) \ge 0, so |g(x)| = g(x) = x^2 - 2. Unchanged. For |x| < \sqrt{2}: g(x) < 0, so |g(x)| = -(x^2 - 2) = 2 - x^2. This flips the valley into a hill.
Why: the negative portion (the valley between the roots) is reflected upward. The vertex at (0, -2) becomes the peak at (0, 2).
Step 4. Find the range. The function is always \ge 0 (absolute value). The minimum value is 0, occurring at x = \pm\sqrt{2} (the roots of g). The function grows without bound as |x| \to \infty. The range is [0, \infty).
Result: y = |2 - x^2| has a W-shaped graph. It touches the x-axis at x = \pm\sqrt{2}, has a local maximum of 2 at x = 0, and its range is [0, \infty).
The sharp corners at x = \pm\sqrt{2} are characteristic of absolute-value graphs. The slope changes sign abruptly because the curve transitions from the original to its reflection.
Example 2: Reflecting and translating together
The graph of y = f(x) is known. Sketch y = -f(x - 1) + 2 and describe each transformation applied to the point (3, 5) on the original graph.
Step 1. Identify the transformations. Reading inside-out: replace x with x - 1 (shift right 1), then negate the output (reflect in x-axis), then add 2 (shift up 2).
Why: reading from the innermost modification outward ensures each transformation is applied in the correct order.
Step 2. Track the point (3, 5) through each step. Start: (3, 5).
After shifting right by 1: the point that produces f(3) is now at x = 4. So the point becomes (4, 5).
Why: f((4) - 1) = f(3) = 5. The point has moved right by 1.
Step 3. Apply reflection in the x-axis. The y-coordinate is negated: (4, 5) \to (4, -5).
Why: the negative sign in front of f flips 5 to -5.
Step 4. Apply vertical translation up by 2. The y-coordinate increases by 2: (4, -5) \to (4, -3).
Why: adding 2 to -5 gives -3. The final point is (4, -3).
Result: The point (3, 5) on y = f(x) maps to (4, -3) on y = -f(x-1) + 2. The combined transformation shifts right 1, reflects in the x-axis, and shifts up 2.
The combination of reflection and translation is common in exam questions. The key is to apply the transformations in order, tracking one or two specific points to verify your work.
Common confusions
-
"y = -f(x) and y = f(-x) are the same transformation." They are not. y = -f(x) flips the graph top-to-bottom (across the x-axis). y = f(-x) flips it left-to-right (across the y-axis). The only functions for which they produce the same graph are odd functions, where f(-x) = -f(x).
-
"y = |f(x)| just makes everything positive." It makes the outputs non-negative, but it does not change the inputs or the domain. The graph is not simply "shifted up" — the negative portions are reflected, creating sharp corners at the x-intercepts.
-
"y = f(|x|) keeps both halves of the original." No — it discards the left half of the original and replaces it with a mirror image of the right half. The resulting graph is always symmetric about the y-axis, even if f itself is not.
-
"The greatest integer function [x] rounds to the nearest integer." It does not round — it takes the floor (rounds down). [2.9] = 2 (not 3), and [-0.1] = -1 (not 0). The function always goes to the integer at or below the value.
-
"Reflections change the domain and range the same way." Reflection in the x-axis (y = -f(x)) negates the range but keeps the domain. Reflection in the y-axis (y = f(-x)) negates the domain but keeps the range. Each reflection affects only the axis it mirrors across.
Going deeper
If you can sketch y = -f(x), y = f(-x), y = |f(x)|, and y = f(|x|) from a given graph of f, and combine them with translations and scaling, you are well-equipped for transformation questions at any level. The rest of this section covers the formal details.
Composition of reflections
Reflecting in the x-axis and then in the y-axis (or vice versa) produces a rotation by 180° about the origin:
This maps every point (a, b) to (-a, -b). The graph looks like the original rotated half a turn. For odd functions, this rotation brings the graph back to itself — which is why odd functions have rotational symmetry about the origin.
Interactive: reflection explorer
Drag the toggle below to switch between y = f(x), y = -f(x), y = f(-x), and y = |f(x)|.
The fractional part function
The fractional part of x, written \{x\} = x - [x], measures how far x is above its floor. For x = 3.7: \{3.7\} = 3.7 - 3 = 0.7. For x = -1.2: \{-1.2\} = -1.2 - (-2) = 0.8.
The graph of y = \{x\} is a sawtooth wave: it rises linearly from 0 to 1 on each interval [n, n+1), then drops back to 0. The range is always [0, 1).
This connects to the greatest integer function: x = [x] + \{x\}, so the floor and the fractional part together reconstruct the original number.
Where this leads next
You now have the complete set of graph transformations: translations, scaling, and reflections. Combined, they let you sketch any function of the form y = A\,f(B(x - h)) + k from the parent graph.
- Graph Transformations — Translations — shifting a graph horizontally and vertically, the first transformation in the toolkit.
- Graph Transformations — Scaling — stretching and compressing a graph, the second transformation.
- Even and Odd Functions — functions whose graphs have built-in symmetry. Reflections reveal why even functions are symmetric about the y-axis and odd functions about the origin.
- Special Functions — Part 1 — the greatest integer function, fractional part function, and signum function explored in detail.
- Absolute Value Equations — solving equations involving absolute values, where the graphical picture from y = |f(x)| becomes a powerful tool.