# Why do students have problems with showing that something is well-defined? How can this be improved?

I see a lot of students struggling when they have to show that something is well-defined. I have the feeling that this is often not understood.

Two examples:

• When defining a sequence $x_n= g(x_{n-1})$ (for some function $g$) and asking to show that $\lbrace x_n\rbrace$ is well-defined (since there is a root or a fraction somewhere in the definition), students often show that the sequence converges to something (under the assumption that it is well-defined) and do not see that they have to ensure that there is something bad.
• When you want to define a function, say $g:A\to B$ (for some sets $A$ and $B$) with $g(x):=\ldots$, they forget to show that $g(x)$ holds the properties to be an element of $B$.

I have the feeling that some are not even aware of what well-defined means.

Two questions:

• Why do students have this problem?
• How can one (or the one who introduces functions) do to gain a better understanding of the concept of well-defined functions/sequences/...?
• Gowers has written around this subject (at least) twice see dpmms.cam.ac.uk/~wtg10/welldefined.html and gowers.wordpress.com/2009/06/08/… – quid Mar 24 '14 at 17:45
• "Why do students have this problem?" Have we really explained them before? Or have we in a first stage (in pre-calculus, calculus and other technical courses) swept that under the rug, and at the next stage (real analysis, proof or more mathy courses) assumed they new all about it? – Benoît Kloeckner Dec 14 '16 at 13:13
• Many people have pointed out that students need to encounter cases where something is not well defined. A related issue is deciding whether a certain definition is useful. For example, every semester I have my students do a group discussion question that asks, is it a good idea to define positive and negative vectors -- yes or no, and why? Often they decide that all vectors are positive, or that vectors should be defined as positive if their x component is positive. Very few volunteer that such definitions are not useful, not natural, or don't have good properties. – Ben Crowell Dec 25 '16 at 21:01

Maybe, your students have a belief problem. They will rarely (maybe never) have encountered problems where something was not well-defined. If you have never been in trouble since everything you were shown was well-defined, then you don't even understand the problem! (Even harder: after proving that something is well-defined, the world looks right like it was before, since they don't see the gain. Thus, they might try to do something that has more use for them.) You might try to give them explicitly not well-defined functions. Say, the sum of a fraction $\frac{a}{b}$ is $a+b$. Then let them check whether different representations of a rational number give the same value. Let them find a representation equal to 1/1 which has the sum 100. You could then discuss what typically can go wrong (problems with different representations, formulae that aren't defined for all values, values that do not lie within the range, ...?).

• I think this is exactly right. "Well-defined" only becomes a meaningful concept if you have experience with cases in which something is not well-defined. Here is a simple case in which something seems entirely reasonable: Let $m, n$ be two integers and $[m], [n]$ their equivalence classes mod $p$. Define $[m] ^{[n]} = [m^n]$. Seems reasonable, especially because of the way we define the other arithmetic operations mod $p$. But as soon as you try to calculate particular examples you realize the definition is broken; different representatives of $[n]$ yield different results. – mweiss Apr 8 '14 at 21:04

I've never tried this in a classroom, but I suspect a lot of the trouble with functions is that students haven't been taught the vocabulary to deal with things that are weaker than functions. For example, they are trying to define a function $f: A \to B$. What they have written down probably defines SOMETHING: Perhaps a subset $R$ of $A \times B'$ for some $B' \supset B$. What do they then need to check: That for each $a$ in $A$, there is precisely one $b \in B$ so that $(a,b) \in R$. But if they can't use set theoretic language well enough to figure out what they have constructed, it will be hard for them to see what more they need to do.

• I've noticed the phenomenon mentioned in the question is widespread even in an "intro to proofs" course where we explicitly had just spent time showing that a function is a special kind of relation (i.e. a special subset of $A\times B$) and that it has to have all the right properties. I think this runs deeper than just familiarity with set-theoretic language. – Brendan W. Sullivan Mar 24 '14 at 15:35

I think that you hit the nail on the head, when you said some are not even aware of what well-defined means. As Anschewski suggests the problem may be that students have not encountered enough non-well-defined operations to fully appreciate the problem.

This Spring I was teaching freshman algebra, and while explaining equivalence relations (prior to getting started with congruences) I tried the following example. I had explained that being a namesake gives an equivalence relation among human beings. But if you try and define a function called weight from the set of equivalence classes Humans/Namesakes, you run into the difficulty of namesakes often having different weights.

Unfortunately the student response was a bit mixed. Some of them commented in their teacher evaluation forms that the example with namesakes was great, but I failed to follow up on it and give something similar when explaining all the other concepts they encountered. Well, if I think of something, I will use it next time.

In my opinion this problem arises due to the fact that students are never told that, when introducing a new symbol which isn’t a variable (here I’m not using variable in the formal system sense of the word) and which does not depend on previously defined symbols, then one must prove that there exists exactly one object with the given property.

As an example take the square root of a non-negative real number. Showing it is well defined requires one to first prove $\forall x\in \left[0, +\infty\right[ \; \exists !y\in \left[0, +\infty\right[ \;\left(y^2=x\right)$, otherwise why whould $\sqrt x$ have any meaning at all?

An additional problem happens with equivalence relations. In this context, let us consider $\equiv _p$ over the integers. Given $m,n\in \mathbb Z$, the function $+_{\equiv _p}$ maps $\left([m]_{\equiv p}, [n]_{\equiv p}\right)$ to $[m+n]_{\equiv p}$. Even after proving the analogous property to the example above, this has another problem, namely that the function isn't defined with respect to variables, but rather with respect to the representation of variables. Ideally one would write $f\colon A\to B, a\mapsto f(a)$, but in this context we’re actually writing $f\colon A\to B, g(a)\mapsto f(a)$. Why it can be done is a trivial matter, but it should be observed.

I have the feeling that some are not even aware of what well-defined means.

I agree with Jyrki on this, but I don't think it is just ‘some’. Knowing what well-defined means is being aware of all of the above. I graduated only recently and I’d bet an organ that less than 6% of my former fellow undergraduate students are aware of all the subtleties.

On the question why?, I think the answer is clear enough: mathematicians often speak and write as if all of their formulas are well-defined, and students emulate them. Usually we write the additive rule of derivatives as: $$f'+g'=(f+g)'$$ when the rigorous version would be: $$f'\negthinspace\negthinspace\downarrow \thinspace \& \thinspace \ g'\negthinspace\negthinspace\downarrow \ \rightarrow \ \ f'+g' = (f+g)'.$$ Solomon Feferman has shown how to rigorize the introduction of partial functions in this way. If the notation for "is well-defined" looks unfamiliar, that may prove my point.

• I disagree that what you claim happens with the example you're given. I've never seen it not written like this "If $f$ and $g$ are differentiable, then $\ldots$" and this is OK. – Git Gud Mar 25 '14 at 11:10

Part of the problem is that we often talk and write as if something is well-defined and then check well-definedness afterward. For example, we might write $f(x)=\dots$ and afterward check that "$\dots$" really does define a function. Unfortunately, in the (usually very brief) time between writing $f(x)$ and checking that it's well-defined, we have probably confused some students. We've used a notation $f(x)$ that (usually) presupposes that $f$ is a function, without yet having verified the presupposition. Strictly speaking, we should perhaps have used a notation for relations (see David Speyer's answer), like $R(x,\dots)$ or $(x,\dots)\in R$, then verified uniqueness, and only afterward used function notation. But that's not what we usually do.

For people who already understand the issue, it's no problem that we use function notation before checking its legitimacy, but for students who are just learning (or trying to learn) these things, it can cause confusion.

• I think we can mitigate that by proper phrasing, e.g. "let us check that the expression $f(x)=\dots$ defines a function from... to ...". – Benoît Kloeckner Dec 14 '16 at 13:18

Every instance that I can think of of needing to check that a function is “well defined” actually fits into this general framework:

Let $\pi: A \to B$ be a surjection. We are attempting to define a function $f: B \to C$. What we have is a function $g: A \to C$. Checking that $f$ is “well defined” means that we need to check that if $\pi(a_1) = \pi(a_2)$ then $g(a_1) = g(a_2)$. In this case, $g$ must factor through $\pi$.

I advocate this viewpoint in this question on MathOverflow:

https://mathoverflow.net/questions/41955/does-any-textbook-take-this-approach-to-the-isomorphism-theorems

Take the example of "defining" $f(\frac{a}{b}) = a+b$ mentioned by Anschewski.

What we are actually doing here is defining a function $g:\mathbb{Z} \times \mathbb{Z}\backslash\{0\} \to \mathbb{Z}$ by $g(a,b) = a+b$.

Then the question we are asking is "does $g$ factor through $\pi:\mathbb{Z} \times \mathbb{Z}\backslash\{0\} \to \mathbb{Q}$ defined by $\pi(a,b) = \frac{a}{b}$?".

To see if this is the case, we need to check whether $g$ "respects" $\pi$: are there $(a_1,b_1)$ and $(a_2,b_2)$ with $\pi((a_1,b_1)) = \pi((a_2,b_2))$ but with $g(a_1,b_1) \neq g(a_2,b_2)$?

The answer to this question is clearly yes: $\pi(1,3) = \pi(2,6) = \frac{1}{3}$, but $g(1,3) = 4$ and $g(2,6) = 8$. So $g$ does not factor through $\pi$, and hence there is no map "$f$" (or you could say "$f$ is not well defined").

• Occasionally, $g$ is defined on some $A' \subseteq A$, so we must additionally prove that $A' \hookrightarrow A \to B$ is a surjection. – user797 Dec 13 '16 at 20:56
• @Hurkyl I think you mean to say that we need that $\pi$ restricted to $A'$ is still a surjection. I agree with this in principle, but cannot think of a concrete instance where we need to do this. Do you have one in mind? – Steven Gubkin Dec 13 '16 at 23:42

Here is an interesting but simple example of something that is not well defined: Let $f$ be a binary function (resembling exponentiation or repeated multiplication) on the set of natural numbers $N$ (including $0$) such that:

1. $f(a,2)=a\times a$
2. $f(a,b+1)=f(a,b)\times a$

Question: Is this definition sufficient to uniquely determine the value of $f$ for every ordered pair of natural natural numbers, i.e. is $f$ well defined on $N\times N$?

Answer: Almost. You can determine a unique value for every ordered pair but $(0,0)$ for which any value will work. Proof left as an exercise to the reader.

Lest you think the function $f$ was indeterminate at $(0,0)$ simply because we started at $2$, consider the binary function $g$ (resembling multiplication or repeated addition) on $N$ such that:

1. $g(a,2)=a+a$
2. $g(a,b+1)=g(a,b)+a$

It also starts at $2$, but it is well defined on all of $N\times N$. Proof left as an exercise to the reader.

I agree that it is difficult to communicate the issue of well-definedness.

First, obviously, in real life there is nothing like this. We rarely accidentally make a reference to a thing that is non-existent (well, ok, let's ignore politics for a moment).

But, really, people have absolutely no experience with this potential issue. And, in fact, I would claim that (by this year) a mathematical discussion that includes a requirement of proving something is "well-defined" has prior epistemological and ontological problems.

Yes, this is a bit of a "peeve". I claim that the issue should be about existence of a (often "universal" in some way...) object... as opposed to writing formulas that may or may not make sense. Yes, I understand that a certain philosophical viewpoint retreats (!?) to only claiming that well-formed formulas are all we should contemplate.

Yes, I'd claim that students should rarely be asked to "prove that X is well-defined". They have no idea, and discovering that fact proves nothing. The more genuine question, in my opinion, is whether the alleged X is sensible or not. Or is it random and pranky? For math people, I think we really should recover from the random-pranky lifestyle... supposedly (but dubiously) teaching students about logical precision.

Quite seriously, what I try to communicate to students is that mere formulaic stuff is not what we want. Writing strings of symbols guarantees nothing. There should be a meaning behind the narrative. In that context, what the heck could "well-definedness" possibly be? Seriously! It is a bit amusing that mathematics has arrived in a situation where "well-definedness" should be a real issue.

By this year, I try to insist that the math grad students respond in a different way to such questions... In particular, that the notion of "well-definedness" is generally deficient, if lacking a larger context. Yes, I do claim that the notion itself is intrinsically problemmatical. Not that it won't arise in certain formalized situations, but that it doesn't capture anything truly useful.