Steinhart notes that "A relation from a set S to a set T is a subset of the Cartesian product of S and T." But what is a Cartesian product? A Cartesian product is simply all the possible ordered pairs possible between two sets. Suppose for example that we have a set of all males and a set of all females. The Cartesian product would be all the possible relations that could obtain. A relation would be a subset of this product. That is, it would be a specific combination of them. Instead of it being the Cartesian product, which is all the possible combinations that could be made, a relation is a specific actual set of combinations that obtain.
Let's learn some more basic terminology about relations. Suppose we have two sets, S and T. The "domain" would be the variable from S, which for our purposes is "x." The domain sometimes refers to all of the elements of set S, though like Steinhart, we won't be using it in such a way. As Steinhart notes, "the term domain is sometimes used to mean the set of all x in S such that there is some (x, y) in R"(Steinhart, p. 25). The codomain of the relation is T.
Let's look briefly at the concept of the range. "The range of R is the set of all y in T such that there is some (x, y) in R"(Steinhart, p. 25). Thus, implicit in the notion of a range is a relation of y to x. It is in this sense distinct from the codomain, which is merely y considered in itself rather than in terms of its relation to x.
Steinhart, Eric. "More Precisely: The Mathematics You Need To Do Philosophy." Broadview Press, 2009.