Algebra › Section C · Graphs and functions › Topic C.6

Graphs of functions, domain, and range

A graph is a function's portrait: every value, trend and limitation visible at once. This topic builds the two questions you ask of every graph — what goes in, and what comes out — and the skill of reading behaviour off the curve.

A graph is a record of behaviour

A rule like \(f(x) = x^2\) hides its story inside the arithmetic. Plot every input-output pair, though, and the story appears: a U-shaped curve whose lowest point sits at the origin, rising on both sides. From that picture you can answer questions the formula never announces — where does the function top out? over which intervals does it climb? which inputs are even allowed? Reading a graph fluently is a skill in its own right, and it starts with a test that tells you whether a curve deserves to be called a function at all.

The vertical line test

A function promises exactly one output for each input, and a graph honours that promise exactly when no vertical line crosses it more than once — a vertical line marks one input \(x\), and crossing it twice would mean two outputs for that one input. A parabola passes the test. A full circle fails it: a vertical line through its middle hits the top and the bottom arcs, so a circle does not describe \(y\) as a function of \(x\). The test is quick, visual and decisive.

The basic function families

A handful of simple functions appear so often that their shapes should be instantly recognisable. The identity function \(f(x) = x\) is a straight diagonal line. The square function \(f(x) = x^2\) is a U-shaped parabola opening upward. The cube function \(f(x) = x^3\) is an S-shaped curve climbing through the origin. The square root function \(f(x) = \sqrt{x}\) starts at the origin and runs only to the right. The absolute value function \(f(x) = |x|\) is a V with its corner at the origin. Spotting the family lets you predict domain, range and behaviour before computing anything.

Domain: the allowed inputs

The domain of a function is the set of inputs it will accept. When a formula is given with no other context, the domain is every real number for which the formula makes sense, and only two things can go wrong: dividing by zero, or taking an even root of a negative number. So \(g(x) = \frac{5}{x + 3}\) has domain all real numbers except \(-3\), and \(h(x) = \sqrt{2x - 6}\) needs \(2x - 6 \ge 0\), so its domain is \(x \ge 3\). A formula that is a polynomial, like \(x^2 + 3x\), never misbehaves: its domain is all real numbers.

Range: the outputs produced

The range is the set of outputs the function actually produces — not the ones it might like to. For \(f(x) = x^2\), a square is never negative, so the range is \(y \ge 0\): the graph never dips below the x-axis. For \(h(x) = \sqrt{2x - 6}\), a principal square root is never negative, so the range is also \(y \ge 0\). Ranges are harder to pin down from formulas because you must ask what the formula can never achieve, not just what it can.

Domain and range from a graph

A graph answers both questions by projection. Sweep a vertical line across the graph: the x-values it touches form the domain. Then sweep a horizontal line: the y-values it touches form the range. For a parabola with vertex at \((1, -4)\), the domain is all real numbers — the curve runs forever left and right — while the range is \(y \ge -4\), since the vertex is the lowest point the graph ever reaches. Projections also expose endpoints: a graph that simply stops has a finite domain ending where the drawing ends.

Worked example: reading a described graph

The graph of \(g\) begins at the point \((-2, 1)\), rises to a peak at \((0, 5)\), falls to a low point at \((3, -1)\), then rises to \((5, 2)\) and stops. Domain: the drawing exists from \(x = -2\) to \(x = 5\), so the domain is \([-2, 5]\). Range: the graph never rises above the peak 5 nor dips below the low point \(-1\), so the range is \([-1, 5]\). Behaviour: \(g\) increases on \((-2, 0)\), decreases on \((0, 3)\) and increases again on \((3, 5)\). The minimum value is \(g(3) = -1\) and the maximum value is \(g(0) = 5\), both read straight off the turning points.

Values, zeros and behaviour

Three reading skills cover most graph questions. First, values: \(f(3)\) is the height of the graph above \(x = 3\), so locating 3 on the x-axis and looking up gives the output. Second, zeros: the inputs where the graph meets the x-axis are the zeros of the function — the solutions of \(f(x) = 0\) and the x-intercepts of the graph. Third, behaviour: on intervals where the graph climbs reading left to right the function is increasing, and where it descends it is decreasing; the turnarounds are its maximum and minimum points.

The difference quotient

How fast is a function changing? Between two inputs \(a\) and \(b\), the average rate of change is

\frac{f(b) - f(a)}{b - a}

the change in output divided by the change in input — the slope of the straight line joining the two points on the graph. For \(f(x) = x^2\) from \(x = 1\) to \(x = 3\), it is \(\frac{9 - 1}{3 - 1} = 4\): on average, the function gains 4 output units per input unit over that stretch. Unlike a line, a curve's rate varies from interval to interval, and shrinking the interval toward a single point is precisely the idea that becomes the derivative in calculus.

Worked example: a parking garage's function

A garage charges $4 for the first hour and $2 for each additional hour, up to a daily maximum of $14, and bills only whole hours. With \(h\) a whole number of hours, \(C(h) = 4 + 2(h - 1)\) for \(1 \le h \le 6\), and \(C(h) = 14\) once the maximum is reached: \(C(6) = 4 + 2(5) = 14\), so 6 hours already costs the daily maximum, and 7 or more hours cost the same $14. The domain is the whole hours 1 through 24 (a day has 24), the rule is piecewise — one formula per stretch — and the range is the achievable costs \(\{4, 6, 8, 10, 12, 14\}\). Application contexts shrink domains: hours are whole here, so the graph is a staircase, not a curve.

Common mistakes to avoid

Swapping the two sets is the top error: the domain lives on the x-axis and the range on the y-axis, never the reverse. Second, projecting the range from the wrong end: the range is which y-values the graph touches, not which x-values. Third, overstating domains: \(\sqrt{2x - 6}\) accepts \(x = 3\) exactly, so its domain is \(x \ge 3\), not \(x > 3\). Fourth, calling every curve a function — run the vertical line test first, and a circle fails it. Finally, in applications, reporting a domain the context forbids: the garage's formula may accept 6.5, but whole-hour billing removes it.

Key takeaways

A graph represents a function exactly when it passes the vertical line test: no input has two outputs. Learn the basic family shapes — line, parabola, cube curve, square root curve, absolute value V — and their standard domains and ranges come free. The domain excludes inputs that divide by zero or take even roots of negatives; the range is the outputs actually reached, and both are read from a graph by projecting onto the x-axis and y-axis. Graphs also reveal zeros, increasing and decreasing intervals, and maximum and minimum values, while the difference quotient \(\frac{f(b) - f(a)}{b - a}\) measures the average rate of change between two points.

Flashcards

Flashcard

Vertical line test

A graph is a function when no vertical line crosses it twice

One input must have exactly one output.

Test your understanding

Question 1 of 5

Why does a full circle fail the vertical line test?

Question 2 of 5

What is the domain of g(x) = 5/(x + 3)?

Question 3 of 5

What is the domain of h(x) = √(2x − 6)?

Question 4 of 5

What is the average rate of change of f(x) = x² from x = 1 to x = 3?

Question 5 of 5

What is the range of f(x) = x²?

← Previous topicNext topic →