# Functions (math question)

**URL:** <https://boards.straightdope.com/t/functions-math-question/475504>\
**Category:** Factual Questions\
**Created:** [December 3, 2008, 1:59pm UTC](https://boards.straightdope.com/t/functions-math-question/475504 "2008-12-03T13:59:38Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Duhkecco](https://avatars.discourse-cdn.com/v4/letter/d/8491ac/32.png) [@Duhkecco](https://boards.straightdope.com/u/Duhkecco)\
**Post date:** [December 3, 2008, 5:14pm UTC](https://boards.straightdope.com/t/functions-math-question/475504/21 "2008-12-03T17:14:19Z")

</div>

> [@DrCube](#):
>
> y=3x is an equation. f(x)=3x is a function. A subtle change in notation completely changes the way we think about it, and suggests new questions to ask, opening up the entirely new area of math called calculus.

How specifically does it “completely change” the way we think about it and what are the new questions that it suggests we ask?

---

<div class="post-metadata">

**Author:** ![vinniepaz](https://avatars.discourse-cdn.com/v4/letter/v/b4bc9f/32.png) [@vinniepaz](https://boards.straightdope.com/u/vinniepaz)\
**Post date:** [December 3, 2008, 5:17pm UTC](https://boards.straightdope.com/t/functions-math-question/475504/22 "2008-12-03T17:17:24Z")

</div>

In my high school math classes a teacher, having a tough time explaining the concept of functions, used the “machine” analogy.

He drew a box, and said "this a number changing machine. If I put a number in one side, I get a different number out the other side. This helped a lot of kids understand it-- then he was able to extend the analogy to different machines that do different things to different numbers-- one squares the number, one doubles it and subtracts 4, etc.

Of course, the “machine” is just a function.

---

<div class="post-metadata">

**Author:** ![DrCube](https://avatars.discourse-cdn.com/v4/letter/d/a3d4f5/32.png) [@DrCube](https://boards.straightdope.com/u/DrCube)\
**Post date:** [December 3, 2008, 5:18pm UTC](https://boards.straightdope.com/t/functions-math-question/475504/23 "2008-12-03T17:18:44Z")

</div>

> [@Ruminator](#):
>
> As I mentioned before, IANAM but I lean towards the idea that mathematics is more about “seeing and understanding **patterns** ” as opposed to “notation”.
> 
> It’s somewhat analogous to music is more about the “underlying patterns of tones” instead of the “treble clef staff notation” of music.
> 
> However, it’s not black-&-white. For example, there is undeniable progression in expressing numbers as roman numerals vs base10 vs scientific notation. Maybe you could argue that some human innovations and inventions were _caused_ specifically by convenient notation but I would think they’d be overshadowed by inventions of pure mathematics imagination (pattern recognition)–regardless of notation.

I can see what you’re saying. I didn’t mean to imply that there is nothing else to math than notation, or else it is just an empty, pointless field. But we seem to forget the huge pyramid of abstraction math built out of concrete, everyday ideas. You just can’t process those levels of abstraction without compact, rigorous notation. Furthermore, higher levels of abstraction seem to come from better notation, not vice versa. Those patterns you’re talking about can only be expressed in mathematical notation. If they could be expressed and studied with regular language, we wouldn’t consider it math, we’d just call it interesting conversation (or some other field like History or Literature).

And I’m not a mathematician either, just an interested EE student. I’m sure I’m way out of my league here, so I’d really like to discuss this in another thread with the input of folks more knowledgeable than me. So give me a few minutes and I’ll drag this issue over to GD or somewhere and stop hijacking this thread.

---

<div class="post-metadata">

**Author:** ![DrCube](https://avatars.discourse-cdn.com/v4/letter/d/a3d4f5/32.png) [@DrCube](https://boards.straightdope.com/u/DrCube)\
**Post date:** [December 3, 2008, 5:21pm UTC](https://boards.straightdope.com/t/functions-math-question/475504/24 "2008-12-03T17:21:24Z")

</div>

> [@vinniepaz](#):
>
> In my high school math classes a teacher, having a tough time explaining the concept of functions, used the “machine” analogy.
> 
> He drew a box, and said "this a number changing machine. If I put a number in one side, I get a different number out the other side. This helped a lot of kids understand it-- then he was able to extend the analogy to different machines that do different things to different numbers-- one squares the number, one doubles it and subtracts 4, etc.
> 
> Of course, the “machine” is just a function.

Yeah, my teacher used this, too. Also, if you do something to that machine and get one thing out, and later do the exact same thing to it and get something else out, then the machine doesn’t “function”. Hence the ‘only one y for each x’ restriction.

---

<div class="post-metadata">

**Author:** ![Ruminator](https://avatars.discourse-cdn.com/v4/letter/r/b9bd4f/32.png) [@Ruminator](https://boards.straightdope.com/u/Ruminator)\
**Post date:** [December 3, 2008, 5:35pm UTC](https://boards.straightdope.com/t/functions-math-question/475504/25 "2008-12-03T17:35:09Z")

</div>

> [@DrCube](#):
>
> I can see what you’re saying. I didn’t mean to imply that there is nothing else to math than notation, or else it is just an empty, pointless field. But we seem to forget the huge pyramid of abstraction math built out of concrete, everyday ideas. You just can’t process those levels of abstraction without compact, rigorous notation. Furthermore, higher levels of abstraction seem to come from better notation, not vice versa. Those patterns you’re talking about can only be expressed in mathematical notation.

I see more of your philosophy here and it looks like the answer is multi-layered. I’ll take your example:

> [@DrCube](#):
>
> Functions are a perfect illustration. y=3x is an equation. f(x)=3x is a function. A subtle change in notation completely changes the way we think about it, and suggests new questions to ask, opening up the entirely new area of math called calculus.

This looks backwards to me. (At first, it looked backward.)

If we look at the build-up to Isaac Newton’s “Principia Mathematica”, we see that he first had a set of observations (Kepler’s raw numerical data on planet positions, Galileo’s telescope observations, and maybe even including a falling apple). He then tried to reconcile all those observations (pattern recognition) with a new mental model / mathematics technique of calculus. You **then** have his dot notation of calculus. The imagination and invention came first and then drove the notation in this case.

If we restrict the “notation” portion of this history to the calculus part then it does indeed look like notation is motivated by invention.

However, I can also see that Newton back in the year 1666 was using the more powerful base10 India digits 0123456789 instead of roman numerals to write. Maybe roman numerals would have been too cumbersome and not freed up his brain enough to generate ideas of gravity in the first place. In this case, then notation “greases the wheels” of invention and maybe some could argue that it _causes_ invention.

---

<div class="post-metadata">

**Author:** ![DrCube](https://avatars.discourse-cdn.com/v4/letter/d/a3d4f5/32.png) [@DrCube](https://boards.straightdope.com/u/DrCube)\
**Post date:** [December 3, 2008, 5:36pm UTC](https://boards.straightdope.com/t/functions-math-question/475504/26 "2008-12-03T17:36:16Z")

</div>

[Here’s the thread.](http://boards.straightdope.com/sdmb/showthread.php?p=10525099)

Sorry to hijack, Rachel.

---

<div class="post-metadata">

**Author:** ![gladtobeblazed](https://avatars.discourse-cdn.com/v4/letter/g/85f322/32.png) [@gladtobeblazed](https://boards.straightdope.com/u/gladtobeblazed)\
**Post date:** [December 3, 2008, 5:43pm UTC](https://boards.straightdope.com/t/functions-math-question/475504/27 "2008-12-03T17:43:24Z")

</div>

I feel that it is much easier to understand the concept of inverses by studying functions.

---

<div class="post-metadata">

**Author:** ![Napier](https://avatars.discourse-cdn.com/v4/letter/n/ce73a5/32.png) [@Napier](https://boards.straightdope.com/u/Napier)\
**Post date:** [December 3, 2008, 5:43pm UTC](https://boards.straightdope.com/t/functions-math-question/475504/28 "2008-12-03T17:43:35Z")

</div>

A function is itself a thing, which is distinct from the relationships we might describe in an equation. For example suppose the function sum(x,y) equals x+y. The idea of addition sitting inside there is maybe a sort of mathematical atom, which you can’t break down into anything simpler. There is a deep and satisfying view of addition that says it’s this sum function, which is its own little world inside, and when you get into things that happen inside of computers you sometimes actually find things written “sum(x,y)” or find that some logical engine is reading “x+y” and replacing it with “sum(x,y)”.

There is also the idea of pure functions, which I sort of grasp while I am reading about it, and the lambda calculus, and places it appears like in the computer language Scheme.

Moreover, functions can be arguments to other functions, and so there are functions that operate on functions. For example, the derivative function, which you might write as der(a,b) where a is a function and b is an argument that appears in that function, so der(x^2,x)=2x. Or, consider an inverse function (by which I mean turning something inside out, not dividing one by it). You could define inverse(f(x)) to be the function such that inverse(f(y)) = y. I often wind up writing computer code that calculates inverse functions like this, because for example I have already available some built-in function that tells me the probability a Poisson distributed variable will be greater than x, and what I need is a function that tells me the x for which the probability is what I know.

---

<div class="post-metadata">

**Author:** ![Pasta](https://avatars.discourse-cdn.com/v4/letter/p/ecccb3/32.png) [@Pasta](https://boards.straightdope.com/u/Pasta)\
**Post date:** [December 3, 2008, 6:28pm UTC](https://boards.straightdope.com/t/functions-math-question/475504/29 "2008-12-03T18:28:36Z")

</div>

Just to add a few more thoughts…

You can think of a function as something that is, well, functional – it does something. A fruit juicer is functional – it has a set of rules governing what it produces for various inputs. Give it an orange, you get orange juice. Give it a grapefruit, you get grapefruit juice. This function is only defined for fruits though. Its behavior is not defined for the input “iPod”.

The point here is that you refer to this machine by a name (juicer) rather than by its rules for operating on its input.

If I have a function f, it is a machine that in an introductory algebra class can take as input any real number and has some machinery for producing a result. I don’t necessarily need to know what it will do. I can still refer to the machine, f.

I can try to write down in an algebraic expression what the function does, because it is useful to know. Let’s say that f is a simple function that produces as output the square of its input. I don’t know what the input is going to be, but if I just call it x I can represent the behavior of the machine:

f(x) = x[sup]2[/sup]

The philosophical point here is that the function is the thing of interest, and the stuff on the right is just a way of defining the behavior. Not all functions can have their behavior cleanly written down. The juicer is a silly example. A numerical one would be a function which takes the “number of days since Jan 1 2000” and returns the price of gas at your local filling station.

Simple mechanical machines get put together to get work done. The output of one machine becomes the input of another, and soon you have an airplane. You can do the same with functions, even if you can’t write down algebraically the functions’ behaviors:

f(x) = “price of gas at time x”  
g(x,y) = “money spent buying gas if the price is x dollars/gal and y is number of gallons purchased”

(I’ve used x twice on purpose. These variables don’t exist outside of the function definitions. They are simply tokens used in the definitions and can be anything I want.)

So if I buy 10 gallons 934.5 days after Jan 1 2000 , I know exactly how much I spent. It’s:

g( f(934.5), 10)

Sure, this isn’t a number I can put in my checkbook. But it is as good as that number. If something else needs my gas expenditure, I can plug in g, and as long as _g_ knows what g is doing, I don’t need to.

In an algebra class, the functions will be simple in the sense that they can always be defined via an algebraic expression. But the abstraction to a function _concept_ becomes essential pretty much immediately after algebra in a wide range of fields.

---

<div class="post-metadata">

**Author:** ![Hari\_Seldon](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/hari_seldon/32/5173_2.png) [@Hari\_Seldon](https://boards.straightdope.com/u/Hari_Seldon)\
**Post date:** [December 3, 2008, 7:02pm UTC](https://boards.straightdope.com/t/functions-math-question/475504/30 "2008-12-03T19:02:55Z")

</div>

I cringe at what gets to teach math these days.

---

<div class="post-metadata">

**Author:** ![erislover](https://avatars.discourse-cdn.com/v4/letter/e/71e660/32.png) [@erislover](https://boards.straightdope.com/u/erislover)\
**Post date:** [December 3, 2008, 7:14pm UTC](https://boards.straightdope.com/t/functions-math-question/475504/31 "2008-12-03T19:14:14Z")

</div>

Functions can also have multiple variables, and mildly abstract functions can have constants and variables. Functional notation like f(x,y) makes it perfectly clear what is and what is not a constant, e.g.,  
f(x,y) = ax[sup]2[/sup] - by[sup]2[/sup]

---

<div class="post-metadata">

**Author:** ![Pasta](https://avatars.discourse-cdn.com/v4/letter/p/ecccb3/32.png) [@Pasta](https://boards.straightdope.com/u/Pasta)\
**Post date:** [December 3, 2008, 7:29pm UTC](https://boards.straightdope.com/t/functions-math-question/475504/32 "2008-12-03T19:29:21Z")

</div>

> [@Hari\_Seldon](#):
>
> I cringe at what gets to teach math these days.

Perhaps, but I would hope the OP is not in your cringe category. Recognizing deficiencies in understanding and then seeking to correct these seems like a positive trait to me. Plus, the concept being discussed here is deeper than it appears at first blush.

---

<div class="post-metadata">

**Author:** ![Tyrrell\_McAllister](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/tyrrell_mcallister/32/16772_2.png) [@Tyrrell\_McAllister](https://boards.straightdope.com/u/Tyrrell_McAllister)\
**Post date:** [December 3, 2008, 8:49pm UTC](https://boards.straightdope.com/t/functions-math-question/475504/33 "2008-12-03T20:49:24Z")

</div>

I can remember when I was first taking algebra courses and have exactly the same question: “Why introduce this _f_(_x_) thing? What was wrong with just calling it _y_?”

Text books use functional notation in all sorts of confusing ways that really hamper the ability of students to figure out what’s going on. The worst is when you see something like “and so we see that _y_ = _y_(_x_) is a function of _x_.”

It would be very helpful if algebra texts were more careful to keep the concepts of “equation” and “function”. Here’s how I compare and contrast these two concepts.

**Equation** : An equation (in the context of high-school algebra) is the assertion that two numbers are equal. An example:

_z_ = _x_[sup]2[/sup] + _y_[sup]3[/sup] _x_ - 1

Note two things.

(1) An equation is an _assertion_. It is a declarative statement. It is a sentence. Fundamentally, it is a grammatical object. It’s a piece of the language that we use to talk about numbers.

(2) An equation is the assertion that two _numbers_ are equal. That is, the things on either side of the equal sign are _specific numbers_. We just might not know exactly which numbers they are. For example, if I assert the equation above, then I am asserting that there are three specific numbers such that, in words,

The third number equals the result of subtracting 1 from the sum of the square of the first number and the product of the cube of the second number and the first number.

Again, there are three _specific_ numbers involved here. I’m just writing letters in their place. Maybe I do that because I don’t know which numbers they are. Or maybe I want to stipulate as little as possible about them so that I can deduce general conclusions — that is, conclusions that would hold no matter which three numbers they were.  
Contrast that with a

**Function** : A function (in the context of high-school algebra) is something that, if you give it a certain number of numbers, returns a number to you. You might not be able to give it any numbers you like. Maybe it only takes positive numbers. But, crucially, it must be _deterministic_ in the sense that it always returns that same number to you if you feed it the same input.

Someone above mentioned a really good analogy: functions are machines. You feed numbers into a hopper on one side, and the machine spits a number out of the other side.

Here’s an example of a function: the function _f_ that, given two numbers _x_ and _y_, returns the number _x_[sup]2[/sup] + _y_[sup]3[/sup] _x_ - 1.

Using functional notation, we can describe this same function as: the function _f_ such that, given two numbers _x_ and _y_,

_f_(_x_, _y_) = _x_[sup]2[/sup] + _y_[sup]3[/sup] _x_ - 1.

Note the following:

(1) Remember that equations are just sentences. They are fundamentally inert things. Functions, in contrast, are active. They do different things when you give them different input. When I give you a function, I’m _not_ supposing that there are _specific_ numbers being fed into it.

(2) I _defined_ the function _f_ _using_ the equation _f_(_x_, _y_) = _x_[sup]2[/sup] + _y_[sup]3[/sup] _x_ - 1. But the function _f_ itself is _not_ the equation. The equation was just one of the sentences I used to describe which function I was talking about.

And this brings us to why we introduce the notion of functions: We want to be able to think mathematically about the function _f_ itself.

Unlike an equation, _f_ is not merely a sentence that we use to talk about numbers. It’s actually a _mathematical object itself_. Just like numbers, I can take functions such as _f_ and I can start adding them or subtracting them. More generally, I can _start plugging them into other functions_. We started out just with functions that take in numbers, but now that my universe of mathematical objects includes functions themselves, I can start considering functions that take in other functions. The function “take the derivative” is such a function. This recursion, where functions start being able to act on themselves, adds an incredible amount of expressive power to mathematics. The significance of this conceptual leap cannot be overstated.

---

<div class="post-metadata">

**Author:** ![RachelChristine](https://avatars.discourse-cdn.com/v4/letter/r/7ab992/32.png) [@RachelChristine](https://boards.straightdope.com/u/RachelChristine)\
**Post date:** [December 4, 2008, 3:13am UTC](https://boards.straightdope.com/t/functions-math-question/475504/34 "2008-12-04T03:13:27Z")

</div>

I might just read most of what **Thudlow Boink** said to my classes tomorrow. I don’t know how much they will understand, being 14 year olds, but it sure made everything make sense to me!

> [@Thudlow\_Boink](#):
>
> By the way, I think a lot of your confusion is the textbook’s fault. I think beginning/intermediate algebra books introduce the concept of function because the students will need it later when they get to more advanced algebra or trig or calculus, but they don’t often do a very good job of motivating the idea or explaining why it’s going to be important. They talk about the Vertical Line Test or “a set of ordered pairs, no two of which has the same first element” (which is a concise and accurate definition from a mathematical point of view, but not very enlightening from a practical standpoint), without explaining who cares about such things, or why.

This is exactly it! I think that vague confusion just stayed with me all the way through all of my math classes when I was in school. I could do the work, so didn’t really care enough about the underlying why. One of my biggest weaknesses as a math teacher is that I don’t always care about “When will I use this in the real world?”, because to me math is just so much fun. I don’t care about USING it, I just want to play around solve the problem. (I was always one of the nerds who _liked_ word problems and proofs.) I can do just about anything you throw at me and can explain it (I hope well!), but I don’t always know why it’s important. I’m working on that though!

> [@sailor](#):
>
> How much I pay for cheese is a function of how much cheese I buy. How else do I and the seller know how much I need to pay?

I liked this (the other examples given by **sailor**. I think it’s simple enough for these kids to maybe see why it might need to be written different than just the y= stuff we’ve been doing. I can easily give this example and then expand upon to something harder that they might not be able to do yet, but will see how they might need to learn it someday.

> [@Thudlow\_Boink](#):
>
> All sorts of things are functions. There’s the square root function (What’s the square root **of** 9?), trigonometric functions (What’s the cosine **of** 60 degrees?), probability functions (What’s the probability **of** getting a royal flush?), even non-mathematical “functions” (Who’s the current Governor **of** California?) In a sense, whenever you talk about “The \_\_\_\_ of \_\_\_\_,” you’re probably dealing with a function.

This was a great post, but I’ve snipped this part, because WOW! I’d never thought about making this stuff into functions. Cool.

> [@Keeve](#):
>
> My understanding of the OP is that she wasn’t asking about the notation, but about the concept.I understood this to show that her confusion was in trying to understand how functions are different than equations.

This is exactly right! This should have been my OP – how are functions any different than equations, other than just being a subset of them?

> [@DrCube](#):
>
> Yeah, my teacher used this, too. Also, if you do something to that machine and get one thing out, and later do the exact same thing to it and get something else out, then the machine doesn’t “function”. Hence the ‘only one y for each x’ restriction.

Cute!

> [@Pasta](#):
>
> Perhaps, but I would hope the OP is not in your cringe category. Recognizing deficiencies in understanding and then seeking to correct these seems like a positive trait to me. Plus, the concept being discussed here is deeper than it appears at first blush.

Thanks **Pasta**. I know I’m not the best math teacher in the world, or even in my school, but I’m far from the worst either. I know how to do the math and explain the math and I usually understand the math too! It’s just sometimes I’m missing the deeper whys.

---

<div class="post-metadata">

**Author:** ![Thudlow\_Boink](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/thudlow_boink/32/320_2.png) [@Thudlow\_Boink](https://boards.straightdope.com/u/Thudlow_Boink)\
**Post date:** [December 4, 2008, 4:45am UTC](https://boards.straightdope.com/t/functions-math-question/475504/35 "2008-12-04T04:45:53Z")

</div>

> [@RachelChristine](#):
>
> This was a great post, but I’ve snipped this part, because WOW! I’d never thought about making this stuff into functions. Cool.

Here’s a simple quiz I’ve sometimes given when talking about functions:

Let the function f(x) = x’s father, and m(x) = x’s mother.

1. Who is f(Bart Simpson) ? Homer Simpson

2. If you have a sister, who is m(your sister)? Your mother

3. Who is m(f(you))? Your grandmother (on your father’s side)

---

<div class="post-metadata">

**Author:** ![Colibri](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/colibri/32/1841_2.png) [@Colibri](https://boards.straightdope.com/u/Colibri)\
**Post date:** [December 4, 2008, 5:08am UTC](https://boards.straightdope.com/t/functions-math-question/475504/36 "2008-12-04T05:08:04Z")

</div>

> [@Hari\_Seldon](#):
>
> I cringe at what gets to teach math these days.

[Moderating]

**Hari** , this kind of comment is not appropriate for GQ. Please refrain from such remarks in the future.

Colibri  
General Questions Moderator

---

<div class="post-metadata">

**Author:** ![sailor](https://avatars.discourse-cdn.com/v4/letter/s/a587f6/32.png) [@sailor](https://boards.straightdope.com/u/sailor)\
**Post date:** [December 4, 2008, 1:00pm UTC](https://boards.straightdope.com/t/functions-math-question/475504/37 "2008-12-04T13:00:36Z")

</div>

An equation just means that two things are equal. If you have an = sign you have an equation.

A function just means that given a variable you can determine a result. Some functions can be expressed as simple equations (y=x+2), others as more complex sets of equations or tables or whatever.

---

<div class="post-metadata">

**Author:** ![erislover](https://avatars.discourse-cdn.com/v4/letter/e/71e660/32.png) [@erislover](https://boards.straightdope.com/u/erislover)\
**Post date:** [December 4, 2008, 3:06pm UTC](https://boards.straightdope.com/t/functions-math-question/475504/38 "2008-12-04T15:06:06Z")

</div>

**sailor** , that is really too simplistic. The equals sign, in practice, can mean many different things even in basic math. It can represent definition–say of a function. It can mean assignment of an independent variable. It can be a question about a dependent variable (what x is required for y=5?). It can represent the intersection of two curves (set f(x) = g(x) and solve).

In a trivial sense, yeah, an equals sign is an equation, but it is this kind of oversimplicity that makes understanding functions difficult in the first place.

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [December 4, 2008, 3:28pm UTC](https://boards.straightdope.com/t/functions-math-question/475504/39 "2008-12-04T15:28:08Z")

</div>

There is a standard symbol for definitions, although I can’t reproduce it here. We should use that rather than a standard equals sign in function definitions for clarity.

---

<div class="post-metadata">

**Author:** ![Thudlow\_Boink](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/thudlow_boink/32/320_2.png) [@Thudlow\_Boink](https://boards.straightdope.com/u/Thudlow_Boink)\
**Post date:** [December 4, 2008, 5:23pm UTC](https://boards.straightdope.com/t/functions-math-question/475504/40 "2008-12-04T17:23:45Z")

</div>

In some computer languages there are different symbols for assigning a value to something vs. checking if two things are equal. For instance, in Pascal (IIRC), **x := 7** assigns the value 7 to the variable x, while **x = 7** checks whether the value of the variable x is 7 or not. Other languages use = and == instead of := and =.

[Previous page](https://boards.straightdope.com/t/functions-math-question/475504.md?page=1)

[Next page](https://boards.straightdope.com/t/functions-math-question/475504.md?page=3)
