Mascot image.
#Math#Differentiation

Review of Functions

Real Numbers

Differentiation describes how one real-valued quantity responds when another is perturbed, so every object in this course eventually resolves to a real number. Before functions can be discussed honestly, we must agree on what their inputs are and how we describe collections of those inputs.

For the purposes of this course it suffices to regard a real number as an infinite decimal expansion. A rational number is one whose decimal either terminates or eventually repeats; an irrational number is one whose decimal neither terminates nor repeats. Examples are

52=2.5,133=4.333(rational),-\tfrac{5}{2} = -2.5, \qquad \tfrac{13}{3} = 4.333\ldots \qquad \text{(rational)}, 2=1.414213,π=3.14159(irrational).\sqrt{2} = 1.414213\ldots, \qquad \pi = 3.14159\ldots \qquad \text{(irrational)}.

The decimal picture carries one ambiguity worth flagging: a real number whose decimal terminates admits a second expansion ending in an infinite string of 99s, for instance 1=0.9991 = 0.999\ldots and 2.5=2.4999-2.5 = -2.4999\ldots. Whenever two decimals differ only in this way we treat them as naming the same real number. No other non-uniqueness arises.

A letter such as xx is called a real variable when we intend for it to stand for any one real number.

Geometrically, fix an infinite straight line, choose a point on it to mark 00, and choose a unit length. Each real number then corresponds to exactly one point on this line, and each point determines exactly one real number.

The real number line with integer ticks from -4 to 4, and the points -5/2 and 13/3 marked
Definition 1 (The Real Number Line)

The infinite line together with its fixed zero and unit length is called the (real) number line. Each point on the number line is identified with a real number, and each real number with a point; we speak of the number aa and the point aa interchangeably.

Remark

The real numbers can be constructed rigorously from the rationals, but doing so requires machinery beyond the aims of this course. We will treat the real numbers informally throughout and accept their familiar arithmetic and ordering properties without proof.

Inequalities

Once points have positions on the line, comparison becomes a geometric statement. Four symbols express the possible comparisons between two real numbers xx and yy:

x<y,xy,x>y,xy,x < y, \qquad x \leq y, \qquad x > y, \qquad x \geq y,

read respectively as ”xx is less than yy”, ”xx is less than or equal to yy”, ”xx is greater than yy”, and ”xx is greater than or equal to yy”. Geometrically, x<yx < y means that the point xx lies strictly to the left of yy on the number line; xyx \leq y allows equality.

The expression a<b<ca < b < c is shorthand for the pair of inequalities a<ba < b and b<cb < c. Analogous meanings are given to abca \leq b \leq c, a<bca < b \leq c, and ab<ca \leq b < c. The three numbers must retain the same relative positions on the line that the inequality signs dictate when read left to right; a string such as 3<4>13 < 4 > 1 is therefore not written, even though each individual comparison is true, because the middle number is not flanked consistently.

Example 1

Each of the following is a valid reading of the number line: 2<0<2-2 < 0 < \sqrt{2}, and 5252<133-\tfrac{5}{2} \leq -\tfrac{5}{2} < \tfrac{13}{3}. The statement 1<3>21 < 3 > 2 is not used in this course despite both comparisons being true, because the middle term fails to be ordered consistently with the outer ones.

Problem 1

Combine each pair of inequalities into a single chain of the form a    x    ba \;\square\; x \;\square\; b, using << or \leq in each slot so that the chain says exactly the same thing as the pair.

  1. x>3x > -3 and x5x \leq 5.
  2. x0x \geq 0 and x<7x < 7.
  3. 2x2 \leq x and x2x \leq 2.

Intervals

Most of the time we will not be working with the whole number line at once, but with a piece of it cut out by one or two inequalities. The pieces we need for this course are exactly the intervals.

Let aa and bb be real numbers with a<ba < b. The real numbers xx satisfying axba \leq x \leq b correspond geometrically to the segment from aa to bb with both endpoints included. Removing one or both endpoints gives the remaining bounded intervals. When there is no finite upper or lower endpoint, we write \infty or -\infty to indicate that the segment extends without bound; neither symbol denotes a real number.

Definition 2 (Intervals)

Let aa and bb be real numbers with a<ba < b. The intervals with endpoints aa and bb are the collections of all real numbers xx satisfying the inequality shown in the right-hand column below:

[a,b]axb,(a,b)a<x<b,[a,b)ax<b,(a,b]a<xb.\begin{aligned} [a,b] &\quad\leftrightarrow\quad a \leq x \leq b, \\ (a,b) &\quad\leftrightarrow\quad a < x < b, \\ [a,b) &\quad\leftrightarrow\quad a \leq x < b, \\ (a,b] &\quad\leftrightarrow\quad a < x \leq b. \end{aligned}

The intervals with only one finite endpoint are

[a,)xa,(a,)x>a,(,b]xb,(,b)x<b.\begin{aligned} [a,\infty) &\quad\leftrightarrow\quad x \geq a, & (a,\infty) &\quad\leftrightarrow\quad x > a, \\ (-\infty, b] &\quad\leftrightarrow\quad x \leq b, & (-\infty, b) &\quad\leftrightarrow\quad x < b. \end{aligned}

The interval [a,b][a,b] is called closed; (a,b)(a,b) is called open. An interval is half-open if exactly one endpoint is included.

Remark

The symbols \infty and -\infty mark that the interval is unbounded above or below. An inequality describing an unbounded interval may be written in two equivalent ways: a<xa < x and x>ax > a describe the same interval (a,)(a, \infty).

Graphically, a bounded interval is drawn as the segment of the number line between its endpoints, with a filled circle at an included endpoint and an unfilled circle at an excluded one. An unbounded interval is drawn with an arrow in place of the missing endpoint.

Four line segments illustrating intervals (a) (-1, 2) with open endpoints, (b) [-2, 7] with closed endpoints, (c) (2, infinity) with an open left endpoint, (d) (-infinity, sqrt(2)] with a closed right endpoint
Example 2

The four intervals shown above each illustrate one of the endpoint conventions.

  • (1,2)(-1, 2) consists of every real xx with 1<x<2-1 < x < 2; both endpoints are excluded, shown as unfilled circles.
  • [2,7][-2, 7] consists of every real xx with 2x7-2 \leq x \leq 7; both endpoints are included, shown as filled circles.
  • (2,)(2, \infty) consists of every real xx with x>2x > 2; the segment extends without bound to the right, so the right end of the drawing is an arrow rather than a circle.
  • (,2](-\infty, \sqrt{2}\,] consists of every real xx with x2x \leq \sqrt{2}; the left end is unbounded, the right endpoint is included.
Example 3

A machine shop can only operate its lathe at positive rotational speeds, and safety limits cap the speed at 30003000 revolutions per minute. Writing ω\omega for the speed, the admissible values form the half-open interval (0,3000](0, 3000]: zero is excluded because the machine is then idle, while 30003000 is included as the highest safe setting.

Problem 2

Describe each of the following as an interval and sketch it on the number line.

  1. All real xx satisfying 1x<4-1 \leq x < 4.
  2. All real xx satisfying x2<9x^2 < 9.
  3. All real xx satisfying xπx \geq -\pi.
  4. All real xx that are both strictly greater than 2-2 and less than or equal to 2\sqrt{2}.
Problem 3

A reservoir has capacity 500500 cubic metres and cannot hold a negative volume. Let VV denote the volume of water in the reservoir at a given time. Express the physically meaningful values of VV as an interval, and state whether each endpoint is open or closed.

The reason for dwelling on intervals is that they are exactly the collections of inputs we will hand to formulas later in this course.

Example 4

The expression x\sqrt{x} produces a real number precisely when x0x \geq 0, so the admissible inputs form the unbounded interval [0,)[0, \infty). The expression 1x\sqrt{1 - x} requires 1x01 - x \geq 0, that is x1x \leq 1, and its admissible inputs form (,1](-\infty, 1]. In each case the admissible inputs are described entirely by an interval. Intervals, sometimes with a few points removed, will supply the inputs for every formula we meet.

Problem 4

Determine all real xx for which the expression x2+5x\sqrt{x - 2} + \sqrt{5 - x} is defined, and write the answer as an interval.

Example 5

Given a fixed real number aa and a positive real number δ\delta, every xx satisfying aδ<x<a+δa - \delta < x < a + \delta lies in the open interval (aδ,a+δ)(a - \delta, a + \delta), and conversely. When we later say ”xx is close to aa”, we will mean xx lies in an interval of this form for some (possibly small) δ\delta.

Functions

Differentiation is a study of how one numerical quantity responds to changes in another. Before we can track how a quantity responds, we must agree on what it means for one quantity to be determined by another at all. The honest answer is the idea of a function.

A prototype is the formula y=x2y = x^2. For each real variable xx, the formula produces exactly one real number yy, namely the square of xx. Two people handed the same xx must arrive at the same yy. This single-valuedness is what distinguishes a function from a looser kind of correspondence.

Definition 3 (Function)

A function ff is a rule that assigns to each real variable xx drawn from a prescribed collection of inputs exactly one real number, denoted f(x)f(x) and read ”ff of xx”. The number f(x)f(x) is the value of ff at xx.

The collection of admissible inputs is the domain of ff; the collection of all values f(x)f(x) produced as xx runs over the domain is the range of ff. The letter xx is the independent variable. When we write y=f(x)y = f(x), the letter yy is the dependent variable, its value being fixed as soon as xx is chosen.

Remark

A formula is one way to specify a rule, but not the only one. Any unambiguous prescription that produces a single real number from each admissible input qualifies as a function. In this course every function will ultimately be described by one or more formulas, but the definition itself is formula-free.

Example 6

Let p(x)=2x35x2+x+4p(x) = 2x^3 - 5x^2 + x + 4. Substituting x=3x = 3,

p(3)=22759+3+4=5445+3+4=16,p(3) = 2 \cdot 27 - 5 \cdot 9 + 3 + 4 = 54 - 45 + 3 + 4 = 16,

and substituting x=1x = -1,

p(1)=2(1)5(1)+(1)+4=251+4=4.p(-1) = 2(-1) - 5(1) + (-1) + 4 = -2 - 5 - 1 + 4 = -4.

Polynomial evaluation requires only addition and multiplication of real numbers, so every real xx is admissible: the domain of pp is the whole number line.

Problem 5

Let f(x)=x33xf(x) = x^3 - 3x. Compute f(0)f(0), f(5)f(5), f(3)f(3), and f(7)f(-7).

Building new functions from old

The argument of a function need not be a bare letter. Any expression whose own value is a real number may be substituted, provided the resulting input still lies in the domain. Most functions in this course will be assembled this way: from a handful of basic rules, combined by evaluating one inside another.

Example 7

The area of a disc of radius r0r \geq 0 is A(r)=πr2A(r) = \pi r^2. The area added when the radius increases from rr to r+1r + 1 is

g(r)=A(r+1)A(r)=π(r+1)2πr2=π(2r+1).g(r) = A(r + 1) - A(r) = \pi (r + 1)^2 - \pi r^2 = \pi (2r + 1).

Here gg is assembled from AA by evaluation at r+1r + 1 and at rr and subtraction. Its admissible inputs are the same as those of AA, namely r0r \geq 0, and g(r)g(r) is the area gained when the radius grows from rr to r+1r + 1.

Example 8

Let f(x)=4xx2+3f(x) = \dfrac{4 - x}{x^2 + 3}. At an arbitrary real aa,

f(a)=4aa2+3,f(a) = \frac{4 - a}{a^2 + 3},

and at a+1a + 1,

f(a+1)=4(a+1)(a+1)2+3=3aa2+2a+4.f(a + 1) = \frac{4 - (a + 1)}{(a + 1)^2 + 3} = \frac{3 - a}{a^2 + 2a + 4}.

The denominator x2+3x^2 + 3 is never zero, so every real xx is admissible.

Problem 6

Let f(x)=1x2f(x) = \dfrac{1}{x - 2}. Write f(a)f(a) and f(a+h)f(a + h), and simplify the difference f(a+h)f(a)f(a + h) - f(a) over a common denominator. State the admissible inputs of ff.

Graphs

A formula can be drawn. Take two perpendicular copies of the number line sharing a common zero, one horizontal and called the xx-axis, one vertical and called the yy-axis. The resulting plane, equipped with these two axes, is the xyxy-plane. Each ordered pair of real numbers (x,y)(x, y) then marks a unique point of the xyxy-plane, with xx read off the horizontal axis and yy off the vertical.

Definition 4 (Graph of a Function)

The graph of a function ff is the collection of points (x,f(x))(x, f(x)) obtained as xx runs over the domain of ff. The horizontal axis records the independent variable xx; the vertical axis records the dependent variable y=f(x)y = f(x).

The graph of y = x squared, drawn as a parabola through the origin, with the point (2, 4) marked and dashed lines dropped to each axis
Example 9

The graph of y=x2y = x^2 is a parabola opening upward. At x=2x = 2 the height is y=4y = 4, giving the point (2,4)(2, 4) shown above. Every real xx produces a real yy, so the admissible inputs cover the whole horizontal axis; because x20x^2 \geq 0 always, the range is [0,)[0, \infty).

Sketching by plotting points

A graph can be approximated directly from a formula by evaluating ff at a representative spread of inputs, plotting the resulting points, and joining them by a smooth curve. The more closely spaced the inputs, the closer the approximation.

Example 10

Sketch the graph of f(x)=x3f(x) = x^3.

Cubing is defined for every real number, so every real xx is admissible. Tabulating at evenly spaced inputs gives

xx2-21.5-1.51-10.5-0.5000.50.5111.51.522
f(x)f(x)8-83.375-3.3751-10.125-0.125000.1250.125113.3753.37588

Plotting these nine points and joining them by a smooth curve produces the graph shown below. The curve climbs steeply for x|x| large, and is almost flat near the origin, as the table already suggests.

The graph of y = x cubed passing through the origin, with nine marked sample points at x = -2, -1.5, -1, -0.5, 0, 0.5, 1, 1.5, 2; the curve rises steeply on the right and falls steeply on the left

When the admissible inputs exclude a point, the behaviour of ff near that point is often the most interesting part of the sketch, so the tabulation should include inputs approaching the forbidden point from both sides.

Example 11

Sketch the graph of f(x)=1xf(x) = \dfrac{1}{x}.

The formula is defined for every real xx except x=0x = 0. Tabulating on either side of the excluded point,

xx3-32-21-112-\tfrac{1}{2}12\tfrac{1}{2}112233
f(x)f(x)13-\tfrac{1}{3}12-\tfrac{1}{2}1-12-2221112\tfrac{1}{2}13\tfrac{1}{3}

shows that the values grow without bound as xx approaches 00 from the right, and fall without bound as xx approaches 00 from the left. The graph therefore splits into two branches, one for x<0x < 0 and one for x>0x > 0, neither of which crosses the vertical axis.

The graph of y = 1/x in two disconnected branches: one in the third quadrant for x < 0 and one in the first quadrant for x > 0, with marked sample points on each branch; neither branch meets the vertical axis

The admissible inputs of f(x)=1/xf(x) = 1/x illustrate a phenomenon absent from the previous examples: they are not a single interval but two disconnected pieces, one strictly to the left of 00 and one strictly to the right. We will return to this point in the section on natural domains.

Linear functions

Amongst the simplest graphs are those of linear functions. They will serve throughout the course as the local model for more complicated graphs: zoomed in far enough, the graph of a well-behaved function looks straight, and the derivative will be the slope of that straight line.

Definition 5 (Linear Function)

A linear function is a function of the form f(x)=mx+bf(x) = mx + b, where mm and bb are fixed real numbers. Its graph is a straight line. The number mm is the slope of the line, and bb is its yy-intercept, the value f(0)f(0) at which the line crosses the vertical axis.

The line y = 2x + 1, with a dotted right-triangle showing that a run of 1 to the right produces a rise of 2 upward, illustrating slope 2

Geometrically, the slope mm records how much yy changes for each unit change in xx: increasing xx by 11 increases yy by exactly mm. In the figure, y=2x+1y = 2x + 1 rises by 22 for each unit step to the right, so the dotted rise-over-run triangle has slope 22, and the line meets the yy-axis at 11.

Vertical and horizontal shifts

Given any function ff, certain simple modifications of its formula move the graph bodily without deforming it. The next two constructions are worth isolating because the local approximation story later in the course will repeatedly use shifted copies of the same line.

Example 12

Let f(x)=2x+1f(x) = 2x + 1 and set g(x)=f(x)+5=2x+6g(x) = f(x) + 5 = 2x + 6. At every xx the value of gg exceeds the value of ff by exactly 55, so the graph of gg is obtained from the graph of ff by sliding every point upward by 55 units.

Two parallel lines with the same slope: the lower line is y = 2x + 1 and the upper line is y = 2x + 6, related by a vertical upward shift of 5 units
Example 13

Let f(x)=x2f(x) = x^2 and set h(x)=f(x+1)=(x+1)2h(x) = f(x + 1) = (x + 1)^2. The value of hh at xx is the value of ff at x+1x + 1, so whatever ff does one unit to the right, hh does at xx itself. The graph of hh is the graph of ff slid one unit to the left.

Two parabolas of the same shape: y = x squared centred at the origin, and y = (x+1) squared centred at x = -1, related by a horizontal leftward shift of 1 unit

More generally, for a real number cc:

  • f(x)+cf(x) + c shifts the graph vertically, upward by cc when c>0c > 0 and downward by c|c| when c<0c < 0;
  • f(x+c)f(x + c) shifts the graph horizontally, leftward by cc when c>0c > 0 and rightward by c|c| when c<0c < 0.

The sign on the horizontal shift is easy to misremember. The rule is that replacing xx by x+cx + c reaches the former output when xx is cc smaller than before, pulling the graph back along the xx-axis.

Piecewise functions

Nothing in the definition of a function requires a single formula. When different parts of the domain call for different rules, we write the rule piece by piece.

Example 14

Define

f(x)={x,x1,x2,x>1.f(x) = \begin{cases} -x, & x \leq 1, \\ x^2, & x > 1. \end{cases}

For x=0x = 0 the top clause applies and f(0)=0f(0) = 0. For x=2x = 2 the bottom clause applies and f(2)=4f(2) = 4. At the switchover x=1x = 1 only the top clause applies, so f(1)=1f(1) = -1; the bottom clause’s value 12=11^2 = 1 is never attained at x=1x = 1 itself.

A piecewise graph: the line y = -x for x less than or equal to 1, joined at x = 1 with a filled circle at (1, -1), and the parabola y = x squared for x greater than 1 with an unfilled circle at (1, 1)

The graph uses the filled and unfilled circle convention already established for intervals. At x=1x = 1 the top clause contributes the point (1,1)(1, -1), drawn with a filled circle because the value is actually attained; the bottom clause approaches (1,1)(1, 1) without reaching it, drawn with an unfilled circle.

Example 15

A parcel courier posts the following tariff. A parcel of weight ww kilograms, with 0<w20 < w \leq 2, is charged a flat £4.00\pounds 4.00. A heavier parcel with w>2w > 2 is charged £4.00\pounds 4.00 plus £1.20\pounds 1.20 for each kilogram beyond the first two. Writing the charge CC as a function of weight,

C(w)={4.00,0<w2,4.00+1.20(w2),w>2.C(w) = \begin{cases} 4.00, & 0 < w \leq 2, \\ 4.00 + 1.20\,(w - 2), & w > 2. \end{cases}

Thus a 1.51.5 kg parcel is charged £4.00\pounds 4.00, a 33 kg parcel £5.20\pounds 5.20, and a 55 kg parcel £7.60\pounds 7.60. The domain is the positive half-line (0,)(0, \infty), since a parcel must have some strictly positive weight.

Problem 7

The courier of the previous example revises the tariff by adding a third tier: for any parcel with w>10w > 10, the charge is what the middle tier would have cost at exactly 1010 kg, plus £0.80\pounds 0.80 for each kilogram beyond the first ten. Write the revised charge C(w)C(w) as a piecewise function on (0,)(0, \infty) and compute C(7)C(7) and C(14)C(14).

Natural Domains

In the examples so far we have either stated a function’s admissible inputs alongside its formula or read them off the formula by inspection. From now on we will usually present a function by writing a formula and nothing else, and leave the inputs to be recovered from the formula itself. The convention for doing so is the following.

Definition 6 (Natural Domain)

When a function is specified by a formula with no domain attached, its natural domain is the collection of all real numbers for which every operation in the formula produces a real result.

For the formulas considered in this lesson, only two obstructions can arise: division by zero, and the square root of a negative number. (Later lessons will introduce further functions, such as logarithms and certain trigonometric functions, which bring their own restrictions; we will record these as each new function is introduced.) Each obstruction rules out a definite collection of inputs, and the natural domain is determined by imposing whichever conditions are needed to avoid them.

Example 16

The formula f(x)=x2x+1f(x) = x^2 - x + 1 requires only addition, subtraction, and multiplication, each of which is defined for every real number. No input is obstructed, so the natural domain of ff is the whole number line.

Example 17

The formula g(x)=1xg(x) = \dfrac{1}{x} is defined whenever x0x \neq 0, since division by zero is not permitted. The natural domain of gg therefore consists of every real xx with x0x \neq 0.

Example 18

The formula h(x)=xh(x) = \sqrt{x} requires the expression under the square root, called the radicand, to be non-negative, giving the condition x0x \geq 0. The natural domain of hh is the interval [0,)[0, \infty).

These three templates each illustrate one obstruction in isolation. Most formulas combine them, and the natural domain is then determined by imposing all of the resulting conditions simultaneously.

Example 19

Find the natural domain of each of the following.

(a) f(x)=4+2xf(x) = \sqrt{4 + 2x}.

The radicand must satisfy 4+2x04 + 2x \geq 0, that is x2x \geq -2. The natural domain is [2,)[-2, \infty).

(b) g(x)=12x+1g(x) = \dfrac{1}{\sqrt{2x + 1}}.

Two conditions apply: the radicand must be non-negative and the denominator must be non-zero. Both are satisfied precisely when 2x+1>02x + 1 > 0, equivalently x>12x > -\tfrac{1}{2}. The natural domain is (12,)(-\tfrac{1}{2}, \infty).

(c) h(x)=x+11xh(x) = \sqrt{x + 1} - \sqrt{1 - x}.

Both radicands must be non-negative: x+10x + 1 \geq 0 and 1x01 - x \geq 0. The first gives x1x \geq -1, the second gives x1x \leq 1. Both conditions must hold, so the natural domain is the closed interval [1,1][-1, 1].

Not every natural domain is a single interval. The following is the cleanest example.

Example 20

Find the natural domain of f(x)=1x21f(x) = \dfrac{1}{x^2 - 1}.

The numerator is defined for every real xx, so the only obstruction is the vanishing of the denominator. Factoring x21=(x1)(x+1)x^2 - 1 = (x - 1)(x + 1), the denominator is zero precisely when x=1x = 1 or x=1x = -1, and every other real xx is admissible. The natural domain therefore consists of every real xx with x1x \neq 1 and x1x \neq -1. The two excluded points split this collection into three unbounded pieces:

x<1,1<x<1,x>1,x < -1, \qquad -1 < x < 1, \qquad x > 1,

each of which is itself an interval. The two excluded points behave in the same way as the excluded point x=0x = 0 did for f(x)=1/xf(x) = 1/x: near each of them the values of ff grow without bound in magnitude.

Problem 8

Find the natural domain of f(x)=3x5x2+x6f(x) = \dfrac{3x - 5}{x^2 + x - 6}.

Problem 9

Find the natural domain of f(x)=2x+7+xf(x) = \sqrt{2x + 7} + \sqrt{x}.

Reading Graphs

A great deal of a function’s data can be read directly off its graph, without recourse to any formula.

The graph of a smooth function on the domain from -3 to 5; the curve begins near height 0.5 on the left, rises to about 2.5 near x = 1, and falls to about -0.6 at x = 5, with the points (-2, 1) and (3, 2) marked and dashed lines dropped from each marked point to both axes
Example 21

Let ff be the function whose graph is shown above.

(a) The point (3,2)(3, 2) lies on the graph, so f(3)=2f(3) = 2.

(b) The point on the graph at x=2x = -2 has height 11, so f(2)=1f(-2) = 1.

(c) The graph runs horizontally from x=3x = -3 to x=5x = 5, so the domain of ff is [3,5][-3, 5]. Reading off the heights attained, ff takes every value between roughly 0.6-0.6 at the right endpoint and about 2.52.5 near x=1x = 1, so the range of ff is approximately [0.6,2.5][-0.6,\, 2.5].

Problem 10

Using the graph of ff above, answer the following.

  1. Estimate the xx-values at which f(x)=0f(x) = 0.
  2. For which xx in the domain is f(x)2f(x) \geq 2?
  3. Is f(4)f(4) positive, negative, or zero? What about f(5)f(5)?
  4. Estimate the value of f(0)f(0).

Two conventions are at work in the picture. The domain is read off the horizontal axis as the shadow of the graph projected downward onto it, and the range is read off the vertical axis as the shadow projected sideways. The general situation is illustrated below: the thick amber segment on the horizontal axis is the domain of ff, and the thick amber segment on the vertical axis is its range.

A smooth curve on the domain -2 to 4, with its domain drawn as a thick segment on the horizontal axis labelled 'domain', and its range drawn as a thick segment on the vertical axis labelled 'range'; dotted projection lines connect the endpoints and extrema of the curve to each shadow

The vertical line test

Not every curve drawn in the xyxy-plane is the graph of a function. The definition of a function requires each admissible input to yield exactly one output; two points on the curve with the same xx-coordinate but different yy-coordinates would mean two candidate outputs at a single input. This geometric failure is easy to detect by eye.

Definition 7 (Vertical Line Test)

A curve in the xyxy-plane is the graph of a function of xx if and only if every vertical line meets the curve in at most one point.

The test is a pictorial restatement of single-valuedness, not a new condition. A vertical line at a chosen xx-value meets the curve exactly where that xx has a corresponding point on the curve, so at most one meeting corresponds to at most one output.

Three curves in the xy-plane, each tested by a dashed vertical line: (a) the graph of y = sqrt(x) for x greater than or equal to 0, which the test line meets in exactly one point; (b) a sideways parabola opening to the right, which the test line meets in two points and therefore fails the test; (c) the two branches of y = 1/x, with the test line meeting only the right branch in exactly one point
Example 22

Each panel above shows a curve and a dashed vertical test line.

(a) Every vertical line to the right of the vertical axis meets the curve once, and vertical lines to the left of the axis do not meet it at all. The curve therefore passes the test; the gap on the left simply reflects that the underlying function is defined only for x0x \geq 0.

(b) The dashed line meets the curve in two points, so single-valuedness fails. The curve is not the graph of any function of xx.

(c) Every vertical line with x0x \neq 0 meets the curve in exactly one point; the vertical axis itself misses the curve entirely, reflecting that the underlying function f(x)=1/xf(x) = 1/x is not defined at x=0x = 0. The curve therefore passes the test.

Remark

It is common practice to speak of “the function y=f(x)y = f(x)”, taking yy as a stand-in for the values of ff. Under this convention, the graph of ff and the graph of the equation y=f(x)y = f(x) refer to the same collection of points, and we shall use the two phrasings interchangeably.