Necessary and sufficient conditions for a bijection to exist

elementary-set-theorysoft-question

Suppose we have two sets $A$ and $B$. Suppose there exists injections $i_1:A\to B$ and $i_2:B\to A$. Does there exist a bijection from $A$ to $B$? Does a bijection exist if and only if $A$ and $B$ are finite?

This is a question I have been thinking about for a while and cannot make much progress on it. What, if any, would be the necessary and sufficient conditions on the sets $A,B$ or functions $i_1,i_2$ for there to exist a bijection from $A$ to $B$? Any tips or help would be appreciated.