Let and be sets. Show that such that is bijective function.
Exercise 1.2 · Question 8 of 12
Let A and B be sets. Show that f : A × B B × A such that f(a, b) = (b, a) is bijective function.
The rule takes an ordered pair and swaps its two entries. A typical element of the domain is with and , and its image has first entry in and second entry in , so it really does lie in . The function is therefore well defined.
is one-one.
Let and be elements of with
that is, . Two ordered pairs are equal exactly when their corresponding entries are equal, so
Hence , and is one-one.
is onto.
Let be any element of the co-domain , so and . Then is an element of , and
So every element of has a pre-image in , and is onto.
Conclusion. is one-one and onto, hence is a bijective function.

The dashed arrow in the picture is the swap performed a second time: the map undoes , which is another way of seeing that is a bijection.
