A simple coordinate swap pairs every element of A × B with one in B × A, and swapping back restores the original pair. This works for finite and infinite sets alike, showing that the products have the same cardinality and that cardinal multiplication is commutative.

Multiple Choice

There exists a natural bijection between A×B and B×A given by swapping coordinates. What determines the existence of such a bijection?

Swapping coordinates gives a natural way to match A×B with B×A for any sets A and B. Every element of A×B is an ordered pair (a, b) with a in A and b in B, and swapping the coordinates yields (b, a) in B×A. This swap defines a function from A×B to B×A, and doing the swap again brings you back to the original pair, so the inverse exists and the map is a bijection. No restriction like A equals B or finiteness is needed; this works for all sets A and B. It also shows why the two Cartesian products have the same cardinality, reflecting the commutativity of cardinal multiplication.

Why the Order of a Cartesian Product Doesn’t Change Its Size

A pair of shoes has a left and a right. A pair of numbers can have a first and a second. In mathematics, that order matters: the ordered pair ((2,5)) is not the same as ((5,2)). Yet when we count all the possible pairs drawn from two sets, switching the order of the sets does not change how many pairs there are. The reason is a simple, natural correspondence: swap each pair’s coordinates.

What a Cartesian product contains

Suppose (A) and (B) are sets. Their Cartesian product, written (A \times B), is the set of all ordered pairs ((a,b)) where (a) belongs to (A) and (b) belongs to (B).

For example, let (A={1,2}) and (B={x,y,z}). Then

[

A \times B =

{(1,x),(1,y),(1,z),(2,x),(2,y),(2,z)}.

]

The first coordinate comes from (A); the second comes from (B). Reverse the order of the sets, and the roles reverse too:

[

B \times A =

{(x,1),(y,1),(z,1),(x,2),(y,2),(z,2)}.

]

These products aren’t the same set. Their elements are arranged differently, and their coordinates come from different sets. But each pair in the first product has a matching pair in the second. Match ((1,x)) with ((x,1)), for instance, and ((2,z)) with ((z,2)).

That match is more than a visual pattern. It’s a bijection.

The swap does all the work

Define a function (f) from (A \times B) to (B \times A) by

[

f(a,b)=(b,a).

]

The rule is straightforward: take any pair from (A \times B) and exchange its coordinates. Because (a\in A) and (b\in B), the swapped pair ((b,a)) belongs to (B \times A). So the function sends elements of the first product into the second.

But a function between sets is not automatically a bijection. To show that this one is, we need to know that it pairs up the elements perfectly: nothing gets left out, and nothing is matched twice.

Here’s the neat part. Apply the same swap again:

[

f(f(a,b))=f(b,a)=(a,b).

]

The second swap takes us straight back to where we began. That makes the swap its own inverse. Every pair in (A \times B) has a corresponding pair in (B \times A), and every pair in (B \times A) comes from exactly one pair in (A \times B). The correspondence works in both directions, which is exactly what a bijection requires.

No matching set sizes required

It might seem that (A) and (B) need to be equal, or at least have the same number of elements, for this to work. Neither condition matters.

Take (A={p,q}) and let (B) be the set of all positive integers. The sets have very different sizes: (A) is finite, while (B) is infinite. Still, every pair in (A \times B), such as ((p,17)), has a partner in (B \times A), namely ((17,p)). The reverse rule works just as well.

Nor does the argument depend on either set being finite. It works for any sets (A) and (B), large or small, familiar or abstract. The swap uses only the definition of an ordered pair and the membership rules for a Cartesian product. It doesn’t need a list of all the elements.

That point matters. With an infinite set, we can’t always count elements one by one and reach a final total. A bijection gives us another way to compare sizes: if two sets can be paired off perfectly, they have the same cardinality.

A quick link to multiplication

For finite sets, the number of elements in a Cartesian product follows the familiar multiplication rule:

[

|A \times B|=|A|\cdot|B|.

]

If (A) has two elements and (B) has three, their product has six ordered pairs. Swapping the factors doesn’t change the total:

[

|A|\cdot|B|=|B|\cdot|A|.

]

This mirrors the commutative property of ordinary multiplication. The sets (A \times B) and (B \times A) aren’t identical, just as writing (2\cdot3) differs from writing (3\cdot2). But the swap gives a direct reason they have the same size.

For infinite sets, cardinal multiplication follows a similar idea. The swap still creates a bijection, so the two products have equal cardinality. No finite counting is needed. The underlying structure carries the argument.

Why the distinction still matters

Equal size doesn’t mean equal sets. That distinction is easy to blur, especially when two collections contain corresponding objects.

Consider (A={1,2}) and (B={x,y}). The pair ((1,x)) belongs to (A \times B), while ((x,1)) belongs to (B \times A). Under the usual definition of ordered pairs, those are different objects: their first coordinates differ. The products may have the same number of elements, but their elements are not interchangeable without applying a rule such as the coordinate swap.

This is a useful habit in mathematics: ask not only whether two sets look alike, but what kind of relationship connects them. Equality means they contain exactly the same elements. A bijection means their elements can be matched one to one. Those are different claims, and the distinction comes up throughout set theory, algebra, and the study of functions.

The coordinate swap also hints at a broader idea. Mathematical objects often change form under a simple rule while preserving important structure. A list can be reversed; the order changes, but no entries vanish. A point can be reflected across a line; its location changes, but the reflection can be undone. Here, exchanging coordinates changes each ordered pair while preserving the size of the collection.

A small rule with a wide reach

The map

[

(a,b)\longmapsto(b,a)

]

is short enough to fit on one line, yet it captures a general principle: a bijection can show that two sets have the same cardinality even when they look different or have different kinds of elements.

For Cartesian products, the coordinate swap always works. It does not require (A=B), and it does not depend on either set being finite. The inverse is the same swap, so every pair has one clear partner and the match can be reversed.

That’s the whole story, really—and a satisfying one. The order in an ordered pair matters, but reversing that order gives us a dependable bridge between (A \times B) and (B \times A).