### What is a function anyway?

#### by Willie Wong

I tried to teach differential geometry to a biophysicist friend yesterday (at his request; he doesn’t really need to know it, but he wanted to know how certain formulae commonly used in their literature came about). Rather surprisingly I hit an early snag. Hence the title of this entry.

Part of the problem was, as usual, my own folly. Since he is more interested in vector fields and tensor fields, I thought I can take a short cut and introduce notions more with a sheafy flavour. (At the end of the day, tangent and cotangent spaces are defined (rather circularly) as dual of each other, and each with a partial, hand-wavy description.) I certainly didn’t expect having to spend a large amount of time explaining the concept of the *function*.

Now, don’t get me wrong, my friend knew what a function is. He just doesn’t know what a function *really is*. Let me explain. I was trying to explain how a vector field can be treated as intrinsic objects, and that its presentation as a ordered list of functions is a consequence of us putting a coordinate system on it, and how a vector field can “look” constant in one coordinate system without being constant in another coordinate system (which I hoped would lead up to a discussion of covariant differentiation). To motivate the discussion and lead off with an example, I started talking about a function as assigning to every point in the plane a real number, and how to visualize it as a height graph over the plane. Simple, right?

“But what is the function?” he asked.

After a bit of back and forth, I finally realized that the difficulty likes in something far, far more devious than I imagined. The problem is that he was perfectly comfortable with thinking in mathematics of the function as a *formula*, one that inputs several numbers, churns them, and spits out another number. But somehow he didn’t quite grasp the idea that a function can input a geometric object (say a point) and throw out a number.

Thank goodness that he is a bit of a programmer, and after a while he tapped into his knowledge of the C++ functions

“Oh, so you mean a function more like a function in C++, where the argument can be an array, a string, or an object…” he made the connection.

“… or that power button there, or a point on a piece of paper, or an elephant,” I finished his sentence. I added, “A function that returns the decimal representation of the skin colour can certainly take an elephant as an input.”

After thus freeing his mind, the discussion sped up quite a bit (except for when “now a tangent vector at a point takes as input a function defined on the plane and returns the slope in its direction” blew his mind again. Maybe I should try teaching him distribution theory).

So, what is a function any way?

I am inclined to believe that most Americans (for argument sake, I may as well say most Taiwanese youths; the key being a certain level of development in the education system) have learned, or seen in class (unfortunately the two are no longer equal), during sometime between end of elementary school and the first years of high school something of the following descriptions:

- A function is a sort of black box, a machine. The output it spits out depends on the input you put in. But it is well-determined, in that if put in the same input multiple times, it will always spit out the same output.
- A function is a mapping or an association between two groups of objects. For each item in the first group it associates one item in the second group. Multiple items in the first group can be linked to the same item in the second group, but not vice versa.
- A function is a set of arrows among a set of dots. Each dot can only have one arrow coming out of it, but can have multiple arrows going in.
- … and many more

And many students would have suffered through a New Math type description of this abstract function business, and spent some time describing the domain and range for some impossibly outrageous associations (a map from zoo animals to kitchen furniture, let’s say), and determining whether pictorial representations are in fact functions or not.

And then they hit the class variously called “Analytic Geometry” or “College Algebra” or “Pre-Calculus”, where all functions are now between subsets of the real numbers (every now and then a daring teacher will introduce complex numbers to often disastrous results), and more attention is paid to correctly using interval notation in combination with logical operators (such as ) to denote subsets of real number than the actual meaning of those subsets!

And soon the students completely forget what a function actually is, and their heads stuffed with the notion that a function has to be some closed-form expression operating on a real number which one *may*, at one’s pleasure, abbreviate .

And thus part of mathematics, as students understand it, becomes taxonomy. Imagine their surprise when they find out that there’s no closed-form expression for ; now imagine their relief when they learn that *that* problem has been solved, and the answer is called .

Furthermore, mathematical operations become symbol pushing. There’s no geometrical or intuitive understanding of the “functions” they are dealing with. The attention paid to graphing a function in high school classrooms are often just now lip-service, especially since we entered the age of the graphing calculators. After the introduction of functions with multiple arguments (say, the height function over a plane), students cannot directly visualize the graph without the aid of computers.

And coordinate transformations! Much emphasis has been put in textbooks about “reflections over this line” or “translation in this direction” and that. And students are drilled into dumbly accepting that to translate the graph three units in the positive direction, it suffices to replace by in the argument of the function, without really understanding, or questioning, why a “positive translation” requires “adding a negative number”! This would’ve been a perfect time to teach about active and passive transformations, which can lead naturally to understanding covariant and contravariant operations later in life (should the students enter engineering, physics, or even mathematics).

But no, instead the time was spent on doing more meaningless menial drills on mathematical manipulations that 80% of the class will never once need to use in the rest of their lives.

Mathematics has become a chore for schoolchildren, equally despised by the students who don’t see the point of learning all that abstract nonsense and by the teachers who can’t seem to get the students to be motivated.

Why was mathematics part of the general education anyway? In the United States, there had been a strong emphasis on Reading, Writing, and ‘Rithmetic in the past as basic literacy. In an age with life was simple, those were the skills essential in commerce, and hence essential in surviving in a society. For the erudite elite, however, the mathematical education is generally not about figuring of sums. Rather it was about geometry in the style of Euclid. And that was not taught because it was a life skill (even for land surveyors the uses are limited), but because reading Euclid fosters logical, axiomatic thinking.

The original push to bring more advanced mathematics into classrooms is admirable. Mathematics form the modern foundation of science, and allows us to see the world quantitatively, rather than qualitatively. The benefits from having a logical, rational populace is obvious and appealing. However, this type of mathematics are more behind-the-scenes thinking-machinery than anything else. They are skills difficult enough to teach, and even more so to test. Because in some sense the desired skill is, in effect, an ability to process new information, it cannot really be examined or learned by rote.

And in this simplistic view of history, this is where the tragedy occurred. Rather than figuring out a new way of measuring students’ learning of mathematics, the “educators” chose the perversion of the subject. Testable skills became what is taught. Proofs in geometry must be done in two-column format, and without actually fiddling with rulers and compasses; one can only modify the right hand side of the equation, not the left; techniques in calculus (shell method and washer method, anyone?) are drilled to the point that the students can instantly recognize on an exam, by the wording of the problem, which tool or trick to use, while be completely hopeless in applying it to real-life situations. Teachers have to rely on mnemonics (FOIL, for example) to teach basic concepts, and in the process transforming the students to computing machines with no understanding what it is they are doing. (What’s the point of the endless exercises in expanding and factoring polynomials anyway?) And in the process the students’ minds are turned off one by one.

A problem in maths education at the college level is the students’ misuse of definitions. One of the interesting points that Edwards and Ward make in that article is how some students try to understand mathematics in an *a posteriori* rather than *a priori* way. I believe that, at least in part, this tendency can be traced to earlier education in mathematics. That the testing culture promotes by rote the learning of bags of tricks and when to apply the tools is precisely an *a posteriori* conditioning. By seeing the same types of problems multiple times, the students are expected to infer the common feature between the various problems and learn by experience. While this is certainly part of a mathematician’s working habit, it is not all of it. The other half, rigorous logical deductions, is often lacking from such education.

So what can we do about this? I don’t have a complete solution, nor do I know whether my partial solution is even reasonable. But I’d imagine restoring mathematics to what it really is. There is on the one hand the mathematics that supports the development and study of natural sciences in a quantitative manner, and there is the mathematics that teaches logical reasoning skills. The two should be made separate. The former should be consolidated into a general science curriculum, or failing that, be combined with physics. It is awfully silly, in hind sight, that there are two different AP calculus classes and two different AP physics classes. Considering Newton basically invented calculus to solve problems in mechanics, it seems more natural to just have two classes, one on Mechanics and Calculus, and the other on Electromagnetism and Basic Differential Equations. There should be a qualitative track of nature sciences (or natural philosophy more properly) where natural laws are discussed in a way using only elementary arithmetic. In fact, this track could cover much of the more neglected sciences of a high school curriculum: geology, meteorology, earth and environmental sciences, botany, history of science, etc. In a separate track there can be a quantitative discussion of science, starting with a physics course which subsumes the “analytical geometry”/”pre calculus” course mentioned before. Logarithms can be naturally introduced in the chemistry class, and discrete dynamical systems as an exercise in biology.

The latter of the mathematical curriculum could then be quite honest about itself. Freed from the requirement of “applications in real life”, the course can be abstract and logically sound, while at the same time be interesting. A course in logic leading up to the incompleteness theorem, or a class in group theory from the transformation group point of view are both very doable. Knot theory or discrete mathematics contain lots of easily understandable theorems with lots of “Whoa!” factor. My hope is that as these classes will be exempt from standardized testing, and like music or art, allow the teacher and the students more freedom to teach and to learn.

This pre-occupation with standard names for functions seems to extend past high school. In Computer Science literature I often come across statements of the kind “fortunately, closed-form expression exists” or “unfortunately, no closed-form expression was found”. BTW, interesting perspective is Wolfram’s “The History and Future of Special Fucntions” — http://www.stephenwolfram.com/publications/recent/specialfunctions/ He gives some criteria on deciding whether a particular function deserves to have a standard name and table of values.

Thanks for the link. It is an interesting read.

> he was perfectly comfortable with thinking in mathematics of the function as a formula, one that inputs several numbers, churns them, and spits out another number.

Since a person is capable to understand a function of multiple variables, he can understand the function of two variables, f(x,y).

> But somehow he didn’t quite grasp the idea that a function can input a geometric object (say a point) and throw out a number.

But he cannot understand the function of two variables, f(x,y). It is absurd.

Any object can be modeled by a set of (state) variables, a vector of numbers. Since your friend can take pass multiple numbers as argument of a function, he is able to pass a vector, an object. The point in plane is specifiable by two numbers. Here is no need to entail the programming. Though OOP allows to trace the path from objects to vectors to numbers.

This has nothing to do with the “freedom”. The freedom not to drill the important things is not better than the command to drill something bad. The children need teachers just to limit their freedom – to direct the initially foolish children along the right track.

Honestly, I don’t quite understand what your argument is; and I suspect you may have misunderstood mine. My point is precisely that one should think of a point in the plane as a point in a plane, not as its specification (by two numbers) in a coordinate system. To insist on the representation by numbers and formulae is the point of view I dislike.

See, it is NOT that my friend does not understand the function of two variable: he understands it perfectly well. What he was having problem with is the concept that a function need not take numbers–no matter how many of them–as input. Your argument suggests to me that you may also fall into the same trappings. Let me try to write my objection in a different way. Let be a function from some set X, let’s say a plane, to the real numbers. The attachment to X of a coordinate system (a specification by two numbers), is in fact a map that is bijective. So the representation of in this coordinate system (your function of two variables), is in fact a function which factors through $\latex f$, i.e. , or . Now let be another parametrization of the set , and its associated representation of f.

Now I see there being two logically consistent point of views. One is that are three different functions: they have either different domains, or when their domains coincide, they act differently on the domain. The other is that the three functions are actually the

samefunction, just under different guises, because they contain the same information, and each one can be obtained from the other under the transformation induced by and . My lament, however, is that for many people, the school education leads them to think that a function should be identified with its representation in coordinates, so that and are the same thing. But when treated with two different formulae and which are merely the description of in two different coordinates, they will insist the two are different functions.(Note that this confusion is not limited to modernity. In fact this is the source of many early debates about the meaning of general relativity.)

I should also add that the connection to programming is brought up by my friend, not by me. It was an analogy that he felt useful in helping him understand. I do not advocate teaching the concept of functions using programming in general, the same way I do not advocate the teaching of basic mathematics using category theory in general.

Also, about the “freedom” you complain about. The point that I was trying to make is that the “important things” you talk about, things like basic arithmetic, algebraic manipulations, calculation skills, and even calculus, should be presented

as toolsin the science classes that use them. That way their importance can be stressed and illustrated by practical examples.And your interpretation of the freedom is also quite different from mine. I do not say students should have free rein on what they learn. In fact, the choice offered to the student is whether they elect to take this mathematics: since all the “necessary life skills” portion is already extracted and incorporated into classes they will be necessary for, the remainder of “mathematics” should not be required, but children should be encouraged to learn it for their own edification. The same way children should be encouraged to learn literature beyond basic literacy, the same way children should be encourage to learn history beyond general civics.

The freedom I talked about is a freedom for the instructor. The instructor will be allowed to go slowly

but rigorouslythrough difficult logical concepts, and really teach the studentshow to think. In other words, I want to separate out the rote and the routine in mathematics (for which your favourite word “drill” is appropriate) from the creative and imaginative.A relevant question just appeared on Math.SE: http://math.stackexchange.com/q/1730/1543

I’ve seen a lot of this confusion about what a function is. I was giving a lecture on continuity (more specifically the cube root of 7) and asked the class to describe a function which goes from 1 to 8 without hitting 7 in between. (The punchline later became a definition of continuity)

Nobody could come up with an answer to this question; I was shocked. They were thinking “Hmm… ? No..” I originally believed that students have the issue of thinking of a function as something with a graph (which, from a set theory point of view… it is… but one requires yet a broader interpretation in practice).

It seems to me that a lot of times the word “observable” in science ends up being a function. Or really basically anything you can talk about. Like the “x-coordinate” or the distance from a certain point. The “center” of a circle. Or a person’s “exam grade” or “mother”. The idea that functions are always real-valued causes people to underestimate the usefulness of mathematics in softer disciplines. Of course, you can call basically anything a function, the mathematical model is only as good as the theorems you can prove under good assumptions.

I don’t know if I understand your point about what to do about maths education. Perhaps it is that I do not agree. I rather like the math departments of the world bearing the responsibility of teaching the pieces of math that other disciplines use. I feel like we understand it much better, and that it’s not entirely inconvenient mathematically to cover what is useful to the other disciplines. Newton invented calculus for physics; Leibniz invented it for philosophy. One just as easily is forced to invent it for economics or a number of other things; it’s all very accidental. I think far more people take calculus in high school than take physics; in most US high schools which have these opportunities, don’t people just pick one science? There are also other physics tracks (like IB Physics or the “Physics B” AP) which cover a broader range of subjects as you mention, but with less depth.

The problem I guess I have is that all the physics courses I took like quantum, E&M were mathematically more advanced than I was at the time, so I was supposed to learn math in them. In mathematics, conservation of energy is (often) “multiply by something and integrate by parts”; a conservative force is something that goes away when you integration by parts. In physics… energy is sort of this mysterious entity which you can’t exactly see but you can explain all sorts of things in the world by talking about it. But the way people talk about it, it’s like you need to have some “physical” reason to think that energy is conserved or not. One obtains in this way a very strange and I think weak view of mathematics which seems ultimately debilitating. Maybe Physics at Princeton is not quite like that? If math is going to let other subjects teach our subject (which is to an extent necessary wherever it is applied)… well… I feel like other subjects would have to first get better at math.

“I feel like other subjects would have to first get better at math.” This comment lies in the heart of my thinking. The fact that many of these other subjects are not so demanding of their students and their researchers of mathematics makes it seem wasteful that their practitioners are put through a core curriculum of mathematics that becomes ultimately unnecessary for them. For those subjects where mathematics

iscrucial, we are already seeing teaching of mathematics in their classrooms. Maybe not so much physics, but look at the discrete mathematics and proof theory taught by CS departments, numerical PDE and calculus of variations taught by Engineering departments, probability and stochastic taught by Operations Research, and so on.Yes, in a different world maybe the maths department can afford to teach the mathematics used by all other departments on campus. But for the true benefit of the students, each of the courses would have to be separately designed! The mathematics needed by a biostatician is much different from that needed by an econometrist, or an electrical engineer, or a theoretical physicist. With limited man power it is impossible to run courses that are specifically appropriate for each and every one of them just in the mathematics department. Furthermore, mathematicians tend to

notof the professional insight of what is and what is not useful in other fields. So barring intense teaching collaboration between departments, the design of such courses is also an issue.What is the current “solution”? Departments would mandate that their students learn “calculus” and “linear algebra” and “complex analysis”. But with the instructors (mathematicians) and pupils (aspiring professionals in other subjects) both ignorant of the actual applications of those tools to those other fields, I fear that both teacher and student end up finding the process lacking in meaning.

I have quite a lot of crazy ideas about this thing. For example, since mathematics is just sort of a tool for the other disciplines, why not have mathematicians be some sort of travelling vagabonds that clinically instructs what is necessary for other departments? In teaching to physicists and mathematicians I found that it helps a lot to be able to show them where the mathematics is leading up to, so the students have a grand picture and a perspective of why we are doing this work. Of course I cannot do so for other topics. But if the stage can be set by experts in other fields: say the quantum chemist telling her students about the broad idea of quantum mechanics before I teach them about Hilbert spaces, or say the mechanical engineer teaching his students about measurement and approximation errors of numerical methods before I start going on about wellposedness of PDEs, I think the students would be much more likely to actually learn, willingly, the mathematics.

V. I. Arnold expressed some strong opinions on this perrenial topic in http://pauli.uni-muenster.de/~munsteg/arnold.html topic. A related question on MO: http://mathoverflow.net/questions/10255/effective-teaching/97068#97068.