0% found this document useful (0 votes)
46 views

A Function Relates An Input To An Output

A function relates an input to an output. It has three main parts - the input, the relationship between the input and output, and the output. A function must relate each input to exactly one output.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views

A Function Relates An Input To An Output

A function relates an input to an output. It has three main parts - the input, the relationship between the input and output, and the output. A function must relate each input to exactly one output.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 31

What is a Function?

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) = ... " is the classic way of writing a function. 


  f(x) And there are other ways, as you will see!

Input, Relationship, Output

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

 The input
 The relationship
 The output

Example: "Multiply by 2" is a very simple function.

Here are the three parts:

Input Relationship Output


0 ×2 0
1 ×2 2
7 ×2 14
10 ×2 20
... ... ...
For an input of 50, what is the output?

Some Examples of Functions

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

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

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.

Example: with f(x) = x2:

 an input of 4
 becomes an output of 16.

In fact we can write f(4) = 16.

The "x" is Just a Place-Holder!

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 There is No Function Name

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)

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!

A function relates an input to an output.

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

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


0 0
1 20
3.2 64
15 300
... ...

What Types of Things Do Functions Process?

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

Here are some examples:

Set of even numbers: {..., -4, -2, 0, 2, 4, ...}


Set of clothes: {"hat","shirt",...} 
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.

A Function is Special

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:

Formal Definition of a Function

A function relates each element of a set


with exactly one element of another set
(possibly the same set).

The Two Important Things!

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!

Note: "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 arelationship, 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.)

Example: This relationship is not a function:

It is a relationship, but it is not a function, for these reasons:

 Value "3" in X has no relation in Y


 Value "4" in X has no relation in Y
 Value "5" is related to more than one value in Y

(But the fact that "6" in Y has no relationship does not matter)

 
Vertical Line Test

On a graph, the idea of single


valued means that no vertical line ever
crosses more than one value.

If it crosses more than once it is still a


valid curve, but isnot a function.

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

 The input set "X" is all Real Numbers


 The output set "Y" is also all the Real Numbers

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

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:

Example: with z = 2u3:

 "u" could be called the "independent variable"


 "z" could be called the "dependent variable" (it depends on the
value of u)

Example: with f(4) = 16:

 "4" could be called the "argument"


 "16" could be called the "value of the function"

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)

So it looks like this:

( x, f(x) )

Example:

(4,16) means that the function takes in "4" and gives out "16"

Set of Ordered Pairs

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

Example: {(2,4), (3,5), (7,3)} is a function that says

"2 is related to 4", "3 is related to 5" and "7 is related 3".
Also, notice that:

 the domain is {2,3,7} (the input values)


 and the range is {4,5,3} (the output values)

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.

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.

In other words it is not a function because it is not single valued

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)

A Function Can be in Pieces


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

Example: A function with two pieces:

 when x is less than 0, it gives 5,


 when x is 0 or more it gives x2

Here are some example values: 


x y
-3 5
-1 5
0 0
2 4
4 16
... ...

Read more at  Piecewise Functions .

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

 a function is a special type of relation where:

o every element in the domain is included, and

o 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


The Evolution of Numbers

I want to take you on an adventure ...

... an adventure through the world of numbers.

Let us start at the beginning:


Q: What is the simplest idea of a number?

A: Something to count with!

The Counting Numbers

We can use numbers to count: 1, 2, 3, 4, etc

Humans have been using numbers to count with for thousands of years. It is
a very natural thing to do.

 You can have "3 friends",


 a field can have "6 cows"
 and so on.

So we have:

Counting Numbers: {1, 2, 3, ...}

And the "Counting Numbers" satisfied people for a long time.

Zero

The idea of  zero , though natural to us now, was not natural to early
humans ... if there is nothing to count, how can you count it?

Example: you can count dogs, but you can't count an empty space:

Two Dogs   Zero Dogs? Zero Cats?


An empty patch of grass is just an empty patch of grass!

Placeholder

But about 3,000 years ago people needed to tell the difference between
numbers like 4 and 40.Without the zero they look the same!

So they used a "placeholder", a space or special symbol, to show "there are


no digits here"

So "5 2" meant "502"


5 2
(5 hundreds, nothing for the tens, and 2 units)

The idea of zero had begun, but it wasn't for another thousand years or so
that people started thinking of it as an actual number.

But now we can think

"I had 3 oranges, then I ate the 3 oranges, now I have zero oranges...!"

The Whole Numbers

So, let us add zero to the counting numbers to make a new set of
numbers.

But we need a new name, and that name is "Whole Numbers":

Whole Numbers : {0, 1, 2, 3, ...}


The Natural Numbers

You may also hear the term "Natural Numbers" ... which can mean:

 the "Counting Numbers": {1, 2, 3, ...}


 or the "Whole Numbers": {0, 1, 2, 3, ...}

depending on the subject. I guess they disagree on whether zero is "natural"


or not.

Negative Numbers

But the history of mathematics is all about people asking questions, and
seeking the answers!

One of the good questions to ask is

"if you can go one way, can you go the opposite way?"

We can count forwards: 1, 2, 3, 4, ...

... but what if we count backwards:


 
3, 2, 1, 0, ... what happens next?

The answer is: you get negative numbers:

Now we can go forwards and backwards as far as we want

But how can a number be "negative"?


By simply being less than zero.

A simple example is  temperature .

We define zero degrees Celsius (0° C) to be when water


freezes ... but if we get colder we need negative
temperatures.

So -20° C is 20° below Zero.

Negative Cows?

And in theory you can have a negative cow!

Think about this ...If you had just sold two bulls, but can only find one to
hand over to the new owner... you actually have minus one bull ... you are
in debt one bull!

So negative numbers exist, and we're going to need a new set of numbers to
include them ...

Integers

If we include the negative numbers with the whole numbers, we have a new
set of numbers that are called integers
Integers: {..., -3, -2, -1, 0, 1, 2, 3, ...}

The Integers include zero, the counting numbers, and the negative of the
counting numbers, to make a list of numbers that stretch in either direction
indefinitely.

Fractions

If you have one orange and want to share it with


someone, you need to cut it in half.

You have just invented a new type of number!

You took a number (1) and divided by another number (2) to come
up with half (1/2)

The same thing happens when we have four biscuits (4) and want to share
them among three people (3) ... they get (4/3) biscuits each.

A new type of number, and a new name:

Rational Numbers

Any number that can be written as a fraction is called a Rational Number.

So, if "p" and "q" are integers (remember we talked about integers), then
p/q is a rational number.
Example: If p is 3 and q is 2, then:

p/q = 3/2 = 1.5 is a rational number

The only time this doesn't work is when q is zero, because  dividing by
zero  is undefined.

Rational Numbers : {p/q : p and q are integers, q is not zero}

So half (½) is a rational number.

And 2 is a rational number also, because you could write it as 2/1

So, Rational Numbers include:

 all the integers
 and all fractions.

Even a number like 13.3168980325 is a Rational Number.

13.3168980325 = 133,168,980,325 / 10,000,000,000

That would seem to include all possible numbers, right?

But There Is More

People didn't stop asking the questions ...and here is one that caused a lot
of fuss during the time of Pythagoras:

If you draw a square (of size "1"), what is the


distance across the diagonal?
The answer is the  square root  of 2, which is 1.4142135623730950...
(etc)

But it is not a number like 3, or five-thirds, or anything like that ...

... in fact you cannot answer that question using a ratio of two integers

square root of 2 ≠ p/q

... and so it is not a rational number (read more  here )

Wow! There are numbers that are NOT rational numbers! What do we call
them?

What is "Not Rational" ...? Irrational !

Irrational Numbers

So, the square root of 2 (√2) is an  irrational  number. It is called irrational


because it is not rational (can't be made using a simple ratio of integers). It
isn't crazy or anything, just not rational.

And we know there are many more irrational numbers.  Pi  (π) is a famous
one.

Useful

So irrational numbers are useful. You need them to

 find the diagonal distance across some squares,


 to work out lots of calculations with circles (using π),
 and more,

So we really should include them.


And so, we introduce a new set of numbers ...

Real Numbers

That's right, another name!

Real Numbers include:

 the rational numbers, and


 the irrational numbers

Real Numbers: {x : x is a rational or an irrational number}

In fact a Real Number can be thought of as any point anywhere on the


number line:

© 2015 MathsIsFun.com v0.77

This only shows a few decimal places (it is just a simple computer)
but Real Numbers can have lots more decimal places!

Any point Anywhere on the number line, that is surely enough numbers!

But there is one more number which has turned out to be very useful. And
once again, it came from a question.

Imagine ...

The question is:

"is there a square root of minus one?"

In other words, what can you multiply by itself to get -1?


Think about this: if you multiply any number by itself you can't get a
negative result:

 1×1 = 1,
 and also (-1)×(-1) = 1 (because a negative times a negative gives a
positive)

So what number, when multiplied by itself, would result in -1?

This would normally not be possible, but ...

"if you can imagine it, then you can play with it"

So, ...

Imaginary Numbers

... let us just imagine that the square root of minus


one exists.

We can even give it a special symbol: the letter i

And we can use it to answer questions:

Example: what is the square root of -9 ?

Answer: √(-9) = √(9 × -1) = √(9) × √(-1) = 3 × √(-1) = 3i

OK, the answer still involves i, but it gives a sensible


and consistent answer.

And i has this interesting property that if you square it (i×i) you get -
1 which is back to being a Real Number. In fact that is the correct definition:
Imaginary Number : A number whose square is a negative Real Number.

And i (the square root of -1) times any Real Number is an Imaginary


Number. So these are all Imaginary Numbers:

 3i
 -6i
 0.05i
 πi

There are also many applications for Imaginary Numbers, for example in the
fields of electricity and electronics.

Real vs Imaginary Numbers

Imaginary Numbers were originally laughed at, and so got the name
"imaginary". And Real Numbers got their name to distinguish them from the
Imaginary Numbers.

So the names are just a historical thing. Real Numbers aren't "in the Real
World" (in fact, try to find exactly half of something in the real world!) and
Imaginary Numbers aren't "just in the Imagination" ... they are both valid
and useful types of Numbers!

In fact they are often used together ...

"what if you put a Real Number and an Imaginary Number together?"

Complex Numbers

Yes, if you put a Real Number and an Imaginary Number together you get a
new type of number called a  Complex Number  and here are some
examples:
 3 + 2i
 27.2 - 11.05i

A Complex Number has a Real Part and an Imaginary Part, but either one
could be zero

So a Real Number is also a Complex Number (with an imaginary part of 0):

 4 is a Complex Number (because it is 4 + 0i)

and likewise an Imaginary Number is also a Complex Number (with a real


part of 0):

 7i is a Complex Number (because it is 0 + 7i)

So the Complex Numbers include all Real Numbers and all Imaginary
Numbers, and all combinations of them.

And that's it!

That's all of the most important number types in mathematics.

From the Counting Numbers through to the Complex Numbers.

There are other types of numbers, because mathematics is a broad subject,


but that should do you for now.

Summary

Here they are again:

Type of Number Quick Description

Counting Numbers {1, 2, 3, ...}


Whole Numbers {0, 1, 2, 3, ...}

Integers {..., -3, -2, -1, 0, 1, 2, 3, ...}

Rational Numbers p/q : p and q are integers, q is not zero

Irrational Numbers Not Rational

Real Numbers Rationals and Irrationals

Imaginary Numbers Squaring them gives a negative Real Number

Complex Numbers Combinations of Real and Imaginary Numbers

End Notes

History

The history of mathematics is very broad, with different cultures (Greeks,


Romans, Arabic, Chinese, Indians and European) following different paths,
and many claims for "we thought of it first!", but the general order of
discovery I discussed here gives a good idea of it.

Questions

And isn't it amazing how many times that asking a question, like

 "what happens if we count backwards through zero", or


 "what is the exact distance across the diagonal of the square"

first led to disagreement (and even ridicule!), but eventually to amazing


breakthroughs in understanding.

I wonder what interesting questions are being asked now?

Over to You!
Here are two questions you can ask when you learn something new:

Can it go the other way?

 Positive numbers lead to negative numbers


 Squares lead to square roots
 etc

Can I use this with something else I know?

 If fractions are numbers, can they be added, subtracted, etc?


 Can I take the square root of a complex number? (can you?)
 etc

And one day your questions may lead to a new discovery!

Constructions

Geometric Constructions ... Animated!

"Construction" in  Geometry  means to draw shapes, angles or lines


accurately.

These constructions use only compass, straightedge (i.e. ruler) and a pencil.
This is the "pure" form of geometric construction: no numbers involved!

Learn these two first, they are used a lot:

Line Segment Bisector

Angle Bisector

And it is useful to know how to do 30°, 45° and 60° angles. We can
use the angle bisector method (above) to create other angles, such as
15°, etc:

30 Degree Angle

45 Degree Angle
60 Degree Angle

Equilateral Triangle

Points and Lines:

Perpendicular to a Point on a Line

Perpendicular to a Point NOT on a


Line

Parallel Line through a Point

Same (Congruent) Angle

Cut a line into N segments

Circles:
Center of a Circle

Point to Tangents on a Circle

Inscribe a Circle in a Triangle

Circumscribe a Circle on a Triangle

Circle touching 3 Points

And for the "Master Class", a Pentagon

Pentagon

You might also like