How many corners does a triangle have? How about a square ? A rectangle ? A circle ?
If you ask these questions to anybody who can count, the answers come back the same every time: 3, 4, 4 and 0. Nobody looks at the square and finds three corners, and nobody finds five. Looking at a shape, you can always tell how many corners it has, and there is no ambiguity about it.
This process, going from a shape to its number of corners, is completely predictable and repeatable. Every shape always has the same number of corners, and everyone agrees on what that number is. The process of going from a shape to its number of corners is an example of what mathematics calls a function.
In this example, think of the function as the question
A function has inputs, the things that are put into the process, and outputs, the results that come out at the end. Here the inputs are the shapes written into the gap in the question, and the outputs are the numbers of corners the question asks for.
Crucially, a function always gives the same output for the same input: the square gives 4 every time it is put into the question, and it can never give anything else.
A function is a predictable process that turns each input into exactly one output. The same input always produces the same output.
Two different inputs are allowed to produce the same output. Both a square and a rectangle have four corners, and that is not an issue: each of them, on its own, has exactly one number of corners. What a function may not do is give one input two different outputs.
A process fails to be a function when one input can lead to more than one output, so that two people following the same instructions could come away with different answers.
shape→number of corners
number→a shape with that many corners
word→its first letter
letter→a word that starts with it
word→the number of letters in it
word→a word that rhymes with it
The test of whether a certain process counts as a function is simply whether, for each input, there is only one possible output (or not), which means that, given the same input, you always get the same unique output.
A function can be given a name, so that it does not have to be described in a sentence every time it is used. The name is usually a single letter. Call the corner-counting function c. Then the fact that a triangle has 3 corners is written by putting the triangle in brackets after the name:
and in the same way c()=0: the circle goes in, and the number of corners comes out. The input is written inside the brackets, and the whole expression stands for the output. Each of these lines records one specific pair: what went in, and what came out. The line c()=3 is read aloud as "c of the triangle equals 3".
For a function f and an input a, f(a) is the output of f when the input is a. It is read "f of a".
Whatever is inside the brackets is the input. The value of f(a) is the output.
Any letter can name a function, and any letter can stand for its input. When a function describes a real quantity, the letters are usually chosen to say what the quantities are.
In f(x) the brackets do not mean multiplication. f is not a number, so f(3) is not f×3: it is the output of the function f when 3 goes in.
Consider a party venue that charges a fixed fee plus a constant amount per guest, so that the cost in dollars of a 15-person party is C(15)=220. The input is the number of guests and the output is the cost, and each line of notation states one fact about the venue.
Checkpoint 1
Consider the five shapes , , , and .
The function c takes a shape and gives its number of corners. The function r takes a shape and gives its number of right angles.
Select every statement that is true.
Nothing in the definition says that a function has to involve numbers, and nothing says that there has to be a formula. Counting corners is a function; so is looking up a first letter. In the IB, though, the inputs and outputs of a function are almost always numbers, and the process, the function itself, is a mathematical rule governed by a formula.
Take any number, double it, and add 1. Put in 3 and out comes 7. Put in −5 and out comes −9. Put in 2.5 and out comes 6. This is a function for the same reason counting corners is: every input has exactly one output, and 3 gives 7 every time it is put in.
"Double the input and add 1" has to be written out as a sentence every time it is needed. Written with a name for the function and a letter standing for the input, the whole rule becomes one line:
Here f is the name of the function, x stands for whatever number is put in, and 2x+1 is the output that f gives for that input. This is an equation for the function: it does not record one pair, as f(3)=7 does, but every pair at once, because any input can be put in place of x.
It helps to picture a function like this as a machine, a factory for numbers. Numbers go in at one side, the machine applies its rule to each one, and the results come out at the other side.
Checkpoint 2
The function h takes a number for its input and returns the square of that number plus 7, all divided by 2.
Write the function in the form h(x)=…
To evaluate a function at a particular input is to find the output it gives there. With a formula, that means replacing every x in the formula by the input and working out the result. The input goes in with brackets around it, so that a negative number or a fraction is squared or multiplied as a whole.
The input does not have to be a number. Whatever is written in the brackets replaces every x, so an expression such as a+2 can be put in just as 4 was, and the output is then an expression in a. When the value of that output is given, setting the expression equal to it gives an equation in a, and solving that equation finds a.
The function f is given by f(x)=4x+1. Given that f(a+2)=21, find a.
Replacing every x in the formula by a+2 gives the output for that input:
This output is known to be 21, so
Checking: a+2=5 and f(5)=4(5)+1=21.
Checkpoint 3
Consider the function f(x)=5x−3.
Given that f(a−3)=2, find a.
When the formula is long, the calculator does the substitution: store the formula as a function, then ask for its value at the input.
Checkpoint 4
Consider the function f(x)=2+x√23x−x.
Find the value f(1)×f(2)×f(3).
A function does not need a formula. Any way of stating which output each input gets is enough, and for a function with only a few inputs the direct way is to list them. The table below defines a function f with five inputs.
The top row lists the inputs and the bottom row lists the outputs, so each column is one fact about f. Reading the third column, f(2)=4. The same function can be drawn as a mapping diagram: the inputs on one side, the outputs on the other, and an arrow from each input to its output.
In a mapping diagram, the function is the arrows. The numbers in the two ovals are only its inputs and its outputs; the process that turns one into the other is recorded entirely by which arrow leaves each input and where it lands. If the same two ovals are drawn with different arrows, it is a different function, even though not a single number has changed. If the same numbers are listed in a different order but every arrow still goes from the same input to the same output, it is the same function drawn differently.
Both the table and the diagram can be read in either direction. Read forwards, from an input to its output, f(2)=4. Read backwards, from an output to the input that produced it, f(x)=−2 when x=5. Two of the inputs, −3 and 2, have the same output, 4.
The table shows the value of the function f for five inputs.
Write down the value of f(1), and find the value of x for which f(x)=0.
f(1) is the output when the input is 1. Find 1 in the x row and read the value below it: f(1)=5.
For f(x)=0 the output is known and the input is wanted. Find 0 in the f(x) row and read the value above it: x=3. The number 0 also appears in the x row, but that column says f(0)=−1, which is the output at 0, not the input that gives 0.
The output 2 appears twice, at x=−4 and at x=6. So "find x for which f(x)=2" would have two answers, while f(−4) and f(6) each have one.
Checkpoint 5
The table shows the value of the function f for five inputs.
Write down the value of f(4), and find the value of x for which f(x)=3.
Checkpoint 6
The mapping diagram shows the function g.
Complete the table.
A table or a mapping diagram describes a function only when it obeys the definition: each input has exactly one output. To check, look at the inputs. If any input appears with two different outputs, the rule is not a function. An output may appear any number of times; what is not allowed is one input appearing with two different outputs.
Two sets describe a function: the inputs it accepts, and the outputs it actually produces. The mapping diagram below shows a function g.
The inputs of g are the numbers in the left oval, where the arrows start: 1, 2, 4 and 7. This set is the domain of g.
The outputs of g are the numbers an arrow arrives at: 3, 5 and 8. This set is the range of g. The output 5 is produced twice, by 2 and by 4, and it is listed once. The number 10 is drawn in the right oval, but no arrow reaches it: no input produces it, so it is not an output of g and it is not in the range.
Put informally, the domain is all the numbers that you could put into the function, and the range is all the numbers that can possibly come out.
The domain of a function is the set of all its allowed inputs.
The range of a function is the set of all the outputs it produces.
For the function above, the domain is {1,2,4,7} and the range is {3,5,8}.
Checkpoint 7
The mapping diagram shows the function f.
Select every statement that is true.
When a function is given by a formula and nothing is said about its domain, the domain is taken to be every real number the formula can accept. For f(x)=2x+1 that is every real number, because any number can be doubled and have 1 added to it. Two things stop a formula from accepting an input.
Take f(x)=√x−3. The number under the root must be 0 or more, so the formula accepts exactly the inputs with x−3≥0, that is, x≥3. That inequality describes the domain of f. The input 3 itself is allowed: f(3)=√0=0.
For this function, the range follows from the smallest output. A square root is never negative, and it is 0 at x=3, so the smallest output is 0. As x grows, so does √x−3, without any upper limit: f(4)=1, f(7)=2, f(12)=3. So the range is f(x)≥0.
The largest possible domain of a function given by a formula is the set of every real number for which the formula has a value. Inputs that make the number under a square root negative, or a denominator zero, are excluded; every other real number is included.
The corresponding range is the set of outputs the formula produces over that domain, written as an inequality in f(x).
(a) Find the largest possible domain of f(x)=5−√x+1 and the corresponding range.
The root needs x+1≥0, so the domain is x≥−1.
The root is 0 at x=−1 and grows from there, and it is subtracted from 5. So the largest output is f(−1)=5−0=5, and every larger input gives a smaller output: f(0)=4, f(3)=3, f(8)=2. The range is f(x)≤5.
(b) Find the largest possible domain of g(x)=x−21 and the corresponding range.
The denominator is 0 only when x=2, and every other real number is accepted. The domain is x=2.
A fraction with numerator 1 can be made as large a positive number, or as large a negative number, as required, by choosing x close to 2 on either side: g(3)=1, g(2.5)=2, g(1)=−1. The one value it can never take is 0, because a fraction with numerator 1 is never zero. The range is g(x)=0.
Checkpoint 8
The function f is given by f(x)=2+√x−3, with the largest possible domain.
Select every statement that is true.
Nice work reaching the end of Functions and their properties. Here is what this lesson set out to teach - worth reading back with fresh eyes:
0/8 checkpoints checked off