Sub topic 1
Starting from Parent Functions
Prerequisites
This chapter assumes you can evaluate f(x) at a given x, plot points on the coordinate plane, recognize the graphs of x, x², |x|, √x, and x³, and state the domain and range of a function.
Starting from parent functions
A parent function is the simplest function in a family, such as f(x) = x², f(x) = |x|, or f(x) = √x. Its graph is the reference shape. Every transformed graph is a copy of a parent graph that has been moved, stretched, compressed, or reflected. Identifying the parent tells you the starting shape.
Two ways to change a function: the output and the input
Changes outside the function, such as adding a constant, act on the output. They move the graph vertically. Changes inside the parentheses, such as subtracting h from x, act on the input. They move the graph horizontally.
| Form | Change | Direction |
|---|---|---|
| f(x) + k | Output shift | Up if k > 0 |
| f(x − h) | Input shift | Right if h > 0 |
Moving a graph up and down
For g(x) = f(x) + k, each point (x, y) on f moves to (x, y + k). A positive k moves the graph up, and a negative k moves it down.
def shift_up(f, k):
return lambda x: f(x) + k
f = lambda x: x ** 2
g = shift_up(f, 3)
print(g(0)) # 3
print(g(2)) # 7Moving a graph left and right
For g(x) = f(x − h), each point (x, y) on f moves to (x + h, y). The sign works opposite to what it looks like: f(x − 2) moves the graph right 2 units.
def shift_right(f, h):
return lambda x: f(x - h)
f = lambda x: x ** 2
g = shift_right(f, 2)
print(g(2)) # 0
print(g(3)) # 1> Note: f(x + 2) moves the graph left 2 units, because x + 2 = x − (−2).
Exercise
Exercise
The graph of f(x) = |x| is shifted 4 units left and 1 unit down. What is the equation of the new graph?
Show answer
g(x) = |x + 4| − 1. The left shift changes x to x + 4 inside the function, and the down shift subtracts 1 outside it.