Professional Documents
Culture Documents
What Is A Function
What Is A Function
f(x)
The input
The relationship
The output
Input
Relationship
Output
14
10
20
...
...
...
x2 (squaring) is a function
Names
First, it is useful to give a function a name.
The most common name is "f", but we can have other names like "g" ... or even
"marmalade" if we want.
But let's use "f":
f(x) = x2 shows us that function "f" takes "x" and squares it.
an input of 4
f(x) = 1 - x + x2
Is the same function as:
f(q) = 1 - q + q2
h(A) = 1 - A + A2
w() = 1 - + 2
The variable (x, q, A, etc) is just there so we know where to put the values:
f(2) = 1 - 2 + 22 = 3
y = x2
But there is still:
an input (x)
a relationship (squaring)
Relating
At the top we said that a function was like a machine. But a function doesn't
really have belts or cogs or any moving parts - and it doesn't actually destroy
what we put into it!
Example: this tree grows 20 cm every year, so the height of the tree
is related to its age using the function h:
h(age) = age 20
So, if the age is 10 years, the height is:
h(10) = 10 20 = 200 cm
Here are some example values:
age
h(age) = age 20
20
3.2
64
15
300
...
...
Each individual thing in the set (such as "4" or "hat") is called a member,
or element.
So, a function takes elements of a set, and gives back elements of a set.
A Function is Special
But a function has special rules:
2.
(one-to-many)
(many-to-one)
When a relationship does not follow those two rules then it is not a function ...
it is still a relationship, just not a function.
X: x
Y: x2
16
-4
16
...
...
It is a function, because:
(But the fact that "6" in Y has no relationship does not matter)
Some types of functions have stricter rules, to find out more you can
read Injective, Surjective and Bijective
Infinitely Many
My examples have just a few values, but functions usually work on sets with
infinitely many elements.
Example: y = x3
We can't show ALL the values, so here are just a few examples:
X: x
Y: x3
-2
-8
-0.1
-0.001
1.1
1.331
27
and so on...
and so on...
the set of elements that get pointed to in Y (the actual values produced
by the function) is called the Range.
We have a special page on Domain, Range and Codomain if you want to know
more.
So Many Names!
Functions have been used in mathematics for a very long time, and lots of
different names and ways of writing functions have come about.
Here are some common terms you should get familiar with:
"z" could be called the "dependent variable" (it depends on the value
of u)
Ordered Pairs
And here is another way to think about functions:
They are called ordered pairs because the input always comes first, and the
output second:
(input, output)
So it looks like this:
( x, f(x) )
Example:
(4,16) means that the function takes in "4" and gives out "16"
"if it contains (a, b) and (a, c), then b must equal c"
Which is just a way of saying that an input of "a" cannot produce two different
results.
Example: {(2,4), (2,5), (7,3)} is not a function because {2,4} and {2,5}
means that 2 could be related to 4 or 5.
-3
-1
16
...
...
Explicit vs Implicit
One last topic: the terms "explicit" and "implicit".
"Explicit" is when the function shows us how to go directly from x to y, such as:
y = x3 - 3
When we know x, we can find y
That is the classic y = f(x) style.
"Implicit" is when it is not given directly such as:
x2 - 3xy + y3 = 0
When we know x, how do we find y?
It may be hard (or impossible!) to go directly from x to y.
"Implicit" comes from "implied", in other words shown indirectly.
Graphing
The Equation Grapher can handle both types (but takes a little longer, and
sometimes gets it wrong).
Conclusion
all the outputs (the actual values related to) are together called
the range
Types of Functions
Injective, Surjective and Bijective
"Injective, Surjective and Bijective" tells us about how a function behaves.
A function is a way of matching the members of a set "A" to a set "B":
On The Graph
Let's see on a graph what a "General Function" and a "Injective Function"
looks like:
General Function
"Injective" (one-to-one)
Formal Definitions
OK, stand by for some details about all this:
Injective
A function f is injective if and only if whenever f(x) = f(y), x = y.
Example: f(x) = x+5 from the set of real numbers
function.
to
is an injective
f(3) = 8
to
is
not an injective
f(2) = 4 and
f(-2) = 4
This is against the definition f(x) = f(y), x = y, because f(2) = f(-2) but 2
-2
In other words there are two values of "A" that point to one "B", and this
function could not be reversed (given the value "4" ... what produced it?)
to
then it
is injective,
because:
f(2) = 4
to the set
Bijective
A function f (from set A to B) is bijective if, for every y in B, there is exactly
one x in A such that f(x) = y
both
f(2)=4 and
f(-2)=4
Inverse Functions
An inverse function goes the other way!
Let us start with an example:
Here we have the function f(x) = 2x+3, written as a flow diagram:
2x+3
is:
(y-3)/2
The inverse is usually shown by putting a little "-1" after the function name, like
this:
f-1(y)
We say "f inverse of y"
So, the inverse of
Example:
Using the formulas from above, we can start with
x=4:
f(4) = 24+3 = 11
We can then use the inverse on the 11:
f-1(11) = (11-3)/2 = 4
And we magically get 4 back again!
We can write that in one line:
f-1( f(4) ) = 4
"f inverse of
So applying a function
f of 4
equals 4"
f and then its inverse f-1 gives us the original value back
again:
f-1( f(x) ) = x
We could also have put the functions in the other order and it still works:
f( f-1(x) ) = x
Example:
Start with:
f-1(11) = (11-3)/2 = 4
And then:
f(4) = 24+3 = 11
So we can say:
f( f-1(11) ) = 11
"f of
f inverse of 11
equals 11"
f(x) = 2x+3
y = 2x+3
y-3 = 2x
(y-3)/2 = x
Swap sides:
x = (y-3)/2
f-1(y) = (y-3)/2
Fahrenheit to Celsius
A useful example is converting between Fahrenheit and Celsius:
To convert Fahrenheit to Celsius: f(F) = (F - 32) 59
The Inverse Function (Celsius back to Fahrenheit) -1
f (C) = (C 95) + 32
is:
For You: see if you can do the steps to create that inverse!
Inverses
Careful!
<=>
<=>
<=>
<=>
x and y 0
<=>
or
n not zero
(different rules when n is
odd, even, negative or
positive)
<=>
y>0
<=>
y and a > 0
<=>
-/2 to +/2
<=>
-/2 to +/2
0 to
<=>
(Note: you can read more about Inverse Sine, Cosine and Tangent.)
Careful!
Did you see the "Careful!" column above? That is because some inverses
work only with certain values.
(-2)2 = 4
(4) = 2
But we didn't get the original value back! We got 2 instead of -2. Our fault for
not being careful!
So the square function (as it stands) does not have an inverse
Example: (continued)
but
No Inverse?
Let us see graphically what is going on here:
No Inverse
Inverse is Possible
So we have this idea of "a unique y-value for every x-value", and it actually has
a name. It is called "Injective" or "One-to-one":
Or...
We could plot them both in terms of x ... so it is now f-1(x), not f-1(y):
{x2 | x 0 }
{x | x 0 }
We cannot work out the inverse of this, because we cannot solve for "x":
y = x/2 + sin(x)
y ... ? = x
Notes on Notation
Even though we write
f-1(x)
f(x)-1
Inverse of the
function f
f(x)-1 = 1/f(x)
(the Reciprocal)
Summary
Solve for x
Composition of Functions
"Function Composition" is applying one function to the results of another:
The result of
It is written:
(g
Which means:
f)(x)
g(f(x))
(g
First we apply f, then apply
f)(x) = g(f(x))
g to that result:
(g
f)(x) = (2x+3)2
(f
First we apply
f and g?
g)(x) = f(g(x))
(f
g)(x) = 2x2+3
Symbol
The symbol for composition is a small circle:
(g
It is not a filled in dot:
f)(x)
(f
First we apply f, then apply
(f
f)(x) = f(f(x))
f to that result:
f)(x) = 2(2x+3)+3 = 4x + 9
(f f)(x)
= f(f(x))
= f(2x+3)
= 2(2x+3)+3
= 4x + 9
Domains
It has been easy so far, but now you must consider the Domains of the
functions.
The domain is the set of all the values that go into a function.
The function must work for all values you give it, so it is up to you to make
sure you get the domain correct!
{x
| x 0}
[0,+)
It is important to get the Domain right, or you will get bad results!
(g
f)(x) = g(f(x)):
Then also make sure that g(x) gets the correct Domain
(g f)(x)
= g(f(x))
= (x)2
=x
Now, "x" normally has the Domain of all Real Numbers ...
... but because it is a composed function you must also consider f(x),
What you see at the end is a drilled hole, and you may
think "that should work for wood or metal".
But if you put wood into
function
down!
De-Composing Function
You can go the other way and break up a function into a composition of other
functions.
Example: (x+1/x)2
That function could have been made from these two functions:
f(x) = x + 1/x
g(x) = x2
And we get:
(g f)(x)
= g(f(x))
= g(x + 1/x)
= (x + 1/x)2
This can be useful if the original function is too complicated to work on.
Summary
(g