Subset with same cardinality

Suppose $A \subseteq B$ and that $|A| = |B|$ are both finite. Can we conclude that $A = B$? $A$ must contain only elements that are also in $B$, so if we keep choosing elements from $B$ to be in $A$ we will run out because they have the same cardinality. Is there a more formal way to show this?

What if they are both infinite? I think this is probably false, because of this counter example: $\mathbb{N}_2 \subseteq \mathbb{N}$ and $|\mathbb{N}_2| = |\mathbb{N}|$ but $\mathbb{N}_2 \neq \mathbb{N}$. Where $\mathbb{N}_2$ is the even natural numbers.

• The first statement is true. For the second statement how would you define $|\mathbb{N}|$ ? – Jennifer Mar 27 '16 at 19:16
• @Jennifer You don't have to define $|{\mathbb{N}}|$ directly. It's enough to show that $|{\mathbb{N}}|=|{\mathbb{N}_2}|$ by defining a bijection. – Edward Jiang Mar 27 '16 at 19:19

• This is not the definition of an infinite set. It's an equivalent definition of an infinite set assuming the axiom of [countable] choice, but not necessarily equivalent without it. More specifically, it is consistent that there is a set which is not equipotent to $\{0,\ldots,n-1\}$ for any $n\in\Bbb N$, but it is not equipotent to any of its proper subsets. – Asaf Karagila Mar 27 '16 at 19:38
Your first statement is correct. If they are both infinite consider the following scenario. Let $\mathbb{E} = \{n \in \mathbb{N} | n = 2k, k \in \mathbb{N}\}$. This is the set of all even natural numbers. There is a bijection $f : \mathbb{N} \to \mathbb{E}$ where $f$ is defined by $f(x) = 2x$. Now we have that $\mathbb{E} \subseteq \mathbb{N}$ and $|\mathbb{E}| = |\mathbb{N}|$ but $\mathbb{E} \not = \mathbb{N}$.