well defined functions

Motivated by the interesting article you can find here, I explain how a function is usually defined based on relations. I think, dividing the “functional property” of a function into two properties (left-total, right-unique), makes it easy to explain to an undergraduate what we mean when we say a function is well defined.

A function f is a relation {f = (A,B,R)} (a relation is a tripel f = (A,B,R), consisting of sets A, B and R, with {R \subset A \times B}) satisfying the following two properties:
(i) {\forall a \in A \, \exists \, b \in B: (a,b) \in R}
(ii) {\forall a \in A \, \forall \, b_1, b_2 \in B \text{ with } (a,b_1) \in R \wedge (a,b_2) \in R \Rightarrow b_1 = b_2}

For (i) we say: R is a left-total relation. (Every element of A is related at least with one element of B.)
For (ii) we say: R is right-unique relation. (Every element of A is related at most with one element of B.)

Alltogether we get: {\forall a \in A \; \exists! \, b \in B: (a,b) \in R}

Because of the right-uniqueness we can use the following notation: {b = f(a)} instead of {(a,b) \in R} \text{ or } {aRb}.

To get basic intuition for working with relations and functions it can be helpful to draw some pictures that look like the two below: On the left we draw our domain A and on the right our codomain B. The dots represent the elements of the sets. Whenever b = f(a) for {a \in A, b \in B} we connect the two dots representing a and b with an arrow.
Property (i) forbids the situation on the left (because there are some elements in the set A where no arrow is coming from and going to some element in B) while property (ii) forbids a situation like the one on the right (because there is an element of A which is “mapped” to more than one element of B).

By the way, a function f is injective(one-to-one) iff the inverse relation {f^{-1}} (which in general is no function) is right-unique because injective is equivalent to left-unique. Analogous, a function f is surjective(onto) iff the inverse relation {f^{-1}} is left-total because surjective is equivalent to right-total. A good way to get an understanding what one-to-one and onto mean, is to work out by yourself how the “forbidden pictures” look like (e.g. if some function is not onto or not one-to-one).

Now, what does it mean if we ask if a function f is well defined? First of all it could be better(but longer) to ask instead: “Is this relation f a well defined function, does it satisfy property (i) and (ii)” ? (we assume that the presented declaration is at least a relation)
For example, in an elementary topology or analysis course we show that the sets we call “open ball” are open in a metric space. Of course it is fine to call these sets “open balls”, but for pedagogical reasons, i recommend to introduce these sets first without giving them any name, proofing that they are open and to label them “open balls” at the end.
It is the same with “well defined functions”. Imagine an undergraduate who is confronted with some definition that is not stated unambiguously in some sense but should define a function. If someone asks him if the construction is a well defined function, the student will probably get confused.
But i am sure it will be straight forward for him to check if conditions (i) and (ii) are satisfied.

The following easy counterexample shows what a gunction (a term I stole from the article above, heh) – a not well defined function – can look like. I will use the notation that usually is used to define functions to show how easy it is to overlook bad definitions.

{f: \mathbb{R} \rightarrow \mathbb{R}, f(x) = \sqrt{x}}.
This declaration does not represent a (well defined) function. It satisfies none of the properties (i) and (ii). It is not left-total because there is no quareroot for negative x and it is not right-unique because there are two squareroots for positive x. If we restrict the domain to the positive reals f it becomes left-total but still is not right-total. Also if we only restrict the codomain to the positive reals we still dont get a function. We have to restrict both the domain and codomain to the positive reals. First then the function becomes well-defined.

A last note: most times we have to check condition (ii), for example when working with equivalence classes.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: