Suppose we have a metric space. That is, we have some set X, and we have a distance function d(p,q) defining the distance between any two points p and q in X. The distance function obeys the three rules we covered last time, so distances are positive real numbers between any two distinct points and 0 from every point to itself, the distances are symmetric, and distances obey the triangle inequality.

I'm going to talk in abstract terms, but it's helpful to think in terms of a concrete example, so generally think in terms of a 2-D plane with real number coordinates and the distance measured as the straight line distance between two points. There will be cases where we have to work with other metric spaces, but this should provide a good baseline in general.

Look at a particular point in the metric space (or the plane). Call it p. It is naturally surrounded by other points. We can think of the other points as near p if the distance from the other point to p is less than some positive number r. What qualifies as "near" depends on context, so the size of r varies based on the circumstances. Take the set of all points with distance less than r from point p, or the set of points that are near to p. This set is called the neighborhood of p, with radius r. p is in the neighborhood of itself.

On the plane with straight line distances, the neighborhood of p is the interior of the circle of radius r around p, but not the circle itself. In three dimensions, the neighborhood is the interior of a sphere. For the sake of comparison, on the natural number line, if r>1, the neighborhood is just a bunch of individual points, and if r≤1, the neighborhood is only p itself.

Now, given our space X, choose a subset of that space and call it E. Consider some point in E, which we will again call p. Look at the neighborhoods of p. These are subsets of X, the space itself, and the size of the neighborhoods varies with different values of r. If any neighborhood of p is also entirely a subset of E, then p is an interior point of E.

Look at the plane. E is some crazy shape on the plane. If it's possible to draw a circle of any radius around p such that every point inside the circle is inside E, then p is an interior point of E. For example, if E is a square, so every point in X has the coordinates (x,y) and E is the set of all points with 0≤x≤1; and 0 ≤y≤1, then, say, (3/4,8/9) is an interior point of E, but (0,1/2) is not.

But let's define E, instead, as all the points in the same square, on the real plane, but only if the point has rational coordinates. Then E looks the same, but we know it has lots of holes, and in fact any circle around any point in E must include some holes. Therefore, no point in E is an interior point of E.

On the other hand, if our space was defined as the points with rational coordinates, then that same definition of E would have interior points. Holes in X can't be in the neighborhood of p. The point is just that whether a particular point is an interior point of a set depends on both the set and the space that contains it.

Any set E such that every point in the set is an interior point of the set is an open set. Our original example, the set of points in the real plane such that 0≤x≤1 and 0≤y≤1 for real values of x and y, is not open, because points can be on the edge of the set. If we redefine E to not include the edges, so 0<x<1 and 0<y<1, then E is open. Any given point can be close to the edge of the set, but there are always points which are closer to the edge, and we can always draw a circle around any point in the set so that every point in the circle is also in the set.

It's easy to show by thinking about what neighborhoods and open sets look like that every neighborhood is an open set. Pick a point p and draw a circle around it. Pick some point in the circle, and you can always draw a smaller circle around that point which remains entirely within the larger circle. The visualization on the real plane is easy, and it's not much more effort to use the triangle inequality to show it's true for any metric space.