Composite functions: inside and outside
A composite function f(g(x)) means: do g first, then feed the answer into f. If f(x) = x² and g(x) = x − 2, then f(g(x)) = (x − 2)². Doing it the other way round gives g(f(x)) = x² − 2, which is a different graph.
Quick rules for the graph of y = f(x):
- f(x − h): slide right by h (inside, sideways, opposite to the sign).
- f(x) + k: slide up by k (outside).
- −f(x): flip over the x-axis. f(−x): flip over the y-axis.
- a·f(x): stretch up and down. f(bx): squeeze sideways.
The full set of moves has its own lesson: Transformations of functions.
Absolute value on a graph: |f(x)| and f(|x|)
The absolute value |a| is the size of a without its sign: |−3| = 3.
|f(x)| (outside): draw y = f(x). Keep the parts on or above the x-axis. Flip the parts below it upward (mirror in the x-axis). The result never goes below zero.
f(|x|) (inside): draw y = f(x) for x ≥ 0 only. Throw away the left side and replace it by a mirror copy of the right side. The result is symmetric about the y-axis (an even function).
Example: y = |x² − 2| has zeros at ±√2 and a peak value 2 at x = 0. y = (|x| − 1)² has zeros at ±1 and y = 1 at x = 0.
Geometric image of an equation
The geometric image (graph) of an equation in x and y is the set of all points (x, y) that make it true.
- x² + y² = r²: a circle with centre (0, 0) and radius r. Every point is r away from the centre.
- |x| + |y| = r: a diamond (a square turned by 45°) with corners (±r, 0) and (0, ±r). Its area is 2r².
- y² = x: a parabola lying on its side. It is the union of y = √x and y = −√x.
Tip: to draw |x| + |y| = r, draw x + y = r in the first quarter only (x, y ≥ 0), then mirror it into the other three quarters.
Vertical line test: if some vertical line meets the picture twice, one x has two y values, so it is not the graph of a function. The circle and y² = x fail; y = x², y = |x| pass.
A plan for sketching
- Find the domain (which x are allowed).
- Mark the intercepts (where it cuts the axes).
- Check symmetry (even: mirror in the y-axis).
- Plot a few key points and join them smoothly.
Graphs also count solutions: the number of times y = f(x) meets y = g(x) is the number of solutions of f(x) = g(x).
Try it: predict, then check
In the 3D board pick y = (x − h)². Guess where the lowest point goes when h = 3, then slide h to 3. Pick |x| + |y| = r and guess the area for r = 3 (answer 18). At home: fold a paper in half, draw half of a heart shape on one side, cut along the line and open it. The fold line is your y-axis and you just made f(|x|).
Key formulas and definitions
- f(x − h): shift right h; f(x) + k: shift up k
- |f(x)|: flip the part below the x-axis up
- f(|x|): keep x ≥ 0, mirror it to x < 0
- x² + y² = r²: circle, centre (0, 0), radius r
- |x| + |y| = r: diamond, area 2r²
- Vertical line test: one x must give one y
Worked examples
1. f(x) = x², g(x) = x − 2. Find f(g(x)) and g(f(x)).
f(g(x)) = (x − 2)² : the parabola x² slid 2 to the right, lowest point (2, 0). g(f(x)) = x² − 2 : the parabola slid 2 down, lowest point (0, −2). They are different.
2. Sketch y = |x² − 2|. Give the zeros and the y-intercept.
Draw x² − 2 first (lowest point (0, −2), zeros ±√2 ≈ ±1.41). Flip the dip between the zeros upward: the point (0, −2) goes to (0, 2). Zeros ±√2, y-intercept 2.
3. Sketch y = (|x| − 1)².
For x ≥ 0 it is (x − 1)²: lowest point (1, 0), and at x = 0 the value is 1. Mirror it to the left: zeros at x = ±1, y-intercept 1, a small hump at (0, 1) like the letter W.
4. Draw |x| + |y| = 2 and find its area.
Corners at (2, 0), (0, 2), (−2, 0), (0, −2). It is a square with diagonals of length 4. Area = ½ × 4 × 4 = 8 (also 2r² = 2 × 4 = 8).
5. On the circle x² + y² = 9, find y when x = 2.
4 + y² = 9, so y² = 5, y = ±√5 ≈ ±2.24. Two points: one on the upper half, one on the lower half.
6. Is the graph of y² = x the graph of a function y = f(x)?
No. The vertical line x = 4 cuts it at y = 2 and y = −2: one x, two y. It is two function graphs together: y = √x (upper) and y = −√x (lower).
7. How many solutions does (x − 2)² = |x| have?
Draw y = (x − 2)² and y = |x|. For x ≥ 0: x² − 4x + 4 = x gives x² − 5x + 4 = 0, so x = 1 or 4. For x < 0: x² − 3x + 4 = 0 has D = 9 − 16 < 0, none. So 2 solutions. The graph shows the same: two meeting points on the right.
8. f(x) = √x and g(x) = x² − 4. Find the domain of f(g(x)).
f(g(x)) = √(x² − 4). Need x² − 4 ≥ 0, so x ≤ −2 or x ≥ 2. The graph has two separate arms: one starting at (2, 0) going right, one starting at (−2, 0) going left.
Common mistakes
- Moving (x − 2)² to the left. The minus sign inside moves the graph right.
- Mixing up f(g(x)) with g(f(x)). The order matters: the inside one is done first.
- Thinking |f(x)| and f(|x|) are the same. One flips the bottom up; the other mirrors the right side.
- Calling every curve a function graph. A circle fails the vertical line test.