How to find a explicit bijection for some $f:A\times B \rightarrow B \times A$

The question I have states:

“Describe a bijection $f:A\times B\rightarrow B\times A$”

The simplicity and lack of a domain or codomain that I can look at has caused this question to throw me off.

Is describing $f(a,b)=(b,a)$ where $a\in A, b\in B$ enough to do this? To what extent do I have to prove that this is a bijection?

I can say that $(x,y)=(x’,y’)$ if and only if $(x=x’)\ \cap \ (y=y’)$ and prove injectivity and surjectivity and so on, but I am a bit confused..

Solutions Collecting From Web of "How to find a explicit bijection for some $f:A\times B \rightarrow B \times A$"

Yes, you’re right on with defining $f$.

To check that $f$ is onto, pick an arbitrary element of the codomain (say, $(b,a)$ where $b\in B$ and $a\in A$) and show that there exists an element of $A\times B$ so that $f$ maps that element to $(b,a)$.

To check that $f$ is 1-1, pick two distinct elements in the domain, and show that $f$ evaluated at one is different from $f$ evaluated at the other.

Whether or not $f(a,b) = (b,a)$ is enough to complete this exercise depends on whether or not it’s obvious that you know why it’s a bijection and can fill in the rest of the details if asked.

Incidentally, it is often simpler to prove a function is invertible than to prove it is bijective. Defining $g(b,a) = (a,b)$ and showing that $g$ and $f$ are inverses shows that they are both bijective.

$f(a,b) = (b,a)$ is enough.

Maybe you want to prove that it’s a bijection though. This is easy because $f(a,b)=f(c,d) \Rightarrow (b,a) = (d, c)$, so clearly $b=d$ and $a=c$. It follows that $f(a,b) = f(c,d) \Rightarrow (a,b)=(c,d)$, so it’s injective.

Let $(b,a) \in B\times A$. Then choose $(a, b) \in A\times B$. Now $f(a,b) = (b, a)$, so f is surjective and you are done!