Mathematics · Ch 1 — Sets, Relations and Functions
Types of Functions
Types of Functions
One-to-one and onto. For :
- is one-to-one (injective) if distinct domain elements always have distinct images: -- equivalently (and usually easier to use in a proof), .
- is onto (surjective) if every element of has at least one pre-image: for each there is some with -- equivalently, the range of equals the whole co-domain .
- is a bijection if it is both one-to-one and onto. A function that fails to be onto is called an into function (its range is a proper subset of the co-domain).
Every identity function is a bijection; a constant function is onto only if the co-domain is a single element.
Finite-set cardinality rules. For finite with :
(i) no one-to-one function exists if ; (ii) a one-to-one function existing forces ; (iii) no onto function exists if ; (iv) an onto function existing forces ; (v) a bijection exists iff ; (vi) no bijection exists iff .
One sharp consequence: if (equal finite sizes), then for , one-to-one onto bijective -- an injective map between equal-sized finite sets is automatically onto, and vice versa. This makes "one-to-one but not onto" or "onto but not one-to-one" impossible whenever .
Both the domain and the co-domain matter for ontoness (changing either can flip the answer); only the domain and rule matter for one-to-oneness (the co-domain is irrelevant to injectivity). E.g. is one-to-one but not onto ( has no pre-image); enlarging the domain to makes the same rule onto as well, because now every has pre-image .
Horizontal Line Test. For a function given as a curve: it is one-to-one iff every horizontal line through a range value meets the curve at exactly one point; it is onto (onto its stated co-domain) iff every horizontal line through a co-domain value meets the curve at least once. So on is a bijection; on is neither injective nor surjective; on is injective but not surjective, while the same rule is a bijection. …