Skip to content

Mathematics · Ch 1 — Sets, Relations and Functions

Types of Functions

1.6.3

Types of Functions

One-to-one and onto. For f:A→Bf:A\to B:

  • ff is one-to-one (injective) if distinct domain elements always have distinct images: x≠y⇒f(x)≠f(y)x\ne y\Rightarrow f(x)\ne f(y) -- equivalently (and usually easier to use in a proof), f(x)=f(y)⇒x=yf(x)=f(y)\Rightarrow x=y.
  • ff is onto (surjective) if every element of BB has at least one pre-image: for each b∈Bb\in B there is some a∈Aa\in A with f(a)=bf(a)=b -- equivalently, the range of ff equals the whole co-domain BB.
  • ff 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 A,BA,B finite with n(A)=m, n(B)=nn(A)=m,\ n(B)=n:

(i) no one-to-one function A→BA\to B exists if m>nm>n; (ii) a one-to-one function existing forces m≤nm\le n; (iii) no onto function exists if m<nm<n; (iv) an onto function existing forces m≥nm\ge n; (v) a bijection exists iff m=nm=n; (vi) no bijection exists iff m≠nm\ne n.

Note

One sharp consequence: if m=nm=n (equal finite sizes), then for f:A→Bf:A\to B, one-to-one   ⟺  \iff onto   ⟺  \iff 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 n(A)=n(B)n(A)=n(B).

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. f:N→N, f(n)=n+2f:N\to N,\ f(n)=n+2 is one-to-one but not onto (11 has no pre-image); enlarging the domain to N∪{−1,0}N\cup\{-1,0\} makes the same rule onto as well, because now every m∈Nm\in N has pre-image m−2m-2.

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 f(x)=2xf(x)=2x on R→RR\to R is a bijection; f(x)=x2f(x)=x^2 on R→RR\to R is neither injective nor surjective; f(x)=xf(x)=\sqrt x on [0,∞)→R[0,\infty)\to R is injective but not surjective, while the same rule [0,∞)→[0,∞)[0,\infty)\to[0,\infty) is a bijection. …