Sub topic 10
How Transformations Change Domain and Range
This chapter assumes you can evaluate f(x), read domain and range from a graph, and sketch the parent functions x, x², |x|, √x, 1/x, and x³. You should also know the combined form g(x) = a·f(b(x − h)) + k from the earlier chapters. Here you will turn that form into a rule that gives the domain and range of g without sketching it.
The core idea: input side and output side
The parameters of g split into two groups.
- Input side: b and h change which x-values the function accepts. They affect the domain.
- Output side: a and k change which y-values the function produces. They affect the range.
The domain of g is the set of x for which the expression b(x − h) lands inside the domain of f. The range of g is the set of values a·y + k, where y runs over the range of f.
Read the domain side backward. Ask what x must be so that b(x − h) is allowed in f. Read the range side forward. Apply a, then k, to every output f can produce.
The domain rule
Suppose f has domain D. Then g accepts x exactly when b(x − h) is in D. Solving for x gives
- domain of g = { h + u/b : u in D }
Each step in the rule undoes one input step.
- Shift by h: every domain endpoint moves h units to the right. The width of the domain stays the same.
- Divide by b: the domain width is multiplied by 1/|b|. If |b| > 1, the domain gets narrower (a horizontal compression). If |b| < 1, it gets wider.
- Negative b: the domain flips left to right. A lower endpoint becomes an upper endpoint.
A domain that is all real numbers stays all real numbers under every horizontal change. Only domains with a boundary or a hole can move.
The range rule
Suppose f has range R. Then
- range of g = { a·y + k : y in R }
- Multiply by a: the range width is multiplied by |a|.
- Negative a: the range flips top to bottom. A lower endpoint becomes an upper endpoint.
- Add k: every range endpoint moves k units up.
Ranges like [0, ∞) become unbounded in the other direction when a is negative. For example, a = −3 turns [0, ∞) into (−∞, 0].
Summary table
| Change | Effect on domain | Effect on range |
|---|---|---|
| f(x) + k | none | endpoints shift by k |
| f(x − h) | endpoints shift by h | none |
| a·f(x), a > 0 | none | endpoints multiplied by a |
| f(bx), b > 0 | endpoints divided by b | none |
| −f(x) | none | flips over y = 0 |
| f(−x) | flips over x = 0 | none |
Each row changes only one side. This is why the two sides can be computed independently.
Worked example 1: a square root
Take f(x) = √x, with domain [0, ∞) and range [0, ∞). Let
g(x) = −3√(2(x + 2)) + 1
Here a = −3, b = 2, h = −2, k = 1.
Domain. We need 2(x + 2) ≥ 0, so x ≥ −2. The rule gives the same answer. The endpoint 0 becomes 0/2 + (−2) = −2, and the interval still extends to ∞.
Range. Multiply [0, ∞) by −3 to get (−∞, 0]. Add 1 to get (−∞, 1].
The graph starts at (−2, 1), the image of the parent's starting point (0, 0). It then falls toward −∞. Interval notation needs care with the order of endpoints, so the largest value 1 is written on the right.
Worked example 2: a restricted domain
Take f(x) = √(9 − x²), the upper half of a circle of radius 3. Its domain is [−3, 3] and its range is [0, 3]. Let
g(x) = −2·f(3(x − 1)) + 4
Here a = −2, b = 3, h = 1, k = 4.
Domain. The inside expression 3(x − 1) must be in [−3, 3]. Dividing by 3 gives x − 1 in [−1, 1], so x is in [0, 2]. The width shrank from 6 to 2, which is a factor of 1/3.
Range. Multiply [0, 3] by −2 to get [−6, 0]. Add 4 to get [−2, 4].
You can check the result with two points. The parent's top point (0, 3) maps to (0/3 + 1, −2·3 + 4) = (1, −2). The parent's endpoint (−3, 0) maps to (−3/3 + 1, −2·0 + 4) = (0, 4).
The next code block turns the two rules into functions. It uses (low, high) tuples. Whether an endpoint is open or closed is not tracked, so you must carry that information yourself. Infinite endpoints are always open.
import math
def transformed_domain(dom, b, h):
"""Domain of a*f(b*(x - h)) + k, given the domain of f."""
ends = [e / b + h for e in dom]
return (min(ends), max(ends))
def transformed_range(rng, a, k):
"""Range of a*f(b*(x - h)) + k, given the range of f."""
ends = [a * e + k for e in rng]
return (min(ends), max(ends))
inf = math.inf
# Example 1: f = sqrt(x), g(x) = -3*sqrt(2*(x + 2)) + 1
print(transformed_domain((0, inf), b=2, h=-2)) # (-2.0, inf)
print(transformed_range((0, inf), a=-3, k=1)) # (-inf, 1)
# Example 2: f = sqrt(9 - x^2), g(x) = -2*f(3*(x - 1)) + 4
print(transformed_domain((-3, 3), b=3, h=1)) # (0.0, 2.0)
print(transformed_range((0, 3), a=-2, k=4)) # (-2, 4)
# Negative b: g(x) = sqrt(4 - 2x) = sqrt(-2*(x - 2))
print(transformed_domain((0, inf), b=-2, h=2)) # (-inf, 2.0)The min and max calls handle the flips caused by negative a or b. Without them, a negative factor would return an interval written backward.
You can also test the answer for Example 2 by sampling the function directly.
import math
def g(x):
return -2 * math.sqrt(9 - (3 * (x - 1)) ** 2) + 4
xs = [2 * i / 1000 for i in range(1001)] # 1001 points across [0, 2]
vals = [g(x) for x in xs]
print(min(vals), max(vals)) # -2.0 4.0
try:
g(2.1) # outside the predicted domain
except ValueError:
print("outside domain") # outside domainThe sampled minimum and maximum match [−2, 4]. A value just beyond x = 2 makes the square root fail, which matches the predicted domain [0, 2].
Excluded values and asymptotes
Some parent functions have a domain or range with a hole instead of a boundary. The reciprocal function f(x) = 1/x has domain x ≠ 0 and range y ≠ 0. The same rules apply to the excluded value.
Take g(x) = 2/(x − 3) + 1. This is g(x) = 2·f(x − 3) + 1, so a = 2, b = 1, h = 3, k = 1.
- The excluded input 0 moves to 0 + 3 = 3, so the domain is x ≠ 3.
- The excluded output 0 moves to 2·0 + 1 = 1, so the range is y ≠ 1.
The vertical asymptote moved from x = 0 to x = 3. The horizontal asymptote moved from y = 0 to y = 1. Shifts and stretches move asymptotes the same way they move points. A reflection also moves the excluded value, but the value 0 only stays at 0 if no shift is applied.
Vertex form and quadratics
The parent f(x) = x² has domain (−∞, ∞) and range [0, ∞). For g(x) = a(x − h)² + k, the domain is still all real numbers, because horizontal changes cannot move an unbounded domain. The range depends on the sign of a.
- If a > 0: the range is [k, ∞), and k is the minimum value.
- If a < 0: the range is (−∞, k], and k is the maximum value.
For g(x) = −2(x − 3)² + 1, a is negative, so the range is (−∞, 1]. The vertex (3, 1) is the highest point.
Common mistakes
- Forgetting that negative b flips the domain. For g(x) = √(−x), the domain is (−∞, 0], not [0, ∞). The inside expression −x must be at least 0, so x ≤ 0.
- Multiplying instead of dividing on the domain side. The inside expression is b(x − h), so the domain endpoints are divided by b. For g(x) = √(2x), the domain starts where 2x = 0, and a stretched or compressed domain scales by 1/b.
- Assuming a stretch always changes the range. Multiplying by a does nothing visible to ℝ. It also does not change [0, ∞) when a > 0. The effect shows up only when an endpoint is nonzero, or when a < 0.
- Ignoring open and closed endpoints. Transformations keep an endpoint open if it was open, and closed if it was closed. A flip only swaps which side the endpoint is on.
- Skipping a check. Map one or two key points through the rule (x, y) → (x/b + h, a·y + k). If your interval does not contain their images, something is wrong.
Exercises
Exercise
A function f has domain [−4, 2] and range [1, 5]. Find the domain and range of g(x) = −f(2(x + 1)) + 3.
Show answer
Here a = −1, b = 2, h = −1, k = 3. For the domain, 2(x + 1) must lie in [−4, 2]. Dividing by 2 gives x + 1 in [−2, 1], so x is in [−3, 0]. For the range, multiply [1, 5] by −1 to get [−5, −1], then add 3 to get [−2, 2]. The domain is [−3, 0] and the range is [−2, 2].
Exercise
State the domain and range of g(x) = −1/(x + 2) + 4, and name the asymptotes.
Show answer
This is the reciprocal parent with a = −1, h = −2, k = 4. The excluded input moves from 0 to −2, so the domain is all real x with x ≠ −2. The excluded output moves from 0 to 4 (the multiplication by −1 leaves 0 at 0), so the range is all real y with y ≠ 4. The vertical asymptote is x = −2 and the horizontal asymptote is y = 4.
Exercise
Without sketching, give the domain and range of g(x) = −2(x + 1)² − 5. Explain why the domain does not depend on the stretch or the shift.
Show answer
The parent x² accepts every real number, so no horizontal change can restrict or move the domain: it is (−∞, ∞). Because a = −2 is negative, the graph opens downward. The vertex is (−1, −5), which is the maximum, so the range is (−∞, −5].