One of the quiet triumphs of set theory is that everything else can be built from sets —
including relations and functions, which at first look like different kinds of object entirely. The
starting brick is the ordered pair (a, b), where order
matters: (a, b) \neq (b, a). Collect every possible pair with first entry
from A and second from B and you get the
Cartesian product
A \times B = \{\, (a, b) : a \in A,\ b \in B \,\}.
A relation from A to B is then
simply a subset of
A \times B — a chosen collection of pairs saying which
a relates to which b.
Why bijections are the whole game
A bijection pairs up the two sets with nothing left over on either side — so it is the exact
meaning of "these two sets have the same size." For finite sets that just recovers
counting. But the idea keeps working for infinite sets, where counting fails, and it becomes
the tool for comparing infinities: two sets have the same
cardinality precisely when a
bijection between them exists. That single definition is what lets us say ℤ is "the same size" as ℕ,
yet ℝ is genuinely bigger.
When you draw y = x^2, the curve you sketch is the function — it
is the set of pairs \{(x, x^2)\}. Set theory takes this literally: the
function and its graph are the same object. The "each input one output" rule is exactly the
vertical line test in disguise: a vertical line (fixing the input) may cross the
graph at most once. Relations that fail it — like a circle — are perfectly good relations, just
not functions.
-
Not every relation is a function. A function forbids one input having two
outputs; a general relation allows it. And "one output each" says nothing about outputs being
used up — that's surjectivity, a separate property.
-
Injective and surjective are independent. A map can be one without the other; a
bijection needs both. Only a bijection has a well-defined inverse.