# Do two injective functions prove bijection?

I'm trying to prove $|A| = |B|$, and I have two injective functions $f:A \to B$ and $g:B \to A$. Is this enough proof for a bijection, which would prove $|A| = |B|$? It seems logical that it is, but I can't find a definitive answer on this.

All I found is this yahoo answer:

One useful tool for proving that two sets admit a bijection between them is a theorem which says that if there is an injective function $f: A \to B$ and an injective function $g: B \to A$ then there is a bijective function $h: A \to B$. The theorem doesn't really tell you how to find $h$, but it does prove that $h$ exists. The theorem has a name, but I forget what it is.

But he doesn't name the theorem name and the yahoo answers are often unreliable so I don't dare to base my proof on just this quote.

-
It's called en.wikipedia.org/wiki/… an wikipedia lists some proofs ... AB, – martini Mar 20 '12 at 13:43
@Roy T.: Most proofs of Cantor-Bernsein construct a bijection $h$ explicitly from $f$ and $g$. – André Nicolas Mar 20 '12 at 13:56
Thanks Martini and André, this is exactly what I was looking for. – Roy T. Mar 20 '12 at 14:00