We like open sets and closed sets, since we know properties about all of the points in the set. For sets that are neither open nor closed, we can't say much, so it would be convenient if we turn those sets into closed sets. For that matter, it would be convenient to be able to turn open sets into closed sets.
As usual, take a metric space X and look at some set in that space, called E. We are not making any assumptions about E yet, so it could be open, closed, or neither. Find the set of all limit points of E, and call that E′. Then, the closure of E, written E, is defined as E ∪ E′. The closure of E has some useful properties.
First, if E is closed, then E=E. Since every limit point of E is in E, E′ is a subset of E, so E∪E′=E. In the other direction, if E=E, then E is closed. If E=E∪E′, E′ must be a subset of E, so every limit point of E is a member of E.
This prompts the more general conclusion that E is always closed, justifying the name "closure." The only way this could not be true is if there were some point which is a limit point of E′ but is not a limit point of E. Call this point x. We want to show that a neighborhood of radius r must include a point in E if x is a limit point of E′, for any positive value of r. Since x is a limit point of E′, there must be a point, call it p, in E′ at distance less than r/2 from x. Since p is in E′, and is therefore a limit point of E, there must be a point in E at distance less than r/2 from p. By the triangle inequality, the distance from this point in E to x is less than r/2 + r/2, so there is a point in E at distance less than r to x. This is true for any positive value of r, so x is a limit point of E, and is a member of E′. Therefore every limit point of E is a member of E′, so E is closed.
Finally, if E is a subset of F and F is closed, then E is a subset of F. Since E is a subset of F, every limit point of E is a limit point of F. Since F is closed, every limit point of F is a member of F. Therefore, E′ is a subset of F. Since E is a subset of F and E′ is a subset of F, E∪E′ is a subset of F.
The conclusion from all of this is that for any set E, the closure of E is the smallest closed set which contains E. It's like a handy package for E, closed up so you don't have to worry about its limit points leaking out all over the rest of the space.