Concept

What is a relation between two sets?

Stephen Davies, Ph.D. Version 2.2.2 Through Discrete Mathematics A Cool Brisk Walk / Chapter 1

"A relation between a set X and Y is a subset of the Cartesian product X × Y. Recall that X × Y yields a set of ordered pairs, one for each combination of an element from X and an element from Y. If X has 5 elements and Y has 4, then X × Y is a set of 20 ordered pairs. To make it concrete, if X is the set {Harry, Ron, Hermione}, and Y is the set {Dr. Pepper, Mt. Dew}, then X × Y is {(Harry, Dr. Pepper), (Harry, Mt. Dew), (Ron, Dr. Pepper), (Ron, Mt. Dew), (Hermione, Dr. Pepper), (Hermione, Mt. Dew)}. Convince yourself that every possible combination is in there. I listed them out methodically to make sure I didn’t miss any—all the Harry’s first, with each drink in order, then all the Ron’s, etc.—but of course there’s no order to the members of a set, so I could have listed them in any order."

Related Ideas

What is a relation between two sets? | Stephen Davies, Ph.D. Version 2.2.2 Through Discrete Mathematics A Cool Brisk Walk | Bifalgorithm | Bifalgorithm