# If $A,B$ are equinumerous, then so are their complements

I'm interested to know if the following statement is true:

If $A,B \subseteq X$ are equinumerous (i.e. $|A|=|B|$, or there is a bijection $A \to B$), then $X \setminus A$ and $X \setminus B$ are equinumerous as well.

This seems true even for infinite sets, but I couldn't prove it in the infinite case. I tried constructing a bijection $f:X \setminus A \to X \setminus B$ explicitly using the bijection $A \to B$, and came up with an incomplete piecewise function

$$f(x)=\begin{cases} x & x \in X\setminus(A \cup B) \\? & x \in B \end{cases},$$ but this doesn't seem to work. My question is, is there a nice way of proving this at all?

Thank you!

• If $A,B$ infinite and $|A|\geq|B|$, then $|A\bigcup B|=|A|$. – Gina Jul 8 '14 at 7:17

Consider $X = \Bbb N$, $A = \Bbb N$ and $B = \Bbb N \setminus \{ 0 \}$.
Unfortunately, this is not true. For a simple example, let $X=[0,1]$, $A=(0,1]$, and $B=(0,1)$.