Mathematics · Ch 1 — Sets, Relations and Functions
Functions
1.6
Functions
Motivating example. Suppose is the set of students who wrote a test and is the set of possible marks; relate a student to a mark if scored . Two facts hold: (1) every student got some mark -- every has some with ; and (2) no student got two different marks -- if then . Relations with exactly these two properties are functions.
Definition. A relation is a function from to if:
- for every , there is some with (every domain element has an image), and
- if and then (that image is unique). is the domain, the co-domain. If , write : is the image of , is a pre-image of (the article changes: an element has exactly one image but can have several pre-images), and is "the value of at ". The range is . If , is a real-valued function. Two functions are equal if they share the same domain and for every in it. We write (" is from to ", or " maps into "). There is no requirement that every co-domain element have a pre-image (that property is studied separately, as "onto"), and there is no restriction on how many pre-images a co-domain element may have (that is what makes "one-to-one" a separate, extra property) -- both of these follow from asymmetry already built into the definition: only the domain side is required to be fully and uniquely covered. Every function is a relation, but not every relation is a function. is a function from to ; it is not a function from to (element has no image), and not a function into either (the image of is not in that co-domain) -- so both domain and co-domain must always be stated explicitly. …