###
Sets

A set is any collection of objects. Some examples of sets could include the
following: 1) all the boys in a classroom; 2) all the restaurants in Milwaukee;
3) the boxes of golf balls on sale in a given store. The objects in a set are
called elements. The elements of the above sets are boys, restaurants, and
boxes of golf balls, respectively. For every set there is some rule that
distinguishes the elements in the set from other things. This is how sets are
defined.

In math, sets usually either consist of quantities of things, or numbers
themselves. In a given problem, two sets might be the scores of a class on one
test, and the scores of the same students on another test. Using different
mathematical techniques, these sets can be compared extensively. The other sets
commonly found in the study of math actually consist of numbers. These are sets
like whole numbers, natural numbers, integers, real numbers, etc. They also
have a rule that distinguishes their elements from other numbers.

###
Relations

Two sets can be associated according to a rule. Given two sets, *A* and *B*,
the set of all the possible ordered pairs in which the first element comes from
*A* and the second element comes from *B* is called the Cartesian product *A*×*B*. Given a rule that associates elements of *A*, *a*, with elements of
*B*, *b*, there may exist ordered pairs (*a*, *b*) that satisfy the rule. The set
of all ordered pairs (*a*, *b*) that satisfy the rule is called a relation. A
relation between two sets is a subset of the Cartesian product of those sets.
The domain of a relation is the set of all the first elements *a* of the
ordered pairs. The range of a relation is the set of all the second
elements of the ordered pairs, *b*.

Consider the sets *X* and *Y*: *X* = {1, 2, 3, 4}, and *Y* = {12, 14, 21}.
A relation between *X* and *Y* can be defined by the rule *y* = 7*x*. The ordered
pairs that satisfy this rule compose the relation (*x*, *y*). They are (2, 14)
and (3, 21). These two ordered pairs form the relation. The domain of the
relation is the set *D* = {2, 3}, and the range is the set *R* = {14, 21}.

Relations are often special associations between elements of the same set. In
this text, most of the relations we'll see associate elements of the real
numbers with other elements of the real numbers. Relations between a set and
itself are not uncommon.