Suppose that $A$ and $B$ are sets and that $f: A \rightarrow B$ is onto. Does being onto guarantee the sets are finite? 
Suppose that $A$ and $B$ are sets and that $f: A \rightarrow B$ is onto.  Determine which of the following statements are true:
  
  
*
  
*If $A$ is finite then $B$ is finite. 
  
*If $B$ is finite, then $A$ is finite. 
  

My defintion for onto is: a function $f: X \rightarrow Y$ is said to be onto provided for each $ y \in Y$ there exists at least one $x \in X$ such that $f(x)= y$.  I also have the statement "Thus a function is onto if the range is equal to the codomain."
I am thinking that if $B$ is finite then $A$ is finite is the true statement and if $A$ is finite then $B$ is finite is the false statement. I think this statement is false.
Is this correct? How do I begin a proof or give a counterexample?
 A: An onto function need not be one-to-one. Figure out which side doesn't need to be the "one".
A: Consider $A = \Bbb N$, and consider $B = \{0,1,2,\dots,b-1\}$, for some fixed positive integer $b$.
You should know that for any natural number $a$, we can write:
$a = qb + r$, where $r \in B$, and that the natural numbers $q,r$ (also known as "quotient and remainder") are uniquely determined by $a$ and $b$.
Thus we can define $f:A \to B$ by:
$f(a) = r$, and this function is onto. But $B$ is finite, and $A$ is infinite.
A: Statement 2 is not always necessarily true.
Consider a function floor()%finitenumber which maps real numbers to integer set. Then A can be infinite but B is always finite.
A: Ok, assume first that $A = \{ x_1, \ldots, x_n \}$ is finite. Since $f$ is onto, we have $f(A) = B$. From this it is easy to see that $B$ must be finite. 
On the other hand, if $B = \{ x_1, \ldots, x_m \}$ is finite, you could for example construct a function $f: \mathbb N \to B$, by setting $f(n) = x_n$ for $n = 1, \ldots, m$, and $f(n) = x_1$ for $n \in \mathbb N \backslash \{1, \ldots, m\}$. 
A: If $f:A \rightarrow B$ is an onto map then $|B|\leq |A|.$ So if $A$ is a finite set then $B$ is also a finite set.
