# Question on bijective functions between two sets

I've been reading on set theory recently and I have a couple of curiosities I'd like to ask

I know that for two sets $A, B$ a bijective function $f:A \rightarrow B$ can only exist if and only if $|A|=|B|$

My question is the following:

Given two sets $A,B$ such that$|A|=|B|$, and $n,m$ two random positive integers. Will a bijective function between $A^n$ and $B^m$ always exist? It seems to be the case, at least, for two sets that have infinite cardinalities

**Edit:**Thinking about it a little bit more, maybe this happens only in infinite sets? It would look like the cardinality of $\mathbb {N}^n$is still $\aleph_0$ for all $n \in \mathbb {N}$. So in the case of infinite cardinalities, $A^n$ and $B^m$ will have the same cardinality if $|A|=|B|$ and both have infinite cardinalities. Is this right?

• N and R is a counter example. – William Elliot Oct 24 '17 at 11:05
• N and R don't have the same cardinality – Francisco José Letterio Oct 24 '17 at 11:05
• Sorry if the question is unclear, I mean A^n and B^m when A and B have the same cardinality – Francisco José Letterio Oct 24 '17 at 11:06
• The Axiom of Choice implies that if $A$ is infinite then $|A^n|=|A|$ for any positive integer $n.$ – DanielWainfleet Oct 24 '17 at 11:32
• Thanks, I was thinking along the same lines. How do I close the question? – Francisco José Letterio Oct 24 '17 at 11:33

$A^n$ and $B^m$ will not necessarily have the same cardinality. Think of finite sets. E.g., $A = B = \{0,1\}$. Then $|A| = |B| = 2$, but if we take $n = 2, m = 1$, then clearly $|A^n| = 4$ while $|B^m| = 2$.