Function Transformation Visualizer

Use this Function Transformation Visualizer to enter values, adjust options, and review results in a compact responsive workspace.

Results are calculated automatically as you enter data.

The transformed function is y = a*f(b(x - h)) + k. Negative a reflects over the x-axis; negative b reflects over x = h.

Transformation order and mapping
Transformed function Choose a parent function.

▼ See explanations and tips below ▼

What Are Function Transformations?

Function transformations are changes that move, flip, stretch, or compress the graph of a known function. Instead of graphing a new function from scratch, you start with a familiar parent function such as \(f(x)=x^2\), \(f(x)=|x|\), \(f(x)=\sqrt{x}\), or \(f(x)=\sin{x}\), then describe how its graph changes.

A common transformation model is:

$$ g(x)=a\,f\!\left(b(x-h)\right)+k $$

The parent function is \(f\). The transformed function is \(g\). The numbers \(a\), \(b\), \(h\), and \(k\) control the graph. The changes inside the function, \(b(x-h)\), affect the \(x\)-coordinates. The changes outside the function, \(a\) and \(k\), affect the \(y\)-coordinates.

This model is useful because many graphs that look complicated are really familiar parent graphs moved or resized in a predictable way.


Why Function Transformations Matter

Function transformations help you recognize patterns. In algebra and precalculus, they make graphing faster because you can use a parent function as a starting point. In modeling, they let you adjust a basic function to fit a new situation: move it to a different starting point, make it grow faster, reverse it, or change its vertical scale.

They also help you avoid a common graphing mistake: treating every change in a formula the same way. A number added outside the function moves the graph vertically, but a number added inside the function moves it horizontally. A number multiplied outside the function changes outputs directly, but a number multiplied inside the function changes inputs in a reciprocal way.


Key Terms to Know

  • Parent function: A basic function used as the starting graph, such as \(x\), \(x^2\), \(|x|\), \(\sqrt{x}\), \(\frac{1}{x}\), \(e^x\), \(\ln{x}\), or \(\sin{x}\).
  • Translation: A shift of the graph left, right, up, or down without changing its shape.
  • Vertical stretch or compression: A change that multiplies the output values of a function.
  • Horizontal stretch or compression: A change that multiplies the input values of a function, which changes the visible width of the graph by the reciprocal of the input multiplier.
  • Reflection: A flip across an axis. A negative vertical multiplier reflects across the \(x\)-axis. A negative horizontal multiplier creates a left-right reflection.
  • Domain: The set of input values for which the function is defined.
  • Key point: A recognizable point on the parent graph that can be mapped to a new location on the transformed graph.
  • Radian measure: The standard angle measure used for the sine function in this calculator. An unlabeled angle input for sine should be interpreted in radians, not degrees.

Supported Parent Functions

Parent function Formula Parent domain
Linear \(f(x)=x\) All real \(x\)
Quadratic \(f(x)=x^2\) All real \(x\)
Cubic \(f(x)=x^3\) All real \(x\)
Absolute value \(f(x)=|x|\) All real \(x\)
Square root \(f(x)=\sqrt{x}\) \(x\ge 0\)
Reciprocal \(f(x)=\frac{1}{x}\) \(x\ne 0\)
Exponential \(f(x)=e^x\) All real \(x\)
Natural logarithm \(f(x)=\ln{x}\) \(x>0\)
Sine \(f(x)=\sin{x}\) All real \(x\), with angle input in radians

How Function Transformations Work

The transformation form is:

$$ g(x)=a\,f\!\left(b(x-h)\right)+k $$

The parameters have these meanings:

  • \(a\) controls the vertical scale and vertical reflection.
  • \(b\) controls the horizontal scale and horizontal reflection. It cannot be \(0\) in this model.
  • \(h\) controls the horizontal shift.
  • \(k\) controls the vertical shift.

The easiest way to understand the formula is to separate input changes from output changes.

Vertical changes: \(a\) and \(k\)

The outside part, \(a\,f(\cdots)+k\), changes the output after the parent function has been evaluated.

If a parent point has output \(y=f(u)\), then the transformed output is:

$$ y_{\text{new}}=a\,f(u)+k $$

That means:

  • If \(a>1\), the graph stretches vertically.
  • If \(0<|a|<1\), the graph compresses vertically.
  • If \(a<0\), the graph reflects across the \(x\)-axis and is also stretched or compressed by \(|a|\).
  • If \(a=0\), every defined transformed parent output becomes \(k\), so the graph is the horizontal line \(y=k\) on the inherited transformed parent domain. Restricted domains (such as square root, logarithm, and reciprocal) remain restricted.
  • If \(k>0\), the graph shifts up.
  • If \(k<0\), the graph shifts down.

Horizontal changes: \(b\) and \(h\)

The inside part, \(b(x-h)\), changes the input before the parent function is evaluated. This is why horizontal transformations can feel backwards.

If \(u\) is an input on the parent graph, then the transformed graph reaches the same parent input when:

$$ u=b(x-h) $$

Solving for \(x\) gives the transformed \(x\)-coordinate:

$$ x=\frac{u}{b}+h $$

So a parent point \((u,f(u))\) maps to:

$$ (u,f(u))\;\longrightarrow\;\left(\frac{u}{b}+h,\;a\,f(u)+k\right) $$

That mapping explains the reciprocal effect of \(b\):

  • If \(|b|>1\), the graph compresses horizontally by a factor of \(\frac{1}{|b|}\).
  • If \(0<|b|<1\), the graph stretches horizontally by a factor of \(\frac{1}{|b|}\).
  • If \(b<0\), the horizontal transformation includes a left-right reflection.
  • If \(h>0\), parent features move to the right by \(h\).
  • If \(h<0\), parent features move to the left by \(|h|\).

Domain Changes After a Transformation

A transformed function is defined only when the parent function receives an allowed input. For:

$$ g(x)=a\,f\!\left(b(x-h)\right)+k $$

the input sent to the parent function is:

$$ b(x-h) $$

For parent functions with all real inputs, such as linear, quadratic, cubic, absolute value, exponential, and sine, the transformed domain remains all real numbers as long as the parameters are valid.

For functions with restricted domains, the inside expression must satisfy the parent domain rule:

Parent function Parent requirement Transformed domain rule
Square root \(u\ge 0\) \(b(x-h)\ge 0\)
Natural logarithm \(u>0\) \(b(x-h)>0\)
Reciprocal \(u\ne 0\) \(b(x-h)\ne 0\), so \(x\ne h\)

For square root and natural logarithm functions, the direction of the inequality depends on the sign of \(b\). For example, if \(b>0\), then \(b(x-h)\ge 0\) becomes \(x\ge h\). If \(b<0\), the inequality reverses and becomes \(x\le h\).


Examples of Function Transformations in Practice

Example 1: Shifting a quadratic function

Start with the parent function:

$$ f(x)=x^2 $$

Use the transformation values:

$$ a=1,\quad b=1,\quad h=3,\quad k=2 $$

Then:

$$ g(x)=1\cdot f\!\left(1(x-3)\right)+2 $$

Since \(f(x)=x^2\), this becomes:

$$ g(x)=(x-3)^2+2 $$

The graph of \(y=x^2\) shifts \(3\) units right and \(2\) units up. The vertex moves from \((0,0)\) to \((3,2)\).

Using the coordinate map:

$$ (u,u^2)\;\longrightarrow\;(u+3,u^2+2) $$

A few mapped points are:

Parent point Transformed point
\((-1,1)\) \((2,3)\)
\((0,0)\) \((3,2)\)
\((1,1)\) \((4,3)\)

Example 2: Stretching and reflecting an absolute value function

Start with:

$$ f(x)=|x| $$

Use:

$$ a=-2,\quad b=0.5,\quad h=-1,\quad k=3 $$

The transformed function is:

$$ g(x)=-2\,f\!\left(0.5(x+1)\right)+3 $$

Using the absolute value parent function:

$$ g(x)=-2\left|0.5(x+1)\right|+3 $$

Here is what each parameter does:

  • \(a=-2\) reflects the graph across the \(x\)-axis and stretches it vertically by a factor of \(2\).
  • \(b=0.5\) stretches the graph horizontally by a factor of \(\frac{1}{0.5}=2\).
  • \(h=-1\) shifts the graph left \(1\) unit.
  • \(k=3\) shifts the graph up \(3\) units.

The coordinate map is:

$$ (u,|u|)\;\longrightarrow\;\left(\frac{u}{0.5}-1,\;-2|u|+3\right) $$

Since \(\frac{u}{0.5}=2u\), this is:

$$ (u,|u|)\;\longrightarrow\;(2u-1,\;-2|u|+3) $$

So the parent vertex \((0,0)\) maps to:

$$ (0,0)\;\longrightarrow\;(-1,3) $$

Example 3: Domain changes with a square root function

Start with:

$$ f(x)=\sqrt{x} $$

Use:

$$ a=1,\quad b=-2,\quad h=4,\quad k=0 $$

The transformed function is:

$$ g(x)=\sqrt{-2(x-4)} $$

A square root needs its inside value to be at least \(0\):

$$ -2(x-4)\ge 0 $$

Divide by \(-2\). Because this is a negative number, the inequality reverses:

$$ x-4\le 0 $$

So:

$$ x\le 4 $$

The domain is all real \(x\) values less than or equal to \(4\). This example shows why restricted parent functions need extra attention after a horizontal transformation.


How to Interpret the Result

The transformed function tells you the new rule after the selected parent function has been shifted, scaled, reflected, or compressed. Read it in the form:

$$ g(x)=a\,f\!\left(b(x-h)\right)+k $$

The domain tells you which \(x\)-values are allowed after the transformation. For parent functions with no domain restriction, the domain is usually all real numbers. For square root, logarithm, and reciprocal functions, the domain depends on the transformed inside expression.

The vertical effect describes what \(a\) does to the graph before \(k\) moves it up or down. A negative \(a\) flips the graph vertically. A larger \(|a|\) makes outputs farther from the horizontal axis. A smaller nonzero \(|a|\) makes outputs closer to the horizontal axis.

The horizontal effect describes what \(b\) does to input values. The visible horizontal scale is based on \(\frac{1}{|b|}\), not \(|b|\). This is why \(b=2\) compresses the graph horizontally, while \(b=0.5\) stretches it horizontally.

The key point table is often the clearest way to understand the transformation. Each parent point \((u,f(u))\) is mapped to:

$$ \left(\frac{u}{b}+h,\;a\,f(u)+k\right) $$

If a graph overlay is shown, use it as a visual comparison between the parent curve and transformed curve. The graph helps you see the overall shape, but the formula and domain rule are more reliable for exact interpretation.


Common Mistakes and Misconceptions

One common mistake is treating \(b\) as the visible horizontal stretch factor. In the form \(f(b(x-h))\), the visible horizontal scale is reciprocal: \(b=2\) compresses horizontally by \(\frac{1}{2}\), while \(b=0.5\) stretches horizontally by \(2\).

Another mistake is reading \(x-h\) backwards. A positive \(h\) shifts the graph right, not left. For example, \(f(x-3)\) moves the parent graph right \(3\) units.

A third mistake is ignoring domain restrictions. The square root, natural logarithm, and reciprocal parent functions do not accept all real inputs, so their transformed versions must still follow the transformed domain rule.

For sine, remember that input values are interpreted in radians. The value \(90\) means \(90\) radians, not \(90^\circ\).

It is also easy to expect a graph window to show every important feature. A graph view can miss faraway features, very large values, or behavior near discontinuities. Always check the formula and domain rule, especially for reciprocal and logarithmic functions.


When to Use Function Transformations

Use function transformations when you want to:

  • Sketch a graph from a familiar parent function.
  • Compare two related functions.
  • Identify shifts, stretches, compressions, and reflections from a formula.
  • Track how key points move from a parent graph to a transformed graph.
  • Understand how a restricted domain changes after a horizontal transformation.
  • Check whether a graphing result makes sense before relying on the visual graph.

Function transformations are especially useful in algebra, precalculus, trigonometry, and early calculus because they connect equations, tables, and graphs.


Limitations and Things to Keep in Mind

This transformation model uses real, finite parameter values within the displayed controls: \(a,b\in[-5,5]\) and \(h,k\in[-8,8]\). The value \(b=0\) is not allowed because \(b(x-h)\) would no longer produce a meaningful horizontal input transformation.

The model does not cover every possible function. It applies to the supported parent functions and does not accept arbitrary user-defined parent functions. It also does not compute complex-valued outputs.

A transformed formula may not be fully symbolically simplified. For example, a transformation may be shown in parent-function form even when it could be algebraically rewritten. That is usually helpful for understanding the transformation, but it means the displayed expression may not be the simplest possible expression.

Graph output is a visual approximation. The graph is sampled over \(x\) values from about \(-10\) to \(10\), and the displayed vertical range is constrained to approximately \(-30\) to \(30\) when very large values occur. Very large, undefined, or non-finite values may be omitted from the plotted curve. Discontinuities may not be drawn as explicit asymptotes. For exact work, use the formula, coordinate map, and domain rule.

Displayed values may be rounded for readability. Very small nonzero values use scientific notation so they are not shown as \(0\).

The calculator focuses on transformations. It does not separately calculate range, intercepts, asymptotes, extrema, period, or full curve analysis.


How to Use This Calculator

  1. Choose a supported parent function.
  2. Enter or adjust \(a\) between \(-5\) and \(5\) to control vertical stretch, vertical compression, reflection across the \(x\)-axis, or collapse to a horizontal line on the inherited domain when \(a=0\).
  3. Enter or adjust \(b\) between \(-5\) and \(5\), excluding \(0\), to control horizontal compression, horizontal stretch, or left-right reflection.
  4. Enter \(h\) for the horizontal shift and \(k\) for the vertical shift.
  5. Optionally use a preset such as reset, reflect, stretch, or compress as a quick starting point.
  6. Review the transformed function, domain rule, vertical effect, horizontal effect, graph overlay, and key point table.
  7. Use the mapped key points to connect the parent graph to the transformed graph.
  8. Download the graph as a PNG if you need a copy of the displayed graph.

Frequently Asked Questions

Why does \(x-h\) shift the graph right when \(h\) is positive?

The graph shifts right because the parent function receives the same input later. For example, \(f(x-3)\) receives the parent input \(0\) when \(x=3\), so the parent feature at \(x=0\) moves to \(x=3\).


Why does \(b=2\) make a horizontal compression instead of a stretch?

In \(f(bx)\), the parent function receives inputs faster. The parent input \(u\) occurs when \(x=\frac{u}{b}\), so \(b=2\) makes each \(x\)-coordinate half as large. That compresses the graph horizontally by \(\frac{1}{2}\).


What happens when \(a=0\)?

When \(a=0\), every defined parent output is multiplied by \(0\). After the vertical shift, the output is \(k\) on the inherited transformed parent domain, so restricted parent functions still have restricted domains.


Why is \(b=0\) not allowed?

If \(b=0\), the inside expression becomes \(0(x-h)=0\) for every \(x\). The input to the parent function no longer changes with \(x\), so it is not a valid horizontal stretch, compression, reflection, or shift in this transformation model.


Does a negative \(b\) always mean reflection across the \(y\)-axis?

A negative \(b\) creates a left-right reflection in the horizontal transformation. When \(h=0\), this is a reflection across the \(y\)-axis. When \(h\) is not \(0\), the coordinate map is the most precise way to track the transformed points.


How do I find the transformed domain?

Set the parent-function input \(b(x-h)\) to satisfy the parent domain. For square root, require \(b(x-h)\ge 0\). For natural logarithm, require \(b(x-h)>0\). For reciprocal, require \(b(x-h)\ne 0\), which gives \(x\ne h\).


Are sine inputs in degrees or radians?

Sine inputs are interpreted in radians. For example, \(\sin{\left(\frac{\pi}{2}\right)}=1\), while \(\sin{(90)}\) means the sine of \(90\) radians, not \(90^\circ\).


Sources and References

Books

  1. Jay Abramson. College Algebra 2e. OpenStax, Dec. 21, 2021. Section 3.5, “Transformation of Functions.” https://openstax.org/books/college-algebra-2e/pages/3-5-transformation-of-functions
  2. Jay Abramson. Precalculus 2e. OpenStax, Dec. 21, 2021. Section 1.5, “Transformation of Functions.” https://openstax.org/books/precalculus-2e/pages/1-5-transformation-of-functions
  3. Jay Abramson. Algebra and Trigonometry 2e. OpenStax, Dec. 21, 2021. Section 7.1, “Angles.” https://openstax.org/books/algebra-and-trigonometry-2e/pages/7-1-angles

Online and Educational Sources

  1. George Brown College Tutoring and Learning Centre. “Graphing Functions using Transformations.” PDF handout, 2014. Accessed June 28, 2026. https://www.georgebrown.ca/sites/default/files/uploadedfiles/tlc/_documents/graphing_functions_using_transformations.pdf