Function as a set of ordered pairs:
Let A and B be two non-empty sets. A relation from A to B, i.e., a subset of A×B, is called a function (or a mapping) from A to B.
1. if for each a ∈ A there exists b ∈ B such that (a, b) ∈ f
2. if (a, b) ∈ f and (a, c) ∈ f ⇒ b = c