Transformations and Combinations of Functions

Learning goals

  • Describe shifts, reflections, and scaling by tracking changes to graph coordinates
  • Construct transformed formulas and determine their domains from the original function
  • Combine functions arithmetically while retaining all original restrictions and denominator exclusions
  • Evaluate compositions in the stated order and find their exact domains
  • Decompose nested expressions and match output units to the next function's input

Change an output or change an input

Adding to a function’s output moves its graph vertically. Changing its input can move the graph horizontally.

Suppose f(1)=4f(1)=4. The function p(x)=f(x)+3p(x)=f(x)+3 has p(1)=7p(1)=7: the point (1,4)(1,4) becomes (1,7)(1,7). But q(x)=f(x−3)q(x)=f(x-3) reaches the old output 44 at x=4x=4, because 4−3=14-3=1. Its corresponding point is (4,4)(4,4).

A transformation changes a function by modifying its inputs or outputs. In a vertical shift, f(x)+kf(x)+k, every output increases by kk. In a horizontal shift, f(x−h)f(x-h), the new input must be hh larger to supply the same old input to ff.

Thus f(x)+kf(x)+k moves the graph up kk units when kk is positive and down ∣k∣|k| units when kk is negative. The graph of f(x−h)f(x-h) moves right hh units when hh is positive and left ∣h∣|h| units when hh is negative. To check the horizontal direction, solve for the new input rather than guessing from the sign.

Worked example 1 A starting point and the domain move together

Problem. Start with f(x)=xf(x)=\sqrt{x} on [0,∞)[0,\infty). Shift its graph right 33 units and up 22 units. Find the new formula and domain.

Solution. The right shift replaces the root’s input by x−3x-3, and the upward shift adds 22 to its output. Thus g(x)=x−3+2g(x)=\sqrt{x-3}+2.

The old starting point is (0,0)(0,0). The new input reaches the old input 00 when x−3=0x-3=0, so its starting point moves to (3,2)(3,2).

The expression under the square root must be nonnegative:

x−3≥0.x-3\geq 0.

Therefore the domain is [3,∞)[3,\infty). The whole graph moves right 33 and up 22, including its domain boundary.

Check your understanding

A function has domain [−4,2][-4,2]. What is the domain of g(x)=f(x+6)g(x)=f(x+6)?

Answer choices

Scale and reflect coordinates

Multiplication outside a function scales heights; multiplication inside scales horizontal coordinates in the opposite way.

If (6,5)(6,5) is on the graph of ff, then (6,10)(6,10) is on y=2f(x)y=2f(x). For y=f(2x)y=f(2x), the same old input 66 occurs when 2x=62x=6, so the corresponding point is (3,5)(3,5). Doubling the input inside halves horizontal distances from the vertical axis. For y=f(−2x)y=f(-2x), solve −2x=6-2x=6 instead: the same point becomes (−3,5)(-3,5). The negative input multiplier moves it to the other side of the vertical axis as well as halving its horizontal distance.

A vertical stretch multiplies heights by a factor greater than 11; a vertical compression multiplies them by a positive factor less than 11. For y=af(x)y=af(x) with a≠0a\ne 0, the vertical factor is ∣a∣|a|. A negative aa also reflects the graph across the horizontal axis because the output changes sign.

For y=f(bx)y=f(bx) with b≠0b\ne 0, the horizontal factor is 1/∣b∣1/|b|. Values ∣b∣>1|b|>1 compress horizontally; values 0<∣b∣<10<|b|<1 stretch horizontally. A negative bb also reflects across the vertical axis because the input changes sign. These reflections can leave a symmetric graph looking unchanged.

Worked example 2 Read a reflected and stretched root graph

Problem. Starting from f(x)=xf(x)=\sqrt{x} on [0,∞)[0,\infty), describe the transformations producing r(x)=−2x−3+5r(x)=-2\sqrt{x-3}+5. Find its domain and range, and the points corresponding to (0,0)(0,0), (1,1)(1,1), and (4,2)(4,2) on ff.

Solution. First supply x−3x-3 to the square root. This moves the starting input from 00 to 33.

Next multiply each square-root output by −2-2, reflecting across the horizontal axis and stretching heights by 22. Finally add 55.

Each old point (u,v)(u,v) therefore becomes (u+3,−2v+5)(u+3,-2v+5):

Point on ffCorresponding point on rr
(0,0)(0,0)(3,5)(3,5)
(1,1)(1,1)(4,3)(4,3)
(4,2)(4,2)(7,1)(7,1)

The root requires x≥3x\geq 3, so the domain is [3,∞)[3,\infty).

Since x−3\sqrt{x-3} takes every nonnegative value, −2x−3+5-2\sqrt{x-3}+5 takes every value at most 55. The range is (−∞,5](-\infty,5].

y = -2√(x - 3) + 5. Its start point sits at (3, 5), shifted 3 to the right and 5 up. From there it falls to the right, 2 times as fast as √x, flattening as it goes. It exists only for x of at least 3, because a square root needs the inside to be at least 0. The inside reads x - 3 while the graph moves right, which is the opposite of the sign you see. A coordinate plane with the graph of y = -2√(x - 3) + 5 drawn on it, with its start point marked. -2 2 4 6 8 10 -2 2 4 6
The graph starts at (3, 5) and extends to the right and downward. Its left domain boundary is included.

A negative multiplier reverses the order of bounded endpoints too. If a function has range [−3,2)[-3,2), the output rule −4v+1-4v+1 sends the included endpoint −3-3 to 1313 and the excluded endpoint 22 to −7-7. The new range is (−7,13](-7,13]. The endpoints reverse order, and each keeps its own included or excluded status.

The order matters. Reflecting f(x)+5f(x)+5 across the horizontal axis gives −f(x)−5-f(x)-5, while shifting −f(x)-f(x) up 55 gives −f(x)+5-f(x)+5.

Horizontal changes also depend on order. Reflecting the point (−7,11)(-7,11) across the vertical axis gives (7,11)(7,11); shifting right 33 then gives (10,11)(10,11). Shifting first gives (−4,11)(-4,11), and reflecting that point gives (4,11)(4,11). Reflecting the graph first and then shifting right 33 produces f(−(x−3))=f(3−x)f(-(x-3))=f(3-x); reversing those steps produces f(−x−3)f(-x-3).

For several changes together, follow one point. Suppose f(−2)=4f(-2)=4 and G(x)=−3f(2(x−1))+5G(x)=-3f(2(x-1))+5. To use the old input −2-2, solve 2(x−1)=−22(x-1)=-2, which gives x=0x=0. The new output is −3(4)+5=−7-3(4)+5=-7. Thus (−2,4)(-2,4) becomes (0,−7)(0,-7).

The same reasoning works for any old point (u,v)(u,v). For nonzero real numbers aa and bb, the transformation

G(x)=af(b(x−h))+kG(x)=af\bigl(b(x-h)\bigr)+k

maps that point to

(h+ub, av+k).\left(h+\frac{u}{b},\ av+k\right).

The old input must equal b(x−h)b(x-h), so solving for xx gives h+u/bh+u/b; the old output vv becomes av+kav+k. Nothing in this reasoning depends on the particular point chosen. The nonzero conditions make these genuine coordinate scalings. Multiplying an output by zero instead collapses all defined outputs to one height; it still does not make an undefined original value defined.

The domain consists exactly of inputs for which b(x−h)b(x-h) belongs to the original domain. Factor the inside expression before reading a shift: f(2x−8)=f(2(x−4))f(2x-8)=f(2(x-4)) has shift parameter h=4h=4.

Check your understanding

If (−6,4)(-6,4) lies on y=f(x)y=f(x), which corresponding point lies on y=−2f(−3(x−2))+1y=-2f(-3(x-2))+1?

Answer choices

Combine values at the same input

Arithmetic combinations use two outputs at one shared input. If A(2)=7A(2)=7 and B(2)=3B(2)=3, then (A+B)(2)=10(A+B)(2)=10, (A−B)(2)=4(A-B)(2)=4, (AB)(2)=21(AB)(2)=21, and (A/B)(2)=7/3(A/B)(2)=7/3.

In general, (f+g)(x)=f(x)+g(x)(f+g)(x)=f(x)+g(x), (f−g)(x)=f(x)−g(x)(f-g)(x)=f(x)-g(x), and (fg)(x)=f(x)g(x)(fg)(x)=f(x)g(x). Their domains are the intersection of the original domains: both values must exist. For a quotient,

(fg)(x)=f(x)g(x),\left(\frac{f}{g}\right)(x)=\frac{f(x)}{g(x)},

also exclude every input where g(x)=0g(x)=0. In a model, addition and subtraction also require compatible output units.

For example, x+2+6−x\sqrt{x+2}+\sqrt{6-x} requires x≥−2x\geq -2 and x≤6x\leq 6, so its domain is [−2,6][-2,6].

Worked example 3 Two domains and a denominator zero

Problem. Let f(x)=∣x−4∣f(x)=|x-4| for xx in [−6,14)[-6,14), and let g(x)=4x−15g(x)=4x-15 for xx in (−8,9](-8,9]. Find the formula and exact domain of H=f/gH=f/g, then evaluate H(6)H(6).

Solution. Both original values must exist at the same input, so begin with the intersection of the declared domains. The intersection, written ∩\cap, keeps the inputs in both sets:

[−6,14)∩(−8,9]=[−6,9].[-6,14)\cap(-8,9]=[-6,9].

The lower boundary comes from ff and the upper boundary from gg. Neither function’s domain alone gives all the restrictions.

The quotient formula is

H(x)=∣x−4∣4x−15.H(x)=\frac{|x-4|}{4x-15}.

Division also requires 4x−15≠04x-15\ne 0, so remove x=15/4x=15/4. This input lies inside the common interval, so it creates an additional exclusion. The exact domain is

D=[−6,15/4)∪(15/4,9].D=[-6,15/4)\cup(15/4,9].

You can also write D=[−6,9]∖{15/4}D=[-6,9]\setminus\{15/4\}. The symbol ∖\setminus means to remove the listed value from the preceding set.

The input 66 belongs to both original domains and does not make the denominator zero. Its numerator is ∣6−4∣=2|6-4|=2 and its denominator is 4(6)−15=94(6)-15=9, giving

H(6)=29.H(6)=\frac{2}{9}.

The declared intervals still limit the quotient’s domain. Rewriting or simplifying a formula cannot add inputs forbidden by either original function.

Keep the interval and its excluded inputA solid blue segment extends from the filled point at negative 6 to the filled point at 9. An open circle at 15 over 4 interrupts the segment because the original denominator is zero there. Inputs outside the segment remain excluded by the original declared domains.-615/49x
The closed endpoints stay included, while the open circle removes 15/4. Rewriting or simplifying the quotient preserves these original restrictions.

Check your understanding

Let u(x)=x+7u(x)=\sqrt{x+7} and v(x)=x−2v(x)=x-2. What is the domain of u/vu/v?

Answer choices

Feed one output into the next function

Composition uses the output of one function as the input to another. Suppose s(t)=3ts(t)=3t converts hours of machine operation into meters of ribbon, and c(m)=m2c(m)=m^2 gives a numerical cost in dollars for mm meters under a simplified pricing model. At t=2t=2, first find s(2)=6s(2)=6, then c(6)=36c(6)=36. The cost is c(s(2))c(s(2)), not c(2)s(2)c(2)s(2).

We write

(f∘g)(x)=f(g(x)).(f\circ g)(x)=f(g(x)).

Read this as ”ff composed with gg.” The inner function gg acts first. Substitution means replacing every input slot of ff with the entire expression g(x)g(x), including parentheses where needed.

In a model, the output units of gg must match the input units expected by ff. The composite accepts the input units of gg and produces the output units of ff.

Worked example 4 Compare the two orders

Problem. Let f(x)=x2+2f(x)=x^2+2 and g(x)=x−4g(x)=x-4, both defined for every real number. Find f∘gf\circ g and g∘fg\circ f with their domains. Use one input to decide whether these two functions are equal.

Solution. In f∘gf\circ g, subtract 44 first and then square and add 22:

(f∘g)(x)=(x−4)2+2.(f\circ g)(x)=(x-4)^2+2.

In g∘fg\circ f, square and add 22 first, then subtract 44:

(g∘f)(x)=x2−2.(g\circ f)(x)=x^2-2.

Both compositions have domain R\mathbb{R}, because both original polynomials accept every real input and output.

At x=0x=0, their values are 1818 and −2-2, so they are different functions. Composition need not give the same result when the order is reversed.

Worked example 5 Convert a temperature before using a response model

Problem. The conversion C(F)=59(F−32)C(F)=\tfrac59(F-32) takes a numerical Fahrenheit temperature FF and returns degrees Celsius. A sensor’s response is R(c)=1.5c+4R(c)=1.5c+4 milliamps for 0≤c≤450\leq c\leq45, where cc is a Celsius temperature.

Write the sensor response as a function of FF, find its Fahrenheit input domain, and evaluate it at F=32F=32. Compare the numerical reverse order C(R(32))C(R(32)) and explain whether it describes the same physical process.

Solution. For the response after conversion, use CC first, because RR expects Celsius:

(R∘C)(F)=1.5[59(F−32)]+4.(R\circ C)(F)=1.5\left[\tfrac59(F-32)\right]+4.

The original response domain requires 0≤C(F)≤450\leq C(F)\leq45. Multiplying by 9/59/5 gives 0≤F−32≤810\leq F-32\leq81, hence the Fahrenheit domain is [32,113][32,113].

At F=32F=32, the conversion gives C(32)=0C(32)=0 degrees Celsius. The sensor then gives R(0)=4R(0)=4 milliamps.

Match the intermediate unitsThe vertical chain has a solid blue conversion box C above a dashed red response box R. The intermediate Celsius value connects the stages; the final quantity is current, not temperature.Fahrenheit input FConvert with CCelsius cResponse RCurrent (mA)
The output units of each stage must match the input units of the next. The full chain converts Fahrenheit to current.

For the numerical reverse order, R(32)=52R(32)=52 would be a current in milliamps. Formally substituting its number into CC gives

C(52)=1009.C(52)=\frac{100}{9}.

This is different from 44, and it feeds current into a conversion that expects a Fahrenheit temperature. Thus the reverse numerical formula does not model the same physical process, even though both numerical evaluations exist.

Break a nested expression into stages

You can work backward from an expression to the functions that build it. Consider H(x)=1/(5+∣2x−7∣)H(x)=1/(5+|2x-7|). At x=2x=2, the inside calculation gives 2(2)−7=−32(2)-7=-3, then its absolute value is 33, and adding 55 and taking the reciprocal gives 1/81/8.

A decomposition writes a function as a composition of simpler functions. For this expression, choose the stages

A(x)=2x−7,B(u)=∣u∣,D(v)=15+v.\begin{aligned} A(x)&=2x-7,\\ B(u)&=|u|,\\ D(v)&=\frac{1}{5+v}. \end{aligned}

Then H=D∘B∘AH=D\circ B\circ A. Both AA and BB accept every real input. The outer function DD excludes input −5-5, but the output of BB is always nonnegative, so every original real xx passes all three stages. Grouping the first two stages into one inner function gives another valid decomposition; the choice need not be unique.

Check your understanding

Which inner function GG and outer function FF give H(x)=∣x3−6∣H(x)=|x^3-6| as F(G(x))F(G(x))? All functions use their full real domains.

Answer choices

Check both stages of a composition

A composite input must work at every stage. For f(x)=1/xf(x)=1/x and g(x)=x−8g(x)=\sqrt{x-8}, the input x=9x=9 works: g(9)=1g(9)=1, then f(1)=1f(1)=1. The input 88 passes the square-root stage but produces 00, which the reciprocal cannot accept.

For any f∘gf\circ g, first require xx to be in the domain of gg. Then require g(x)g(x) to be in the domain of ff. Here those conditions are x≥8x\geq 8 and x−8≠0\sqrt{x-8}\ne 0, giving

(f∘g)(x)=1x−8,x>8.(f\circ g)(x)=\frac{1}{\sqrt{x-8}},\qquad x>8.

Declared domains matter even when formulas simplify. If p(x)=x2p(x)=x^2 for x≥0x\geq 0 and q(x)=x−9q(x)=x-9 for all real xx, then p(q(x))=(x−9)2p(q(x))=(x-9)^2 only for x≥9x\geq 9. The polynomial expression alone hides the restriction of pp.

Check your understanding

Let F(u)=uF(u)=\sqrt{u} and G(x)=4−x2G(x)=4-x^2, each with its full real domain. What is the domain of F∘GF\circ G?

Answer choices

Common mistakes

Practice

Multiple Choice Questions (MCQ)

Progressively harder sets of questions. Each opens on its own page.

Core practice

Practice problems at the level of the course, to be worked out on paper. Hints one at a time, then the answer or the full worked solution, with your progress kept in this browser.

Core practice Work it out on paper 10 problems Start →
More resources (optional)

Other explanations of this lesson, if you want a second take.

A bit of history (optional)

In his 1917 book On Growth and Form, the biologist D’Arcy Wentworth Thompson tried an unusual way of comparing animals. Instead of describing each difference in words, he drew an animal on a coordinate grid and changed the grid itself.

One striking example began with a porcupinefish. Thompson curved its vertical grid lines into circles and bent the horizontal lines into another family of curves. Transferring the fish’s outline point by point onto that grid produced a shape resembling a sunfish, with a much deeper body and a shortened tail. The head changed far less than the rear of the body.

Thompson acknowledged that this particular grid deformation was not mathematically perfect. He presented it as a comparison of forms, not a record of one fish physically turning into another. The original discussion and drawings are in his book (chapter XVII, figures 381 and 382).

Your progress

See all your progress →