Please help me with this, I'm not sure I understand it and don't know where to start
Let A and B be finite sets with |A| = |B|. Suppose that f: A--->B. Prove that f is injective if and only if f is surjective
Suppose that $\displaystyle f:A \mapsto B$ is injective but not surjective.
Notation: $\displaystyle f^{ - 1} (b) = \left\{ {x \in A:f(x) = b} \right\}$
$\displaystyle \mathbb{F} = \left\{ {f^{ - 1} (b):b \in B} \right\}\;\& \,\left| \bigcup\mathbb{F} \right| = \left| A \right|$
But $\displaystyle f$ is not surjective so $\displaystyle \left( {\exists c \in B} \right)\left[ {f^{ - 1} (c) = \emptyset } \right]$.
So what is the contradiction?
Look, this is not a trivial problem. It usually makes use of the pigeon-hole principle.
You are not going to find a trivial proof. Any proof is equivalent to proving a form of the pigeon-hole principle.
That said, try this.
Suppose that $\displaystyle f:A \mapsto B$ is injective.
$\displaystyle \left( {\forall a \in A} \right)\left\{ {\{ f(a)\} } \right\}$ is collection of pair-wise disjoint subsets of $\displaystyle B$.
But by the nature if functions $\displaystyle \left| {\left\{ {\{ f(a)\} } \right\}} \right| = \left| A \right| = \left| B \right|$.
From that how can conclude that $\displaystyle f$ is surjective?