📘 CodingMarble Learn

Graphs of Composite Functions and Geometric Images of Equations

A change inside the bracket moves a graph sideways; a change outside moves it up, down or flips it. |f(x)| flips the part under the x-axis up, and f(|x|) copies the right half to the left. An equation in x and y draws a picture too, such as a circle or a diamond, and it is the graph of a function only if every vertical line cuts it once.

🎬 Step-by-step story

  1. Start with y = x². Move the point: every x has just one y. That is what makes it a function graph.
  2. Put x − 2 inside: y = (x − 2)². The grey ghost is the old graph. The whole curve slides 2 steps to the right.
  3. Wrap the whole thing in |·|: y = |x² − 2|. The part that was under the x-axis flips up like a pancake.
  4. Put |x| inside: y = (|x| − 1)². The right half stays and is copied to the left like a mirror.
  5. Equations draw shapes too. |x| + |y| = 2 makes a diamond with corners at 2 on each axis. Slide r to grow it.
  6. Free play. Pick the circle or the sideways parabola. A vertical line cuts them twice, so they are not function graphs.

Tip: drag the 3D scene to turn it. Use two fingers to zoom.

🤔 Common doubts, cleared

What does "one y for each x" mean?

Draw a vertical line at any x. If it cuts the curve once, the curve is a function graph. The point on y = x² always has just one y.

Why does (x − 2)² go right when there is a minus?

The lowest point needs x − 2 = 0, so x = 2. The vertex moved to x = 2, which is on the right.

Why does the part under the axis flip up?

The absolute value removes the minus sign. A negative height becomes a positive height of the same size.

Why is f(|x|) always symmetric?

|x| and |−x| are the same number, so x and −x give the same y. The left side is a mirror of the right.

Why is |x| + |y| = 2 a diamond and not a circle?

In the first quarter it is x + y = 2, a straight line. The four quarters give four straight sides.

Is a circle not a function at all?

The whole circle is not a function graph, but its upper half y = √(r² − x²) is.

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):

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.

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

  1. Find the domain (which x are allowed).
  2. Mark the intercepts (where it cuts the axes).
  3. Check symmetry (even: mirror in the y-axis).
  4. 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

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

Practice quiz

1. The graph of y = (x − 3)² is y = x² moved:
2. |f(x)| does this to the part under the x-axis:
3. x² + y² = 25 is a circle of radius:
4. The shape of |x| + |y| = 3 is a:
5. The graph of f(|x|) is always symmetric about the:

Practice: answer these yourself

Type or choose your answer, then press Check. Use a hint if you are stuck; the full solution appears after you answer.

Frequently asked questions

What is a composite function?

A function made by feeding the output of one function into another, written f(g(x)).

How do I graph an absolute value function?

Draw the plain graph first. For |f(x)| flip the negative part up. For f(|x|) copy the right half to the left.

What is the vertical line test?

If every vertical line cuts a curve at most once, the curve is the graph of a function.

Learn first

Learn next

Related lessons

All Maths lessons