A metric space is a nonempty set along with a function such that
- , with equality iff .
Given a point and a positive number , the open ball centered at with radius is
and the closed ball centered at with radius is
A set is said to be open if for each , there exists such that . A set is said to be closed if is open.
Theorem 1 An open ball is an open set.
Proof: Let and , and let . Put . Then if ,
so that is open.
Theorem 2 If is a metric space, then and are open, the union of any collection of open sets is open, and the intersection of finitely many closed sets is open.
Proof: It is clear that is open, as there is no . Since for any , is open.
Let be a collection of open sets in . Put . If , then for some . Since is open, there exists such that . Hence is open.
Let be open sets in . If then there exist such that and . Put , then , so that is closed. The general result follows from induction.