Cartesian product finite cardinality

If $|A \times B|$ is finite, does it follow that $A$ and $B$ are finite?

This is a question from Munkres.

I was wondering if this is a reasonable argument. Without loss of generality let us first assume that $A$ and $B$ are nonempty. First note that $A=A \times \emptyset$. Then we see that $A \times \emptyset \subseteq A \times B$. Since $|A \times B|=M$ and since $A \times \emptyset$ is a subset of $A \times B$, then $|A \times \emptyset|\leq M$.

This is one of those problems which I believe to be true, but I'm not sure how to prove it rigorously.

-
Why do you claim that $A = A \times \emptyset$ (for nonempty $A$)? – arjafi Jan 24 '13 at 10:02
Just an observation. I noticed that $A \times \emptyset$ would just be $(a_1, \emptyset),...,(a_n,\emptyset)$. That's basically $a_1,...,a_n$. – emka Jan 24 '13 at 10:04
nope, $\emptyset \notin \emptyset$ so your computation is wrong. There is nothing in $\emptyset$ so also nothing in $A\times \emptyset$ since nothing can be the second coordinate of the product. – Ittay Weiss Jan 24 '13 at 10:05
Note that $A \times B$ consists of all ordered pairs $( a , b )$ where $a \in A$ and $b \in B$. If $B = \emptyset$ how can there be anything in $A \times B = A \times \emptyset$? – arjafi Jan 24 '13 at 10:06

The claim is false since $X\times \emptyset = \emptyset$ for all sets $X$. Thus, for instance, $A=\mathbb R$ and $B=\emptyset$ give a counter example.
It is true however, that if both $A$ and $B$ are non-empty and $A\times B$ is finite then both $A$ and $B$ are finite. Since, if without loss of generality, $A$ is infinite then take some $b\in B$ and then the set $A\times B$ contains the set $A\times \{b\}$ which has the same infinite cardinality as $A$. Thus the cardinality of $A\times B$ is not smaller than that of $A$.
I'm not sure I understand how this shows that $A$ and $B$ are finite if $A\times B$ is fininte. – emka Jan 24 '13 at 10:12