What Is A Function
What Is A Function
About Ads
Select Language ▼
Link Link
Here Her
What is a Function?
A function relates an input to an output.
What
What is
is a
a Function?
Function?
It is like a machine that has an input and an output.
f(x)
"f(x) = ... " is the classic way of writing a function.
And there are other ways, as you will see!
The input
The relationship
The output
0 ×2 0
1 ×2 2
7 ×2 14
10 ×2 20
Names
First, it is useful to give a function aname.
The most common name is "f", but we can have other names like "g" ... or even "marmalade" if we want.
what goes into the function is put inside parentheses () after the name of the function:
f(x) = x2 shows us that function "f" takes "x" and squares it.
an input of 4
It could be anything!
So this function:
f(x) = 1 - x + x 2
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
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
h(10) = 10 × 20 = 200 cm
0 0
1 20
3.2 64
15 300
... ...
What Types of Things Do Functions Process?
"Numbers" seems an obvious answer, but ...
For example, the tree-height function h(age) = age×20 makes no sense for an age
less than zero.
So we need something more powerful, and that is where sets come in:
1 -3.6 -5
3.33333 Set of even numbers: {..., -4, -2, 0, 2, 4, ...}
1000
0.001 15 Set of clothes: {"hat","shirt",...}
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. "...exactly one..." means that a function is single valued. It will not give back 2 or
more results for the same input.
(one-to-many) (many-to-one)
This is NOT OK in a
But this is OK in a function
function
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
3 9
1 1
0 0
4 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 = x 3
We can't show ALL the values, so here are just a few examples:
X: x Y: x3
-2 -8
-0.1 -0.001
0 0
1.1 1.331
3 27
and so on... and so on...
Domain, Codomain and Range
In our examples above
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:
f, g, h, ...
x, t, θ, ... f(x), g(θ), ...
Example: z = 2u 3:
"z" could be called the "dependent variable" (it depends on the value of u)
argument
variable
h ( year
) = 20 × year
function parameter
We often call a function "f(x)" when in fact the function is really "f"
Ordered Pairs
And here is another way to think about functions:
Write the input and output of a function as an "ordered pair", such as (4,16).
They are called ordered pairs because the input always comes first, and the output second:
(input, output)
( x, f(x) )
Example:
(4,16) means that the function takes in "4" and gives out "16"
"2 is related to 4", "3 is related to 5" and "7 is related 3".
"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.
So a set of coordinates is also a function (if they follow the rules above, that is)
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
x2 − 3xy + y3 = 0
When we know x, how do we find y?
Graphing
The Function Grapher can only handle explicit functions,
The Equation Grapher can handle both types (but takes a little longer, and sometimes gets it
wrong).
Conclusion
a function relates inputs to outputs
a function takes elements from a set (the domain) and relates them to elements in a set (the
codomain).
all the outputs (the actual values related to) are together called the range
an input and its matching output are together called an ordered pair