Sub topic 10
How Transformations Change Domain and Range
Assume you know function notation, can evaluate \(f(x)\), and understand domain and range. You should also know the graphs of basic functions such as \(x^2\), \(|x|\), \(\sqrt{x}\), and \(x^3\).
A graph transformation changes the inputs, outputs, or both. For
\[ g(x)=a f\bigl(b(x-h)\bigr)+k, \]
the constants have these roles:
- \(h\) shifts the graph horizontally.
- \(k\) shifts the graph vertically.
- \(a\) changes the output, so it affects the range.
- \(b\) changes the input, so it affects the domain.
For the usual transformation rules, assume \(a\ne0\) and \(b\ne0\).
How the domain changes
The domain of \(f\) is the set of allowed input values. In \(g(x)\), the input given to \(f\) is
\[ b(x-h). \]
Therefore, \(x\) belongs to the domain of \(g\) only when
\[ b(x-h) \]
belongs to the domain of \(f\).
If \(D\) is the domain of \(f\), the transformed domain is
\[ D_g=\left\{\frac{u}{b}+h:u\in D\right\}. \]
This formula explains why horizontal changes can feel backward. To find the new \(x\)-coordinate, solve
\[ u=b(x-h) \]
for \(x\):
\[ x=\frac{u}{b}+h. \]
For example, let \(f(x)=\sqrt{x}\). Its domain is \([0,\infty)\). Define
\[ g(x)=\sqrt{2(x-3)}. \]
The expression inside the square root must be nonnegative:
\[ 2(x-3)\ge0. \]
Thus \(x\ge3\), so the domain of \(g\) is \([3,\infty)\).
The horizontal factor \(b=2\) compresses distances from the vertical boundary by a factor of \(2\). The shift \(h=3\) moves the boundary to the right.
How the range changes
The range is the set of output values a function can produce. If \(R\) is the range of \(f\), then the transformed range is
\[ R_g=\{ay+k:y\in R\}. \]
The input changes \(b\) and \(h\) do not change which output values are possible. They only change where those outputs occur horizontally.
The output changes \(a\) and \(k\) do change the range:
- Multiplying by \(a>1\) stretches output values.
- Multiplying by \(0<a<1\) compresses output values.
- A negative \(a\) reflects the outputs across the \(x\)-axis and then scales them.
- Adding \(k\) shifts every output up or down.
For \(f(x)=x^2\), the range is \([0,\infty)\). Consider
\[ g(x)=-2(x-3)^2+1. \]
The original outputs satisfy \(y\ge0\). Applying \(y\mapsto-2y+1\) gives
\[ -2y+1\le1. \]
Therefore, the range of \(g\) is \((-\infty,1]\). The maximum value \(1\) occurs at \(x=3\).
| Change | Domain effect | Range effect |
|---|---|---|
| \(f(x-h)\) | Shift inputs by \(h\) | None |
| \(f(bx)\) | Scale or reflect inputs | None |
| \(a f(x)\) | None | Scale or reflect outputs |
| \(f(x)+k\) | None | Shift outputs by \(k\) |
Tracking the endpoints
For a restricted domain or range, transform the boundary points and check the direction of the interval. A negative scale reverses order.
def transform_interval(interval, a=1, b=1, h=0, k=0):
"""Transform finite interval endpoints for g(x) = a*f(b*(x-h)) + k."""
left, right = interval
# x = u/b + h maps the old domain endpoints.
new_x = sorted((left / b + h, right / b + h))
# y = a*v + k maps the old range endpoints.
new_y = sorted((a * left + k, a * right + k))
return tuple(new_x), tuple(new_y)
print(transform_interval((0, 4), a=-2, b=2, h=3, k=1))
# ((3.0, 5.0), (-7, 1))The code maps the interval \([0,4]\) as a domain and as a range. In an actual function, use the first mapping for domain values and the second for range values.
Worked example
Let \(f(x)=\sqrt{x-2}\), whose domain is \([2,\infty)\) and range is \([0,\infty)\). Define
\[ g(x)=-3f(2(x-5))+4. \]
For the domain, map each old input \(u\) using
\[ x=\frac{u}{2}+5. \]
The old boundary \(u=2\) maps to \(x=6\), so the new domain is \([6,\infty)\).
For the range, map each old output \(y\) using
\[ -3y+4. \]
When \(y=0\), the output is \(4\). As \(y\) increases without bound, \(-3y+4\) decreases without bound. The new range is therefore \((-\infty,4]\).
Exercise
The function f has domain [-2, 6] and range [1, 5]. Find the domain and range of g(x) = 2f(-x + 3) - 4.
Show answer
Rewrite the input as -(x - 3), so b = -1 and h = 3. The domain endpoints map by x = u/(-1) + 3: -2 maps to 5 and 6 maps to -3, giving [-3, 5]. The range maps by y = 2v - 4: 1 maps to -2 and 5 maps to 6, giving [-2, 6].