Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
92 views

A Function Relates An Input To An Output

O level Math Functions

Uploaded by

Masood Ahmed
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
92 views

A Function Relates An Input To An Output

O level Math Functions

Uploaded by

Masood Ahmed
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

What is a Function https://www.mathsisfun.com/sets/function.

html

A function relates an input to an output.

It is like a machine that has an input and an output.

And the output is related somehow to the input.

f(x)
"f(x) = ... " is the classic way of writing a function.
And there are other ways, as you will see!

We will see many ways to think about functions, but there are always three main parts:

The input
The relationship

The output

1 of 12 15/02/2021, 17:22
What is a Function https://www.mathsisfun.com/sets/function.html

x2 (squaring) is a function

x3+1 is also a function

Sine, Cosine and Tangent are functions used in trigonometry


and there are lots more!

But we are not going to look at specific functions ...


... instead we will look at the general idea of a function.

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":

function name input what to output

We say "f of x equals x squared"

what goes into the function is put inside parentheses () after the name of the function:

So f(x) shows us the function is called "f", and "x" goes in

And we usually see what a function does with the input:

f(x) = x2 shows us that function "f" takes "x" and squares it.

2 of 12 15/02/2021, 17:22
What is a Function https://www.mathsisfun.com/sets/function.html

Don't get too concerned about "x", it is just there to show us where the input goes and what
happens to it.

It could be anything!

So this function:

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

Sometimes a function has no name, and we see something like:

y = x2

But there is still:

an input (x)
a relationship (squaring)

and an output (y)

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!

A function relates an input to an output.

Saying "f(4) = 16" is like saying 4 is somehow related to 16. Or 4 → 16

3 of 12 15/02/2021, 17:22
What is a Function https://www.mathsisfun.com/sets/function.html

"Numbers" seems an obvious answer, but ...

... which numbers?

For example, the tree-height function h(age) = age×20 makes no sense


for an age less than zero.

... it could also be letters ("A"→"B"), or ID codes ("A6309"→"Pass") or


stranger things.

So we need something more powerful, and that is where sets come in:

A set is a collection of things.


1 -3.6 -5
3.33333 Here are some examples:
1000
0.001 15 Set of even numbers: {..., -4, -2, 0, 2, 4, ...}
Set of clothes: {"hat","shirt",...}

4 of 12 15/02/2021, 17:22
What is a Function https://www.mathsisfun.com/sets/function.html

Set of prime numbers: {2, 3, 5, 7, 11, 13, 17, ...}


Positive multiples of 3 that are less than 10: {3, 6, 9}

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.

But a function has special rules:

It must work for every possible input value

And it has only one relationship for each input value

This can be said in one definition:

1. "...each element..." means that every element in X is related to some


element in Y.

We say that the function covers X (relates every element of it).

(But some elements of Y might not be related to at all, which is fine.)

2. "...exactly one..." means that a function is single valued. It will not


give back 2 or more results for the same input.

So "f(2) = 7 or 9" is not right!

5 of 12 15/02/2021, 17:22
What is a Function https://www.mathsisfun.com/sets/function.html

"One-to-many" is not allowed, but "many-to-one" is allowed:

(one-to-many) (many-to-one)
This is NOT OK in a function But this is OK in a 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.

Example: The relationship x → x2

Could also be written as a table:

X: x Y: x2
3 9
1 1
0 0
4 16
-4 16
... ...

It is a function, because:

Every element in X is related to Y


No element in X has two or more relationships

So it follows the rules.

(Notice how both 4 and -4 relate to 16, which is allowed.)

6 of 12 15/02/2021, 17:22
What is a Function https://www.mathsisfun.com/sets/function.html

On a graph, the idea of single valued means that no vertical


line ever crosses more than one value.
x
Not a Function
(a vertical line crosses 2 values) If it crosses more than once it is still a valid curve, but is
not a function.

Some types of functions have stricter rules, to find out more you can read
Injective, Surjective and Bijective

My examples have just a few values, but functions usually work on sets with infinitely many
elements.

7 of 12 15/02/2021, 17:22
What is a Function https://www.mathsisfun.com/sets/function.html

In our examples above

the set "X" is called the Domain,


the set "Y" is called the Codomain, and
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.

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:

Relationship

f, g, h, ...

maps to

8 of 12 15/02/2021, 17:22
What is a Function https://www.mathsisfun.com/sets/function.html

We often call a function "f(x)" when in fact the function is really "f"

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)

So it looks like this:

( x, f(x) )

9 of 12 15/02/2021, 17:22
What is a Function https://www.mathsisfun.com/sets/function.html

Set of Ordered Pairs

A function can then be defined as a set of ordered pairs:

But the function has to be single valued, so we also say

"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.

A Benefit of Ordered Pairs

We can graph them...

... because they are also coordinates !

So a set of coordinates is also a function (if they follow the rules above,
that is)

10 of 12 15/02/2021, 17:22
What is a Function https://www.mathsisfun.com/sets/function.html

We can create functions that behave differently depending on the input value

Read more at Piecewise Functions .

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 that we often work with.

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.

11 of 12 15/02/2021, 17:22
What is a Function https://www.mathsisfun.com/sets/function.html

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).

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

a function is a special type of relation where:


every element in the domain is included, and
any input produces only one output (not this or that)

an input and its matching output are together called an ordered pair

so a function can also be seen as a set of ordered pairs

Question 1 Question 2 Question 3 Question 4 Question 5


Question 6 Question 7 Question 8 Question 9 Question 10

Copyright © 2017 MathsIsFun.com

12 of 12 15/02/2021, 17:22

You might also like