Now we are going to define one of the more important concepts in Maths
2. Definition of function
A function is a relation between two numeric variables that assigns to each input number EXACTLY ONE output number .
We name independent variable (we choose it is fixed by us; and we name dependent variable because it depends from the value of we choose.
If we represent the pairs of values related by the function on the Cartesian plane we obtain the graph of the function.
Vertical line test
If no vertical line can be drawn so that it intersects a graph more than once, then it is a graph of a function.
Think about it, if a vertical line intersects a graph in more than one place, then the x value (input) would associate with more than one y value (output), and you know what that means. The relation is not a function.
The next two examples illustrate this concept.
We are going to use the vertical line test to determine whether each graph is a graph of a function.
|For we can find two points in the graph (3,4) and (3,6). So to 3 corresponds to two values of , 4 and 6. It is not a function
|To each value of x corresponds only one value of y.This graph would pass the vertical line test, because there would not be any place on it that we could draw a vertical line and it would intersect it in more than one place.Therefore, this is a graph of a function.
- We use for functions lower case letters like f, g, h.
- We write f(x) = y .
- f(x) read “f of x”.
This a very good video about how to use the vertical test:
3. Different ways of displaying a function
A function can be displaying through a table of values, an algebraic expression, or words.
3.1. Representing a function with a table of values
To plot a function expressed by a table of values we show the pairs of corresponding values of the variables independent and dependent as if they were the coordinates of points in the Cartesian plane. Take into account that:
- The input values, the values of the independent variable, are represented on the x–axis.
- The output values, the values of the dependent variable, are represented on the y–axis.
1. A shop sells mobile phones with a price of 45€ pee unit. Write the function that relates the number of mobiles bought and the price in €.
If I buy 1 mobile I will pay 45€, if I buy 2 mobiles I will pay 90€, if I buy 3 mobiles I will pay 135€..
|Num of mobiles
|Price in €
We plot the coordinates of these points in the Cartesian plane and we obtain the graph of the function (“the picture”).
The number of mobiles is represented on the x–axis (abscissas).
The price is represented on the y–axis (ordinates).
We can’t join the points because we can’t buy 1.5 mobiles or 2.3 mobiles. This type of variables is named discrete variables.
3.2. Representing a function through an equation
The algebraic expression of a function is written y = f(x) and it is named function equation.
- Recall the function notation f(x) read “f of x”.
- f is the function name.
- Output values are also called functional values. Note that you can use any letter to represent a function name, fis a very common one used.
- xis your input variable.
- y is your output variable.
Think of functional notation as a fancy assignment statement. When you need to evaluate the function for a given value of x, you simply replace x with that given value and simplify. Just like you do when you are finding the value of an expression when you are given a number for your variable as shown in Lesson 5: Algebraic Expressions. For example, if we are looking for f(0), we would plug in 0 for the value of x in our function f.
2. Find the functional values f(-2), f(-1), f(0), f(1) and f(2) for the function f(x) = 2x – 1. Draw the graph of the function.
Again, think of functional notation as a fancy assignment statement. For example, when we are looking for f(0), we are going to plug in 0 for the value of x in our function f and so forth.
|Values of the independent variable
||Values of y
| f(x) = 2x – 1 Plug in -2 for xf(x) = 2 · (-2)- 1
||Evaluate: f(-2) = -5
| f(x) = 2x – 1 Plug in -1 for x f(x) = 2 · (-1)- 1
||Evaluate: f(-1) = -3
| f(x) = 2x – 1 Plug in 0 for x f(x) = 2 · 0 – 1
||Evaluate: f(0) = -1
| f(x) = 2x – 1 Plug in 1 for x f(x) = 2 · 1 – 1
||Evaluate: f(1) = 1
| f(x) = 2x – 1 Plug in 2 for xf(x) = 2 · 2 – 1
||Evaluate: f(2) = 3
We can build a table of values
Representing the points we obtain the graph of the function.
In this case we can join the points because you can always work out triple x minus one unit, even if the number is not an integer.
In the links below you can practice how to evaluate a function
Evaluate a linear function (this is a function whose graph is a line)
Complete a function table (of a linear function, this is a function whose graph is a line)
Evaluate a nonlinear function
In the following link you can practice how to get an equation (only a linear expression as, for instance, y = 45 · x or y = 45 · x +1) for a table.
Write a rule for a function table
3.3. Representing a function using words
This situation is usually found in word problem where you are asked for the graph and the equation of the function. In case of having to find out the equation of a function given in words the process is the same as when solving word problems with equations. This is you have to translate words into algebra.
Let’s return to example 1.
3.A shop sells mobile phones with a price of 45€ per unit. Write the function that relates the number of mobiles bought and the price in €. Find out the equation of this function.
If I buy 1 mobile I will pay 45€, if I buy 2 mobiles I will pay 90€, if I buy 3 mobiles I will pay 135€.. if I buy x mobiles I will pay 45 · x €. Therefore the equation of the function will be
y = 45 · x
We use to write it y = 45 x.