My brother has not taken a math class in $10-15$ years. He is studying for the GRE so I have been teaching him a chapter or two from my precalculus book. So far, he has learned (and excelled at) basic algebra skills such as factoring quadratics, solving equations and inequalities in one variable, graphing lines, etc. But now the section on functions is coming up.

I am having a hard time finding a good balance between between a rigorous and an informal definition of a function. If I make it too rigorous (a function is a subset of $A \times B$ with blah blah blah propreties), the topic will seem useless and very separated from the mathematics he has done so far. If I make it too informal (a function is just a rule that assigns members from $A$ to members of $B$, with certain restrictions), there will be a lot of confusion ("So is the function the actual arrows from $A$ to $B$?" "Is the equation $f(x) = 2x$ the function?" Or is $f$ the function?" "Is $f(x)$ the function?" "Is $2x$ a function?")

My current plan is to get the best of both worlds, but I would like to know if there is a better way to teach it, and I would also like to know what I should teach after going over the definition.

Current Plan:

A function from $A$ to $B$ is a triplet $A, B, f$ where $A, B$ are sets and $f$ is some sort of rule that assigns a unique value $b \in B$ to each $a \in A$. The rule coult be a bunch of arrows, an equation, among other things.

Using this method I think I will still get some of the confused questions mentioned above, but I think using this definition I can defend the position that the function is the triplet $A, B, f$ and the book is being lazy if they say something like "Find the zeroes of the function $f(x) = 2x$". I would still like some advide about answering the "confused questions" though if you have it.

I still think that my brother will find questions such as "Find the zeroes of $f(x) = 2x$" as useless and fluffed up ways of saying "Solve $2x = 0$. How can I alleviate his concerns?

  • 9
    $\begingroup$ I will say that the concerns of the "too informal" strategy I've never seen actually come up in numerous years of introducing it this way in college remedial courses. I think it would take a very advanced student to think about pursuing those questions. As far as informal motivation goes, I usually say "these kinds of relations are particularly efficient to program, set up in a database, or do calculus with". $\endgroup$ Commented Apr 14, 2017 at 1:01
  • 2
    $\begingroup$ @DanielR.Collins My brother got very lost in K-12 math, so now he doesn't move on from a concept until he has thought about it hard and understands it. Also, I can imagine students not asking these questions in a classroom setting, but I think it's a little different in a private session with a brother (no fear of asking a "stupid question" for example). I think these things would conspire to give rise to the "confused questions" I mentioned. $\endgroup$
    – Ovi
    Commented Apr 14, 2017 at 1:13
  • 8
    $\begingroup$ I'm casting another vote for "really, don't get that formal." Rarely does the codomain of a function show up in any substantial way, at this level. For example, most remedial algebra/precalculus texts say that "a function is invertible if and only if it's one-to-one." Of course this is not quite true (such a function is only guaranteed a left inverse), but I don't see it causing any harm. I think it's far more harmful to take an overly medicinal approach when there's no real danger of getting sick any time soon (to paraphrase Rota). $\endgroup$
    – pjs36
    Commented Apr 14, 2017 at 22:18
  • 5
    $\begingroup$ I suspect "is a triplet ..." would be more mysterious than simple informal notions of what a function is, especially for the GRE general math test. Why not just look over that sample questions in a book from one of the test prep companies or from ETS itself to get an idea of how far down the rabbit hole you need to go (which is probably not very far in my opinion). Incidentally, precalculus math is a bit higher level than one needs for the GRE, which you will quickly realize when you look at some sample questions as I suggested. $\endgroup$ Commented Apr 17, 2017 at 14:31
  • 2
    $\begingroup$ While in modern math a function is formally a thing with a domain and a codomain, in precalculus it is pretty much always a partial function from real numbers to real numbers. So the codomain is always R, and the domain is always a subset of R, and one doesn't even think of the domain as specified ahead of time, but only the rule (it's just that the rule sometimes returns ‘undefined’ instead of a number). This is a perfectly coherent mathematical concept, even though it's not exactly the same thing as a function in the modern sense. $\endgroup$ Commented Apr 25, 2017 at 23:10

7 Answers 7


When introducing functions to a student, I usually give thought to two main methods, each with its pros and cons.

Method 1:

Use the set definition of the function. This is what you're attempting to do at the moment. The set definition of the function states that a function

is a relation between a set of inputs and a set of permissible outputs with the property that each input is related to exactly one output

Using this definition, saying something like $f(x) = x^2$ becomes just a shorthand method to express a real valued function $f : \mathbb R \to \mathbb R$ that maps the domain $x$ to the range $x^2$.

This method is very strong because it gives the formal definition of the function, and, while confusing now, prevents all sorts of latter confusion when studying set theory.

It's hard to quickly move to explaining why zeros are useful or what you'll get out of graphing a function on coordinate planes if you use this definition. It's too abstract, and the examples you can use when teaching it are little. However, it does a good job at explaining the properties of a function, and the difference between a function and a relation.

Method 2:

Defining a function the way a programmer would define one.

This method sacrifices (or just delays, really) the formal definition of the function for something that's easier to comprehend and work with.

It defines a function as something that takes in an input and produces an output. You would see a lot of people who use this definition draw something like this diagram. They'd say that $x$ is just a dummy variable representing whatever input we have in the function.

You put something in, you get something out Its output only depends on its input (it does not produce new information). For every input, you get only one output (but multiple inputs can have the same output)

You'd see them identifying the function using the words "the function $f$ as a function of $x$" or "the function $f$ of the input $x$".

This method is easy because you can throw lots of examples for it that involve physics or some observable phenomenon. For example:

  • the velocity $v$ of a moving car as a function of time t being $v(t) = v_i+at$
  • the probability $p$ of the event $A$ being $p(A) = 1/8$
  • the length of the hypotenuse $h$ of a right triangle as a function of the lengths of its sides, $h(a,b) = \sqrt{a^2+b^2}$

This definition allows you to quickly demonstrate why zeroes, graphs, and functions of more than 1 variable are important, and how they relate to our world. It is also easier to link this definition to trigonometry and differential calculus later on.

However, this method does not make the concepts of 1-to-1 functions and onto functions, and the fact that a function has to map each domain to exactly one range very clear. It also does not explain the concept of domains, co-domains and ranges as clearly as the other method.

In my opinion, the most important selling point of this method is that it allows you to quickly introduce function tranformations, like $u(x+4)$, $g(x)=ch(x)$, and $V(t) = V_0 - V_c(t)$...


well, given both methods, which do I choose? I generally choose both. I start with method 2 to be able to give the student an intuitive idea of what a function is supposed to be, then I move on to formally defining it once they have a good idea of how to do calculations that involve functions later on in their calculus course (when it's time to deal with vectors or $\mathbb R^3$ or something).

  • 7
    $\begingroup$ Delaying is not sacrificing. It is pedagogy. $\endgroup$
    – guest
    Commented Jun 5, 2018 at 16:27

A simple but rigorous definition is that a function is a graph in the plane that passes the vertical line test: a vertical line never intersects more than one point on the graph. (A graph is simply a set of points. "The plane" means the Euclidean plane.)

This avoids the problems associated with defining a function as a rule. Defining it as a rule raises the question of how to define "rule." Defining it as a rule is also inconsistent with the standard definition of a function, since there can only be countably many rules.

It also avoids all the possible student confusion associated with heavy use of set-theoretic ideas and notation.

It isn't as general as the mathematician's general definition of a function, but that's a side issue, and the generalization can easily be carried out later.

  • $\begingroup$ I don't see why there can only be countably many rules. $\endgroup$ Commented Nov 8, 2017 at 0:38
  • 1
    $\begingroup$ @AviSteiner A rule is just a permutation (with replacement) of the 26 letter alphabet, plus perhaps some math symbols (which could be translated to the English alphabet anyways). In any case you have only a finite (or at most countable) number of symbols to express your rule in. It is a theorem that the set of permutations of a finite or countable set is countable. Of course, if you allow the alphabet to be uncountable then the number of permutations will be uncountable too. $\endgroup$
    – Ovi
    Commented Jun 5, 2018 at 18:21
  • $\begingroup$ @Ovi: For a real number $a$, let the rule be: Multiply $x$ by $a$ i.e. $f(x) =ax$. I would think I have just defined uncountably many "rules". $\endgroup$ Commented Jun 11, 2018 at 8:19
  • $\begingroup$ @TorstenSchoeneberg Hmm that's a good one... I guess we have to reformulate it as "there are countable many explicit rules"? I think you can write your set using set-builder notation, but you cannot write all the rules explicitly without using an uncountable alphabet. There is something still unsatisfactory though... $\endgroup$
    – Ovi
    Commented Jun 11, 2018 at 8:43
  • $\begingroup$ @TorstenSchoeneberg: To define your rule, you need to define your real number $a$. There are only countably many real numbers that can be defined -- again, because there are only countably many possible definitions you can write down. $\endgroup$
    – user507
    Commented Feb 19, 2020 at 21:50

Try applying physics. If you throw a ball up in the air, there are functions to describe the balls position, speed, and acceleration - all as functions of time. You input the time, and the function returns the an output like the position, speed, or acceleration. If you have a graph, you input x in the function and it returns the output y.


Input-output machine is the most intuitive thing to first give, especially to a weaker student. Ideally, you eventually want to have multiple frames of reference for a function, but to start with...go with input/output machine. For God's sake, don't start with ordered pairs. That is so aphysical and theoretical. It is probably the most powerful and intuitive TO A MATH SOPHISTICATE. But it is a bad intro for a new student.

The Schaum's Outline (Frank Ayres, 1958) has a good, simple explanation for new students.

Intuitively, I still just think of functions as every x only give one y and relations as being able to give more than 1. And a picture of a parabola versus a circle in my mind.


One reason students sometimes have trouble with the notation of a function is that the examples they see are so predominately couched in "formula" terms.

One way to overcome this and show them how fruitful the function concept is involves showing them the connection between the process of conducting elections and ideas about functions. The discussion below is designed to be intuitive rather than formal but I think goes in the direction of helping students think about an "input/output" approach to functions in a way that expands their understanding of the function idea.

Suppose one has n voters each of whom produces an ordinal ballot involving m candidates (choices) where each voter ranks all of the candidates, including the possibility of ties (indifference in the voters mind between two or more candidates. (One can also think about the case where each voter produces a full ranking without indifference of all of the candidates as well.) The goal is to construct a ranking (or perhaps a single winner) for society based on the rankings of the individual voters. So the domain consists of n-tuples of preference schedules and the codomain consists of a set of preference schedules of the choices, ties allowed (or perhaps list of candidates when a single winner is involved). (Single winner is in some sense less "clean" because of the need to deal with issues of the possibility of "ties" when the voting is very "symmetrical." One would like to pick a "President" based on the voters ballots but for some sets of ballots some methods might result in ties, unless a tie breaking system is built into the election method.)

Different methods of deciding elections based the ballots correspond to different functions which take ballots of individuals and turn them into a choice for society. So systems include plurality, run-off, sequential run-off, Borda Count, and many other proposed election methods (functions). One is also interested in "fairness" conditions that different functions here might obey.

It is in this framework that the recently (2017) deceased Kenneth Arrow formulated his famous theorem that when there are at least three candidates there is no election method that obeys all of a small list of "fairness" conditions.


Defining a function as a set of pairs is a lot more accessible than it might seem.

Think of a directory in a building, which lists people's names and the room number of each person's office. (Assume everyone's name is different, but people might share an office.)

The directory spells out an assignment, $d$, of names to numbers. Name $x$ is presented next to room number $d(x)$. In this context, we're not talking about who the people are, or the physical layout of the directory, or whether it's even true. We're just talking about the raw, uninterpreted assignment of names to numbers.

The statement $f(x) = x^2$ is one way of writing an assignment of numbers to numbers. Another way would be to write an infinitely long directory. Looking up $10$ in that directory would give you the same answer that a calculator would give you if you pressed 1 0 × 1 0 = on a calculator. In fact, a graph is a sort of directory where you can approximately "look up" an entry by choosing a horizontal coordinate and looking at the associated vertical coordinate.

If a complete directory existed for $f$, you could find all its zeroes with a reverse-lookup. Alternatively, you could just solve $x^2=0$ for $x$ algebraically. But you can't do that with every function. Sometimes you can only approximate the zeroes numerically.

The point is that we're treating the assignment itself as a mathematical object, independently of how it's written down and independently of what its entries might refer to. Thinking about it as a bunch of entries is useful in many ways. It's the tool that calculus uses to study rates of change. The value of a thing changing with time is modeled mathematically as a set of entries that assign time-values to thing-values, and its rate of change at a point in time is defined by its relationship to the surrounding entries.


One thing I do when introducing functions is to draw a blob (set) on the left and a blob (set) on the right. Put some points in each with labels (at first arbitrary symbols, later numbers). Call the left the "Domain", the right the "Range" (*) and say that a function tells us where elements in the domain go to in the range. I'll illustrate this by drawing an arrow from a point on the left to a point on the right. Then continue adding arrows from domain elements to range elements.

Depending on the situation I might ask if it's okay to draw two arrows out of the same domain point (hoping for someone to say "No, then I don't know which arrow to take.") or I just tell them that only one arrow is allowed to come out of each domain element.

Then I might ask if it's okay to draw two arrows into the same range point. Somewhere along the line, they realize that that's fine.

In the end, I explain that the function is the collection of arrows.

Again, depending on the situation, I might do an example where the function in "squaring". I'll draw arrows $0 \to 0$, $1 \to 1$, $2 \to 4$, $-1 \to 1$, etc. maybe even $x \to x^2$. After doing a few arrows with the blobs, I point out that it makes more sense to have a (vertical) number line on left and another on the right since numbers have order instead of floating around in a blob.

Then I'll redraw the diagram as arrows from spots on the left number line to spots on the right number line. At some point, I ask "what about $\frac{1}{2}$ or $\pi$." Then I point out that there's a lot of arrows and the drawing is getting messy. So I take the left (vertical) number line and turn it horizontal and overlap zeroes. Instead of drawing arrows from spots on the horizontal axes to spots on the vertical axes, I say that instead we just plot a point on the plane. Stitching all those infinite points together gives the graph. Now our condition that only one arrow can come out of a domain point becomes that a vertical line can only intersect the graph in one spot, etc. etc. etc.

(*) Yes, I know that there's a difference between Range and Co-domain. But I don't introduce this nuance in the introduction of functions and stick to calling both the Range.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.