# What are Functions? Excerpt from “Math Dialogue: Functions”

T:

What are functions? I could just insert the standard definition here, but I fear that this might not be the best approach for those who have just started their journey into the fascinating world of mathematics. For one, any common textbook will include the definition, so if that’s all you’re looking for, you don’t need to continue reading here. Secondly, it is much more rewarding to build towards the definition step by step. This approach minimizes the risk of developing deficits and falling prey to misunderstandings.

S:

So where do we start?

T:

We have two options here. We could take the intuitive, concept-focused approach or the more abstract, mathematically rigorous path. My recommendation is to go down both roads, starting with the more intuitive approach and taking care of the strict details later on. This will allow you to get familiar with the concept of the function and apply it to solve real-world problems without first delving into sets, Cartesian products as well as relations and their properties.

S:

Sounds reasonable.

T:

Then let’s get started. For now we will think of a function as a mathematical expression that allows us to insert the value of one quantity x and spits out the value of another quantity y. So it’s basically an input-output system.

S:

Can you give me an example of this?

T:

Certainly. Here is a function: y = 2·x + 4. As you can see, there are two variables in there, the so-called independent variable x and the dependent variable y. The variable x is called independent because we are free to choose any value for it. Once a value is chosen, we do what the mathematical expression tells us to do, in this case multiply two by the value we have chosen for x and add four to that. The result of this is the corresponding value of the dependent variable y.

S:

So I can choose any value for x?

T:

That’s right, try out any value.

S:

Okay, I’ll set x = 1 then. When I insert this into the expression I get: y = 2·1 + 4 = 6. What does this tell me?

T:

This calculation tells you that the function y = 2·x + 4 links the input x = 1 with the output y = 6. Go on, try out another input.

S:

Okay, can I use x = 0?

T:

Certainly. Any real number works here.

S:

For x = 0 I get y = 2·0 + 4 = 4. So the function y = 2·x + 4 links the input x = 0 with the output y = 4.

T:

That’s right. Now it should be clear why x is called the independent variable and y the dependent variable. While you may choose any real number for x, sometimes there are common sense restrictions though, we’ll get to that later, the value of y is determined by the form of the function. A few more words on terminology and notation. Sometimes the output is also called the value of the function. We’ve just found that the function y = 2·x + 4 links the input x = 1 with the output y = 6. We could restate that as follows: at x = 1 the function takes on the value y = 6. The other input-output pair we found was x = 0 and y = 4. In other words: at x = 0 the value of the function is y = 4. Keep that in mind.

As for notation, it is very common to use f(x) instead of y. This emphasizes that the expression we are dealing with should be interpreted as a function of the independent variable x. It also allows us to note the input-output pairs in a more compact fashion by including specific values of x in the bracket. Here’s what I mean.

For the function we can write: f(x) = 2·x + 4. Inserting x = 1 we get: f(1) = 2·1 + 4 = 6 or, omitting the calculation, f(1) = 6. The latter is just a very compact way of saying that for x = 1 we get the output y = 6. In a similar manner we can write f(0) = 4 to state that at x = 0 the function takes on the value y = 4. Please insert another value for x using this notation.

S:

Will do. I’ll choose x = -1. Using this value I get: f(-1) = 2·(-1) + 4 = 2 or in short f(-1) = 2. So at x = -1 the value of the function is y = 2. Is all of this correct?

T:

Yes, that’s correct.

S:

You just mentioned that sometimes there are common sense restrictions for the independent variable x. Can I see an example of this?

T:

Okay, let’s get to this right now. Consider the function f(x) = 1/x. Please insert the value x = 1.

S:

For x = 1 I get f(1) = 1/1 = 1. So is it a problem that the output is the same as the input?

T:

Not at all, at x = 1 the function f(x) = 1/x takes on the value y = 1 and this is just fine. The input x = 2 also works well: f(2) = 1/2, so x = 2 is linked with the output y = 1/2. But we will run into problems when trying to insert x = 0.

S:

I see, division by zero. For x = 0 we have f(0) = 1/0 and this expression makes no sense.

T:

That’s right, division by zero is strictly verboten. So whenever an input x would lead to division by zero, we have to rule it out. Let’s state this a bit more elegantly. Every function has a domain. This is just the set of all inputs for which the function produces a real-valued output. For example, the domain of the function f(x) = 2·x + 4 is the set of all real numbers since we can insert any real number x without running into problems. The domain of the function f(x) = 1/x is the set of all real numbers with the number zero excluded since we can use all real numbers as inputs except for zero.

Can you see why the domain of the function f(x) = 1/(3·x – 12) is the set of all real numbers excluding the number four? If it is not obvious, try to insert x = 4.

S:

Okay, for x = 4 I get f(4) = 1/(3·4 – 12) = 1/0. Oh yes, division by zero again.

T:

Correct. That’s why we say that the domain of the function f(x) = 1/(3·x – 12) is the set of all real numbers excluding the number four. Any input x works except for x = 4. So whenever there’s an x somewhere in the denominator, watch out for this. Sometimes we have to exclude inputs for other reasons, too. Consider the function f(x) = sqrt(x). The abbreviation “sqrt” refers to the square root of x. Please compute the value of the function for the inputs x = 0, x = 1 and x = 2.

S:

Will do.

f(0) = sqrt(0) = 0

At x = 0 the value of the function is 0.

f(1) = sqrt(1) = 1

At x = 1 the value of the function is 1.

f(2) = sqrt(2) = 1.4142 …

At x = 2 the value of the function is 1.4142 … All of this looks fine to me. Or is there a problem here?

T:

No problem at all. But now try x = -1.

S:

Okay, f(-1) = sqrt(-1) = … Oh, seems like my calculator spits out an error message here. What’s going on?

T:

Seems like your calculator knows math well. There is no square root of a negative number. Think about it. We say that the square root of the number 4 is 2 because when you multiply 2 by itself you get 4. Note that 4 has another square root and for the same reason. When you multiply -2 by itself, you also get 4, so -2 is also a square root of 4.

Let’s choose another positive number, say 9. The square root of 9 is 3 because when you multiply 3 by itself you get 9. Another square root of 9 is -3 since multiplying -3 by itself leads to 9. So far so good, but what is the square root of -9? Which number can you multiply by itself to produce -9?

S:

Hmmm … 3 doesn’t work since 3 multiplied by itself is 9, -3 also doesn’t work since -3 multiplied by itself is 9. Looks like I can’t think of any number I could multiply by itself to get the result -9.

T:

That’s right, no such real number exists. In other words: there is no real-valued square root of -9. Actually, no negative number has a real-valued square root. That’s why your calculator complained when you gave him the task of finding the square root of -1. For our function f(x) = sqrt(x) all of this means that inserting an x smaller than zero would lead to a nonsensical result. We say that the domain of the function f(x) = sqrt(x) is the set of all positive real numbers including zero.

In summary, when trying to determine the domain of a function, that is, the set of all inputs that lead to a real-valued output, make sure to exclude any values of x that would a) lead to division by zero or b) produce a negative number under a square root sign. Unless faced with a particularly exotic function, the domain of the function is then simply the set of all real numbers excluding values of x that lead to division by zero and those values of x that produce negative numbers under a square root sign.

I promise we will get back to this, but I want to return to the concept of the function before doing some exercises. Let’s go back to the introductory example: f(x) = 2·x + 4. Please make an input-output table for the following inputs: x = -3, -2, -1, 0, 1, 2 and 3.

This was an excerpt from “Math Dialogue: Functions“, available on Amazon for Kindle.