[22 Feb 2010]
A lot of people have difficulty with functions in math. I suspect it’s because function notation is not very learner-friendly.
Yousuf, one of my regular correspondents, got stuck on the following problem recently.
What is the area of the rectangle ADEB shown in the diagram?
The curve is the graph of y = 1/x2 (for positive x), and r is some arbitrary value of x.
We’ll come back to this question a little later. I suspect his problem with this question was due to a rusty conceptual understanding of functions.
A function is simply an expression involving variable(s).
We usually write a function of the variable x using the notation: f(x). A function has at most 1 value for each value of x.
For example, if f(x) = 5x2 + 3, we can find the value of the function if we choose x = 0 as follows.
f(0) = 5(0)2 + 3 = 5 × 0 + 3 = 3
Now, this is a good example of the notation problem I was talking about at the beginning. We write "f(0)" (f bracket 0 bracket) to mean "evaluate the function expression by substuting 0 every time we see an x" and we see this on the left hand side of this equation.
But on the right hand side, I have written "5(0)2" (5 bracket 0 bracket squared) and this means "5 × 02". We need to be careful with this – writing 2 different concepts with what is essentially the same notation.
It is a shame that function notation is so clumsy and causes problems for newbies.
Let’s look at some more examples for our function f(x) = 5x2 + 3.
f(2) = 5(2)2 + 3 = 5 × 4 + 3 = 23.
f(10) = 5(10)2 + 3 = 5 × 100 + 3 = 503.
If we were to substitute many more values of x and plot the dots on a graph, we would get the following:
Note: On the vertical axis, I put f(x), but I could have also put "y", since the convention in math is the vertical axis represents the function value. Often you’ll see it written y = f(x).
OK so far?
Now, let’s make things a bit more interesting. What is f(a)? We just substitute a everywhere there is an x in the original function, like we did before with the numbers:
f(a) = 5(a)2 + 3 = 5a2 + 3
Let’s do another. In this next case, f(a + 4), we are just replacing each x in the original function expression with a + 4.
f(a + 4) = 5(a + 4)2 + 3 = 5(a2 + 8a + 16) + 3 = 5a2 + 40a + 83
Of course, we need to be careful to expand out the brackets properly!
A Different Function
Let’s change our function to .
This is the curve we met in the question at the the beginning of this article.
If x = 1, we replace every x in our expression with 1 and we have:
What f(1) means on a graph is the distance from the x-axis to the graph is 1 unit. The function value is the height of the graph for that x-value.
Now let’s do f(3a).
represents the height of the graph when x = 3a. We need to be careful with the brackets.
Back to Our Problem
Here’s the graph again:
So how do we find the area of the rectangle BADE? The width of the rectangle is quite straightforward, as the distance from r to r − 1 is just 1 unit. But we need to find the height AD.
AD is just the function value f(r):
So the area of the rectangle is just
Area = width × height =
What if we needed the height BC?
We would just find the function value as follows.
Functions of 2 Variables
The functions above only have one variable and they describe a curve in 2-D space.
To describe a 3-D surface, we need to use 2 variables.
We write a function of 2 variables using this notation:
z = f(x,y)
The "z" indicates the height of the surface for particular values of x and y.
An example of a 3-dimensional surface is z = x2 + 3 sin y.
See this chapter for a lot more examples of functions: Functions and Graphs. (2 dimensional)
This is an introduction to 3-dimensional Coordinate System.
See also Towards more meaningful math notation where I suggest an alternative to the current confusion.