TITLE: Set theory: cardinality of a subset of a finite set.
QUESTION [8 upvotes]: Suppose $A$ is a finite set of cardinality $n$. And Let $B$ be a subset of $A$ and the cardinality of $B$ equals $n$. Then $B=A$. 

Many texts use this fact very frequently but it seems that they just take it for granted. How can I prove this rigorously? Any help will be appreciated.

REPLY [2 votes]: Let's prove the contrapositive statement.  Suppose that $A$ has a proper subset with the same cardinality as $A$ (in other words, $A$ is Dedekind infinite.)  We will show that $A$ is infinite.
Take a proper subset $B$ of $A$ with the same cardinality as $A$.
  Then there is a bijection $f : A \to B$ and an element $a \in A \setminus B$.  Recursively define a function $h : \mathbb{N} \to A$ by

$h(0) = a$
$h(i+1) = f(h(i))$.

Using the fact that the function $f$ is injective and its range does not contain $a$, one can prove by induction on $j \in \mathbb{N}$ that the elements $h(0),\ldots,h(j)$ are distinct, so $h$ is an injection from $\mathbb{N}$ to $A$.
The existence of such an injection means that $\left|A\right| \ge \aleph_0$, so $A$ is infinite.
(There is a detail hiding here, namely the fact that there cannot be an injection from $\mathbb{N}$ to a finite set.  This can be proved by induction on the cardinality of the finite set by an argument similar to the one that Asaf mentions.)