If $G=AB$ and $|G|=|A||B|$, then $G=A^{-1}B$. 
Let $A$ and $B$ be subsets of a finite Abelian group $G$ such that $G=AB$ and $|G|=|A||B|$. Show that $G=A^{-1}B$.

My attempt: If $A$ is a subgroup, then $A=A^{-1}$ and we're done. If $A$ is not a subgroup, then there exists $a_1,a_2\in A$ such that $a_1a_2^{-1}\notin A$.
Thus, there exists $a\in A$ and a non-trivial $b\in B$ such that $a_1a_2^{-1}=ab$.

How do I proceed from here? Any hints are appreciated.
 A: Maps between finite sets with the same cardinality are injective iff surjective. Because of $|G|=|A||B|=|A\times B|$, such a map is $\phi\colon A\times B\rightarrow G,(a,b)\mapsto ab$. It is surjective due to $G=AB=\phi(A\times B)$ and therefore injective, which means the representation of an element $g\in G$ as $g=ab$ with elements $a\in A$ and $b\in B$ is unique. Let $\psi\colon A\times B\rightarrow G,(a,b)\mapsto a^{-1}b$ and let $a_1,a_2\in A$ and $b_1,b_2\in B$ be elements with $a_1^{-1}b_1=a_2^{-1}b_2\Leftrightarrow a_2\circ b_1=a_1\circ b_2$ using the group $G$ is abelian. Because of the uniqueness of representation, we have $a_1=a_2$ and $b_1=b_2$. Therefore $\psi$ is injective, therefore $\psi$ is surjective and $G=\psi(A\times B)=A^{-1}B$.
A: The key here is the following property of maps on finite sets:

Suppose $f : X  \to Y$, where $X$ and $Y$ are finite with $|X| = |Y|$. Then $f$ is injective if and only if it is surjective.

Let us consider the group operation restricted to $A^{-1} \times B$. This is a function from $A^{-1} \times B$ to $G$. Note that
$$|A^{-1} \times B| = |A^{-1}||B| = |A||B| = |G|.$$
The middle equality comes from the fact that inversion is a bijection on $G$, so it preserves the cardinality of sets.
Suppose $A^{-1}B \neq G$. Then, this restricted group operation is not surjective, and hence is not injective. In particular, this implies that there are $a_1, a_2 \in A$ and $b_1, b_2 \in B$, such that $a_1 \neq a_2$ or $b_1 \neq b_2$, and
$$a_1^{-1} b_1 = a_2^{-1} b_2.$$
Given $G$ is Abelian, this is equivalent to
$$a_2 b_1 = a_1 b_2,$$
such that $a_2 \neq a_1$ or $b_1 \neq b_2$.
If we consider the group operation restricted instead to $A \times B$, we now have shown that this map is not injective. It is therefore not surjective, and hence $G \neq AB$, establishing the contrapositive.
