Sub topic 9
Tracking key points with a mapping rule
This chapter assumes you can evaluate functions in function notation and plot points. It also assumes you know the shifts, stretches, and reflections from the earlier chapters. You will turn the equation g(x) = a·f(b(x − h)) + k into a rule that moves individual points. Then you will use that rule to sketch graphs quickly and to check equations.
Why track points instead of whole graphs
A graph is infinitely many points, but you rarely need all of them. A parent function is usually pinned down by a few key points. These are points where the shape is easy to read, such as:
- the vertex of x² or |x|, which is (0, 0)
- the endpoint of √x, which is (0, 0)
- the inflection point of x³, which is also (0, 0)
- a few extra points that fix the scale, such as (1, 1) or (2, 4)
A transformation acts on every point of the graph in the same way. If you move the key points correctly, you can draw the new graph by connecting them with the parent function's shape. Moving points is also more reliable than redrawing a curve by eye, because each point is just arithmetic.
The mapping rule
Start with y = f(x) and build g(x) = a·f(b(x − h)) + k. Suppose (x, y) is a point on the graph of f, so y = f(x). Which point on g comes from it?
Try the input x/b + h. Then:
g(x/b + h) = a·f(b·(x/b + h − h)) + k = a·f(x) + k = a·y + k
So the point (x/b + h, a·y + k) lies on g. This gives the mapping rule:
(x, y) → (x/b + h, a·y + k)
Read it one coordinate at a time:
| Coordinate | What happens | Which parameters act |
|---|---|---|
| x (horizontal) | divide by b, then add h | b and h |
| y (vertical) | multiply by a, then add k | a and k |
The two coordinates never mix. Horizontal parameters touch only x, and vertical parameters touch only y.
Why x is divided by b
Here the equation and the point rule seem to disagree. The equation multiplies by b inside the function, but the point rule divides x by b.
The reason is that the equation works on the input and the point rule works on the output. In g(x) = f(bx), the graph of g reaches the value f(x) when the input to g is x/b, because b·(x/b) = x. If b = 2, every feature of f happens at half the x-value. The graph is squeezed toward the y-axis, so each point's x-coordinate is halved.
The same effect explains why horizontal shifts feel backward. In f(x − h), the old value f(0) appears when x − h = 0, which means x = h. The graph moves right for positive h, which is the opposite of what the minus sign might suggest.
Order of operations for points
For a point, the order within each coordinate is fixed. Scale first, then shift:
- x: divide by b, then add h
- y: multiply by a, then add k
If you shift first and scale second, you get a different point. Take the point (2, 4), with b = 2 and h = 1. The correct order gives x = 2/2 + 1 = 2. The wrong order gives (2 + 1)/2 = 1.5. The wrong order matches the equation g(x) = f(2x − 1) instead of f(2(x − 1)), a different function.
This is the reverse of the order you read in the equation. The equation applies "subtract h, then multiply by b" to the input. The point rule undoes those steps, so "divide by b, then add h" appears in the opposite sequence.
A worked example with a parabola
Take f(x) = x² with key points (−2, 4), (−1, 1), (0, 0), (1, 1), (2, 4). Let a = −2, b = 1, h = 3, k = 1. The target is g(x) = −2(x − 3)² + 1.
Apply the rule to each point:
- (−2, 4) → (−2/1 + 3, −2·4 + 1) = (1, −7)
- (−1, 1) → (2, −1)
- (0, 0) → (3, 1)
- (1, 1) → (4, −1)
- (2, 4) → (5, −7)
The vertex moved from (0, 0) to (3, 1). The graph opens downward because a is negative. It is also narrower, because |a| = 2 stretches distances from the vertex vertically. The code below confirms that the mapped points satisfy the equation.
points = [(-2, 4), (-1, 1), (0, 0), (1, 1), (2, 4)] # on y = x^2
a, b, h, k = -2, 1, 3, 1
mapped = [(x / b + h, a * y + k) for x, y in points]
print(mapped) # [(1.0, -7), (2.0, -1), (3.0, 1), (4.0, -1), (5.0, -7)]
g = lambda x: a * (b * (x - h)) ** 2 + k
print(all(g(px) == py for px, py in mapped)) # TrueWrapping the rule in a reusable checker
A small helper makes it easy to test any parent function. It maps the points, builds g from the equation, and checks that the two agree. Floating-point division can introduce tiny errors, so it compares with math.isclose instead of ==.
import math
def map_points(points, a=1, b=1, h=0, k=0):
"""Apply (x, y) -> (x/b + h, a*y + k) to each point."""
return [(x / b + h, a * y + k) for x, y in points]
def agrees(f, points, a=1, b=1, h=0, k=0):
"""True if every mapped point lies on g(x) = a*f(b*(x - h)) + k."""
g = lambda x: a * f(b * (x - h)) + k
return all(math.isclose(g(px), py, abs_tol=1e-12)
for px, py in map_points(points, a, b, h, k))
# Absolute value: stretch by 3, flip, squeeze horizontally, shift.
abs_pts = [(-2, 2), (0, 0), (2, 2)]
print(map_points(abs_pts, a=-3, b=2, h=1, k=2))
# [(0.0, -4), (1.0, 2), (2.0, -4)]
print(agrees(abs, abs_pts, a=-3, b=2, h=1, k=2)) # True
# Square root with b = -1: a reflection across the y-axis, then a shift.
sqrt_pts = [(0, 0), (1, 1), (4, 2)]
print(map_points(sqrt_pts, b=-1, h=2))
# [(2.0, 0), (1.0, 1), (-2.0, 2)]
print(agrees(math.sqrt, sqrt_pts, b=-1, h=2)) # TrueIn the absolute value example, b = 2 halves each x-distance from the vertex. The points (−2, 2) and (2, 2) move to x = 0 and x = 2, which are only 1 unit from the new vertex at x = 1. In the square root example, g(x) = √(2 − x). A negative b sends x to −x before the shift, so the endpoint moves to x = 2 and the curve opens to the left.
Negative a and b are reflections
The rule handles reflections without any special case:
- a < 0 flips y, so the graph reflects across the horizontal line y = k.
- b < 0 flips x, so the graph reflects across the vertical line x = h.
The reflection lines are the lines through the moved center, not the original axes. For g(x) = −2(x − 3)² + 1, the flip happens about y = 1. That is why the vertex ended at (3, 1) and not at (3, −1).
When a reflection and a stretch occur together, |a| and |b| give the stretch size and the signs give the flips. For a = −3, the graph is stretched vertically by a factor of 3 and flipped.
Going backward: from g to f
You can also reverse the rule. If you have points on g and know the parameters, recover the points on f:
(X, Y) → (b(X − h), (Y − k)/a)
This is useful when an exercise gives you a transformed graph and asks which parent function and which parameters produced it. Choose a trial set of parameters, pull the key points of g back, and check whether they land on a familiar parent graph. If they do, your parameters are right.
For the parabola above, pulling (5, −7) back gives (1·(5 − 3), (−7 − 1)/(−2)) = (2, 4), which is on y = x².
Using mapped points to find the new domain and range
If the parent's domain or range has a boundary, that boundary is carried by a key point, so you can read off the new domain and range from the mapped points. For √x, the endpoint (0, 0) is the boundary. After mapping with b = −1 and h = 2 it becomes (2, 0). The curve extends to the left, so the domain is x ≤ 2. The range is still y ≥ 0, because a = 1 and k = 0.
The later chapter on domain and range develops this idea fully. For now, remember that boundary points are the most valuable key points to track.
Common mistakes
- Multiplying x by b instead of dividing. The rule uses x/b. Check with a single point if you are unsure.
- Shifting before scaling. Scale first within each coordinate.
- Forgetting that h is not the shift when the inside is bx − c. Factor out b first.
- Mixing coordinates. The x-values depend only on b and h. The y-values depend only on a and k.
- Trusting float equality. Use
math.isclosewhen b is not a power of two.
Exercise
The point (3, 5) lies on the graph of y = f(x). The function g is defined by g(x) = −2·f(½(x + 4)) + 1. Which point on g comes from (3, 5)?
Show answer
Rewrite the inside as ½(x − (−4)), so a = −2, b = ½, h = −4, k = 1. Then x → 3/(½) + (−4) = 6 − 4 = 2, and y → −2·5 + 1 = −9. The point is (2, −9). Check: g(2) = −2·f(½·6) + 1 = −2·f(3) + 1 = −2·5 + 1 = −9.
Exercise
The graph of g has a vertex at (−1, 4) and passes through (1, 0). It is known to be a transformation of f(x) = x² with b = 1 and a < 0. Use the point rule backward to find a, h, and k, and write g(x).
Show answer
The vertex of f is (0, 0), so it maps to (h, k) = (−1, 4). The point (1, 0) must come from some point (x, x²) on f, where x = 1 − (−1) = 2 because b = 1. Then y = 4, and a·4 + 4 = 0 gives a = −1. So g(x) = −(x + 1)² + 4. Check: g(1) = −4 + 4 = 0.