- Home
- English lessons
- Precalculus
- Functions
// Chapter 27.2 · Precalculus · Functions
Functions in Precalculus: Relations, Domain, Range, Function Notation, Operations and Composition
A function is a rule that takes one input and always returns one output, like a vending machine that gives the same drink every time you press the same button. If one day the same button produced two different drinks, the machine would stop being a function. This page lays the foundation that every later page uses: reading , deciding which inputs are allowed (the domain) and which outputs occur (the range), combining functions, and chaining them with composition. It ends with the average rate of change, the doorway to derivatives.
- Function: one x gives one y · the graph passes the vertical line test
- Domain: exclude zero denominators, negative values under even roots and non-positive log arguments
- Range: solve for x in terms of y, or use the vertex and the graph
- : g acts first · in general
- Average rate of change = secant slope
What a function is: one input, one output
A relation is a set of ordered pairs such as {(1, 2), (2, 4), (3, 6)}. It is a function when no x is paired with two different y-values. On a graph that is the vertical line test: if a vertical line hits the graph twice, some x has two outputs. The circle is therefore not a function of x, while its upper half is. The notation , read “f of x”, means the output of the rule f at the input x; it is not f times x.
F1 Function
A is the domain · the set of outputs is the range
F2 Function notation
Substitute the whole input into every x, inside brackets
Finding the domain
Unless a problem gives the domain, take it to be every real number for which the formula produces a real number. At this level only three things can go wrong, so check each one and intersect the conditions. Interval notation keeps the answer readable.
F3 Domain rules
With several conditions, take the intersection · a root in a denominator needs
Find the domain of
Square root:
Denominator:
Together: every except 3
Find the domain of
The argument must be positive:
holds for (see A11)
Finding the range
The range is harder than the domain because the question runs backwards: which y-values are actually produced by some x? Three methods cover most cases: (1) solve for x and see which y allow a solution, (2) use the vertex for quadratics, (3) start from a known graph, for instance or , and apply the shifts and stretches.
F4 Finding the range
Quadratic : gives · gives
Find the range of (a) (b)
(a) Complete the square: ; the smallest value is 3, at x = 2
(b) Let :
x exists for every y except , and no y produces x = −1, so nothing else is removed
(a) · (b) , matching the horizontal asymptote on the rational functions page
Piecewise functions
A piecewise function uses different formulas on different intervals of x. Real examples are everywhere: tiered electricity prices, postage by weight, income tax bands. When evaluating, decide which interval x is in first, and watch the < and ≤ signs at each boundary. The absolute value and the floor function are piecewise functions too.
F5 Piecewise & floor
· (not −2)
Find and say whether the pieces join
: −2 < 1, use : 4 · : second line,
·
At x = 1 the left piece approaches · at x = 3 the right piece is 5 = f(3), so both joins are seamless
, continuous at both joins
Sum, difference, product and quotient
Two functions combine by adding, subtracting, multiplying or dividing their values at the same x. The catch is the domain: the result is defined only where both f and g are defined, and a quotient must also exclude the points where g is zero, even if the simplified formula hides the denominator.
F6 Operations
Domain , and for remove
Composite functions
Composition connects two machines so that the output of the first becomes the input of the second. , read “f composed with g”, means : do g first, then f, even though f is written first. Its domain has two layers: x must be allowed in g, and g(x) must be allowed in f. Simplifying the final formula can hide the first layer, which is exactly where exam questions set their traps.
F7 Composition
In general · but always
With and , find and with their domains
; since always, the domain is
But x must go through f first, so , even though makes sense for every x
·
Write as
The step done first is , so
The step done last is raising to the fifth power:
— seeing functions this way is the heart of the chain rule
Average rate of change and the difference quotient
The average rate of change says how much y changes, on average, per unit of x. If f is distance against time, it is the average speed. Graphically it is the slope of the line through two points of the graph, the secant line. The difference quotient is the same expression written with a step h, and it becomes the definition of the derivative when h shrinks to zero.
F8 Average rate of change
F9 Difference quotient
Find the difference quotient of , and the average rate of change of from x = −1 to x = 2
; subtracting leaves
Divide by h: (as h → 0 this becomes , the derivative)
, , so
·
Function lab: type f and g
Type functions the usual way, for example 2x^2-3, 1/(x-1), sqrt(4-x^2), |x| or log(x) (base 10), then choose to plot f, g, their sum, product, quotient or a composition. Grey bands mark the x-values where the function is undefined, which checks a domain answer instantly. Move x₁ and x₂ to see the secant line and the average rate of change.
Practice (with answers)
1Is {(1, 2), (2, 3), (1, 4)} a function?
x = 1 is paired with both 2 and 4
No
2Domain of
The root is in a denominator, so it must be strictly positive:
3Range of
, so
4: find and
·
19 and 49
5If and , find
6Difference quotient of
Read next
- 27.3 Graphs and transformations — see the domain and range in a picture and move graphs with a, b, h, k
- 27.6 Inverse functions — compositions that give back x
Frequently asked questions
What is the difference between a relation and a function?
A relation is any set of ordered pairs. A function is a relation in which each x is paired with exactly one y. If the same x appears with two different y-values, for example (2, 3) and (2, 5), it is not a function. On a graph, check with the vertical line test: if some vertical line meets the graph more than once, it is not a function.
How do I find the domain of a function?
Look for the three things that break a real-valued formula: a denominator that could be zero, an even root of a negative number, and a logarithm of a number that is not positive. Write a condition for each and intersect them. If none of the three appears, the domain is all real numbers.
Is f∘g the same as g∘f?
Usually not. f∘g means apply g first and feed the result into f. With f(x) = √(x + 2) and g(x) = x² − 1, f∘g = √(x² + 1) but g∘f = x + 1 for x ≥ −2: both the formula and the domain differ. The domain of f∘g is the set of x in the domain of g for which g(x) lies in the domain of f.
How is the average rate of change related to calculus?
The average rate of change (f(b) − f(a))/(b − a) is the slope of the secant line through two points of the graph. As b approaches a, the secant line turns into the tangent line and its slope is the derivative. The difference quotient (f(x + h) − f(x))/h practised here is exactly the definition of the derivative as h → 0.