A Function Transformation Calculator Only Ever Solves One Equation
About the Author

A function transformation calculator reads four numbers out of a single template: g(x) = a·f(b(x − h)) + k. Set a = 3 and the graph triples in height. Set k = −5 and it drops five units. Touch b or h and the graph still moves — but sideways, backwards, and by an amount that is often not the number sitting in front of you.
Those four letters cover every shift, stretch, compression and reflection in the Algebra 2 and precalculus syllabus. There is no separate rule for parabolas, no second rule for absolute values, no third for sine waves. Swap the parent function and the arithmetic is identical. What follows is the anatomy of that template: which half of the graph each letter owns, a parent-function table you can read straight off, why f(2x − 6) shifts by 3 rather than 6, and how to run the whole thing backwards when a graph is handed to you without an equation.
Which Half of the Graph Each Letter Owns
Split the template at the function name. Anything outside f acts on outputs, so it changes y-coordinates and does exactly what it says. Anything inside f acts on inputs, so it changes x-coordinates and does the opposite of what it says. That single division explains every rule below.
| Letter | Position | Effect | Reads as written? |
|---|---|---|---|
| a | Outside, multiplying | Vertical stretch by |a|; flips over the x-axis if a < 0 | Yes — a = 3 means three times as tall |
| k | Outside, added | Vertical shift | Yes — k = 4 means up 4 |
| b | Inside, multiplying x | Horizontal scale by 1/|b|; flips over the y-axis if b < 0 | No — b = 3 squeezes to one third |
| h | Inside, subtracted from x | Horizontal shift | No — (x − 4) means right 4 |
Put numbers on it. Suppose the point (2, 5) sits on f. Under g(x) = 3f(x) it becomes (2, 15): the input never changed, only the output tripled. Under g(x) = f(3x) it becomes (2/3, 5) instead — the output is untouched and the input shrank to a third. Same 3, opposite halves of the coordinate, and a good reason to sketch both on a graphing calculator before trusting your instinct.
Ten Parent Graphs and the Anchor Point That Pins Each One
Transformations only make sense relative to a starting shape. These ten parents cover essentially every problem set, and each one has an anchor — the single feature you track first, because once you know where the anchor went, the rest of the curve follows.
| Parent | Domain | Range | Anchor to track |
|---|---|---|---|
| x | (−∞, ∞) | (−∞, ∞) | Passes through (0, 0) |
| x² | (−∞, ∞) | [0, ∞) | Vertex (0, 0) |
| x³ | (−∞, ∞) | (−∞, ∞) | Inflection (0, 0) |
| |x| | (−∞, ∞) | [0, ∞) | Corner (0, 0) |
| √x | [0, ∞) | [0, ∞) | Endpoint (0, 0) |
| 1/x | x ≠ 0 | y ≠ 0 | Asymptote cross (0, 0) |
| eˣ | (−∞, ∞) | (0, ∞) | y-intercept (0, 1) |
| ln x | (0, ∞) | (−∞, ∞) | x-intercept (1, 0) |
| sin x | (−∞, ∞) | [−1, 1] | Zero crossing (0, 0) |
| cos x | (−∞, ∞) | [−1, 1] | Maximum (0, 1) |
Seven of the ten anchor at the origin. That is not a coincidence, and it is the shortcut worth memorising: whenever the anchor sits at (0, 0), it lands at exactly (h, k) after the transformation, because b never touches an x-coordinate of zero and a never touches a y-coordinate of zero. It is why the vertex of a parabola in the form a(x − h)² + k can be read off without any algebra at all. The three exceptions — eˣ, ln x and cos x — need one extra step, because their anchors start off-origin. OpenStax’s precalculus chapter on transformation of functions works through the same parent library with additional practice sets.
Solve for x and the Backwards Rule Stops Being Strange
Students are usually told that (x − 4) moves the graph right and then asked to accept it. There is no need. Ask the only question that matters: which input to g produces the output the parent gave at x = 1?
For g(x) = f(x − 4) you need x − 4 = 1, so x = 5. The behaviour that used to live at 1 now lives at 5 — four steps to the right. The minus sign is not describing the motion of the graph. It is describing what you must undo to get back to the parent, and undoing a subtraction means adding.
The same argument settles b. For g(x) = f(2x) you need 2x = p, so x = p/2, and every feature of the parent lands at half its old distance from the y-axis. Try it on √x: the endpoint at (0, 0) stays at 0 because half of nothing is still nothing, while the point (9, 3) slides in to (4.5, 3). The curve gets narrower without getting shorter. On an absolute value graph the effect is easier still to see — the V gets visibly steeper while the corner refuses to budge.
f(2x − 6) Shifts by 3, Not 6
This is the error that costs the most marks, and it is not a conceptual error — it is a failure to factor. The template requires b(x − h), a product, not a difference. So 2x − 6 has to become 2(x − 3) before you read anything off it. The shift is 3. Write the unfactored 6 and every point on your sketch is off by three units.
Order matters vertically too, and there the arithmetic is genuinely different rather than just misread. Take a point where f(1) = 5. Stretch by 2 and then add 3, and you get 2(5) + 3 = 13. Add 3 first and then stretch, and you get 2(5 + 3) = 16. Three units of difference, from nothing but the sequence.
| Written as | In template form | What actually happens |
|---|---|---|
| f(2x − 6) | f(2(x − 3)) | Squash to half width, then right 3 |
| f(2(x − 6)) | already factored | Squash to half width, then right 6 |
| f(2x) − 6 | b = 2, k = −6 | Squash to half width, then down 6 |
| 2f(x) + 3 | a = 2, k = 3 | Stretch ×2, then up 3 |
| 2(f(x) + 3) | a = 2, k = 6 | Up 3 first, so the net rise is 6 |
The safe habit is the one the calculator above enforces: scale before you shift, on both axes, and factor the inside of the bracket before you read h. Trig questions punish this hardest, since the horizontal squash is the period and the shift is the phase — see the amplitude, period and phase shift calculator for how the same factoring step produces the phase shift b·h rather than h.
Track Five Points Instead of the Whole Curve
Nobody transforms a curve. You transform a handful of points and join them up. Every point (p, q) on the parent moves to (p/b + h, a·q + k) — divide by b and add h horizontally, multiply by a and add k vertically.
Run g(x) = −2(x − 3)² + 1 through it. Here a = −2, b = 1, h = 3, k = 1, so the rule collapses to (x + 3, −2y + 1):
| On x² | Arithmetic | On g |
|---|---|---|
| (−2, 4) | (−2+3, −2·4+1) | (1, −7) |
| (−1, 1) | (−1+3, −2·1+1) | (2, −1) |
| (0, 0) | (0+3, 0+1) | (3, 1) |
| (1, 1) | (1+3, −2·1+1) | (4, −1) |
| (2, 4) | (2+3, −2·4+1) | (5, −7) |
Five points, one downward parabola, vertex at (3, 1) — which you could have read straight off the equation, since the anchor was at the origin. That is precisely what vertex form is: the transformation template written for a single parent. Notice the symmetry survives too. (1, −7) and (5, −7) are still mirror images, just about x = 3 instead of x = 0.
Only Two of the Four Letters Can Touch the Domain
Domain lives on the x-axis, range lives on the y-axis, and each letter only works on one axis. So b and h are the only letters that can change a domain, and a and k are the only ones that can change a range. Half the questions on this topic are testing exactly that split.
Take f(x) = √x with domain [0, ∞). Build g(x) = √(−2(x − 1)). The inside must stay non-negative, so −2(x − 1) ≥ 0 gives x ≤ 1 and the domain flips to (−∞, 1]. The range never budges from [0, ∞) — a is 1 and k is 0, so no output was ever touched. Compare that with g(x) = 3 sin x − 4, where the domain stays every real number and the range compresses to [−7, −1].
Rational and logarithmic parents behave the same way, except their restrictions show up as asymptotes rather than endpoints. Shifting 1/x by h moves the vertical asymptote to x = h; adding k moves the horizontal one to y = k. Both facts fall straight out of the domain and range mapping, and the asymptote calculator shows the same result from the rational-function side. Work through a few examples with the domain and range calculator and the pattern gets obvious fast.
Reading the Four Numbers Off a Graph You Were Given
Exams love the reverse direction: here is a curve, write its equation. Five steps get you there without guessing.
- Name the parent from the shape. A sharp corner means |x|. A smooth U means x². A curve that simply stops means √x. Two branches fleeing a pair of asymptotes means 1/x. An S-bend through a flat spot means x³.
- Find the anchor and subtract. Corner at (−1, 4) against a parent corner at (0, 0) gives h = −1 and k = 4 immediately.
- Take one step right from the anchor. On x² and |x| the parent rises 1 over that step. If your graph rises 3 instead, |a| = 3; if it rises 0.5, |a| = 0.5.
- Check which way it opens. Downward or upside down means a is negative.
- Only then consider b. Most textbook answers set b = 1 on purpose.
That last step deserves a warning, because it is the part most explanations skip. For every power-type parent — x, x², x³, √x, |x| and 1/x — a and b are not independently recoverable from a picture. Since (bx)ⁿ = bⁿ·xⁿ, squashing a parabola to half its width produces literally the same curve as stretching it vertically by 4. Nothing in the graph can separate them, so convention sets b = 1 and pushes the whole effect into a.
Exponentials and logs hide a different swap. Because e^(x − h) = e^(−h)·eˣ, a horizontal shift on eˣ is a vertical stretch wearing a disguise; because ln(bx) = ln b + ln x, a horizontal squash on a log is really a vertical shift. Only the trig family keeps all four parameters genuinely distinct, since no vertical scaling can change a period — which is exactly why phase-shift questions insist on the factored form. If you need to go the other way and undo a transformation entirely, the inverse function calculator and the function calculator handle the algebra.
Five Errors No Function Transformation Calculator Will Catch For You
A calculator transforms whatever you hand it. If you hand it the wrong h, it draws the wrong graph without complaint. These five slips all happen before the arithmetic starts.
- Reading (x + 5) as a shift right. It is a shift left 5. The resulting sketch is wrong by 10 units, and every intercept, vertex and asymptote you report afterwards inherits the error.
- Not factoring before reading h. f(3x + 12) is f(3(x + 4)), so the shift is 4 left, not 12. This one shows up in disguise on every phase-shift question.
- Shifting before stretching. 2f(x) + 3 and 2(f(x) + 3) differ by a constant 3 at every single point. Marked as a graphing question, that is a whole curve in the wrong place.
- Reflecting an even function and expecting a change. Setting b = −1 on x², |x| or cos x produces a graph identical to the original, because those functions already satisfy f(−x) = f(x). The working looks impressive and achieves nothing.
- Leaving the domain behind. Writing the domain of √(x − 4) as [0, ∞) instead of [4, ∞) is the single most common mark lost on logarithm and radical questions. The restriction moves with the graph.
Every one of these is visible in under a second on the graph above. Change one letter, watch the emerald curve leave the dashed one, and check whether it moved the way you predicted. If it did not, the numbered list underneath will tell you which of the four letters you had backwards.



