Contents
Before we beginEdit
Before we discuss topological spaces in their full generality, we will first turn our attention to a special type of topological space, a metric space. This abstraction has a huge and useful family of special cases, and it therefore deserves special attention. Also, the abstraction is picturesque and accessible; it will subsequently lead us to the full abstraction of a topological space.
Metric SpaceEdit
DefinitionEdit
A metric space is a Cartesian pair where is a nonempty set and , is a function which is called the metric which satisfies the requirement that for all :
 if and only if
 (symmetry)
 (triangle inequality)
Note that some authors do not require metric spaces to be nonempty. We annotate when we talk of a metric space with the metric .
ExamplesEdit
 An important example is the discrete metric. It may be defined on any nonempty set X as follows
 On the set of real numbers , define (The absolute distance between x and y).
To prove that this is indeed a metric space, we must show that d is really a metric. To begin with, for any
real numbers and .

 .
 On the plane as the space, and let
This is the euclidean distance between and ).
 We can generalize the two preceding examples. Let be a normed vector space (over or ). We can define the metric to be: . Thus every normed vector space is a metric space.
 For the vector space we have an interesting norm. Let and two vectors of . We define the pnorm: . For each pnorm there is a metric based on it. Interesting cases of p are:
 . The metric is
 . The metric is goodold Euclid metric
 . This is a bit surprising:
As an exercise, you can prove that thus justifying the definition of .
 The greatcircle distance between two points on a sphere is a metric.
 The Hilbert space is a metric space on the space of infinite sequences {a_{k}} such that
converges, with a metric d({a_{i}}, {b_{i}})=.
 The concept of the Erdős number suggests a metric on the set of all mathematicians. Take x and y to be two mathematicians, and define d(x, y) as 0 if x and y are the same person; 1 if x and y have coauthored a paper; n if the shortest sequence , where each step pairs two people who have coauthored a paper, is of length n; or ∞ if x ≠ y and no such sequence exists.
This metric is easily generalized to any reflexive relation (or undirected graph, which is the same thing).
Note that if we instead defined d(x, y) as the sum of the Erdős numbers of x and y, then d would not be a metric, as it would not satisfy . For example, if x = y = Stanisław Ulam, then d(x, y) = 2.
NoteEdit
Throughout this chapter we will be referring to metric spaces. Every metric space comes with a metric function. Because of this, the metric function might not be mentioned explicitly. There are several reasons:
 We don't want to make the text too blurry.
 We don't have anything special to say about it.
 The space has a "natural" metric. E.g. the "natural" metric for is the euclidean metric .
As this is a wiki, if for some reason you think the metric is worth mentioning, you can alter the text if it seems unclear (if you are sure you know what you are doing) or report it in the talk page.
Open BallEdit
MotivationEdit
The open ball is the building block of metric space topology. We shall define intuitive topological definitions through it (that will later be converted to the real topological definition), and convert (again, intuitively) calculus definitions of properties (like convergence and continuity) to their topological definition. We shall try to show how many of the definitions of metric spaces can be written also in the "language of open balls". Then we can instantly transform the definitions to topological definitions.
DefinitionEdit
Given a metric space an open ball with radius around is defined as the set
 .
Intuitively it is all the points in the space, that are less than distance from a certain point .
ExamplesEdit
Why is this called a ball? Let's look at the case of : .
Therefore is exactly  The ball with at center, of radius . In the ball is called open, because it does not contain the sphere ().
The Unit ball is a ball of radius 1. Lets view some examples of the unit ball of with different pnorm induced metrics. The unit ball of with the norm is: = =
 The metric induced by in that case, the unit ball is:
 The metric induced by in that case, the unit ball is:
 The metric induced by in that case, the unit ball is:
As we have just seen, the unit ball does not have to look like a real ball. In fact sometimes the unit ball can be one dot:
 The discrete metric, The unit ball is
Interior of a SetEdit
DefinitionsEdit
Definition: We say that x is an interior point of A iff there is an such that: . This intuitively means, that x is really 'inside' A  because it is contained in a ball inside A  it is not near the boundary of A.
Illustration:
Interior Point  Not Interior Points 

Definition: The interior of a set A is the set of all the interior points of A. The interior of a set A is marked . Useful notations: and .
PropertiesEdit
Some basic properties of int (For any sets A,B):
Proof of the first:
We need to show that: . But that's easy! by definition, we have that and therefore
Proof of the second:
In order to show that , we need to show that and .
The " " direction is already proved: if for any set A, , then by taking as the set in question, we get .
The " " direction:
let . We need to show that .
If then there is a ball . Now, every point y, in the ball an internal point to A (inside ), because there is a ball around it, inside A: .
We have that (because every point in it is inside ) and by definition .
Hint: To understand better, draw to yourself .
Proof of the rest is left to the reader.
ReminderEdit
 [a, b] : all the points x, such that
 (a, b) : all the points x, such that
ExampleEdit
For the metric space (the line), we have:
Let's prove the first example (). Let (that is: ) we'll show that is an internal point.
Let . Note that and . Therefore .
We have shown now that every point x in is an internal point. Now what about the points ? let's show that they are not internal points. If was an internal point of , there would be a ball . But that would mean, that the point is inside . but because that is a contradiction. We show similarly that b is not an internal point.
To conclude, the set contains all the internal points of . And we can mark
An Open SetEdit
DefinitionEdit
A set is said to be open in a metric space if it equals its interior (). When we encounter topological spaces, we will generalize this definition of open. However, this definition of open in metric spaces is the same as that as if we regard our metric space as a topological space.
Properties:
 The emptyset is an open set (by definition: ).
 An open ball is an open set.
 For any set B, int(B) is an open set. This is easy to see because: int(int(B))=int(B).
 If A,B are open, then is open. Hence finite intersections of open sets are open.
 If (for any set if indexes I) are open, then their union is open.
Proof of 2:
Let be an open ball. Let . Then .
In the following drawing, the green line is and the brown line is . We have found a ball to contain inside .
Proof of 4:
A, B are open. we need to prove that . Because of the first propriety of int, we only need to show that , which means . Let . We know also, that from the premises A, B are open and . That means that there are balls: . Let , we have that . By the definition of an internal point we have that ( is the required ball).
Interestingly, this property does not hold necessarily for an infinite intersection of open sets. To see an example on the real line, let . We then see that which is closed.
Proof of 5:
Proving that the union of open sets is open, is rather trivial: let (for any set if indexes I) be a set of open sets. we need to prove that : If then it has a ball . The same ball that made a point an internal point in will make it internal in .
Proposition: A set is open, if and only if it is a union of openballs.
Proof: Let A be an open set. by definition, if there there a ball . We can then compose A: . The equality is true because: because . in each ball we have the element and we unite balls of all the elements of .
On the other hand, a union of open balls is an open set, because every union of open sets is open.
ExamplesEdit
 As we have seen, every open ball is an open set.
 For every space with the discrete metric, every set is open.
Proof: Let be a set. we need to show, that if then is an internal point. Lets use the ball around with radius . We have . Therefore is an internal point.
 The space with the regular metric. Every open segment is an open set. The proof of that is similar to the proof that , that we have already seen.
TheoremEdit
In any metric space X, the following three statements hold:
 1) The union of any number of open sets is open.
 Proof: Let be a collection of open sets, and let
 . Then there exists a such that .
 So there exists an such that . Therefore
 .
 Proof: Let be a collection of open sets, and let
 2) The intersection of a finite number of open sets is open.
 Proof: Let , where is a finite collection of open sets.
 So for each . Let . For each , there exists an such that . Let {}. Therefore and .
 Proof: Let , where is a finite collection of open sets.
 3) The empty set and X are both open.
TheoremEdit
In any metric space X, the following statements hold:
 1) The intersection of any number of closed sets is closed.
 2) The union of a finite number of closed sets is closed.
ConvergenceEdit
DefinitionEdit
First, Lets translate the calculus definition of convergence, to the "language" of metric spaces: We say that a sequence converges to if for every exists that for each the following holds: .
Equivalently, we can define converges using Openballs: A sequence converges to If for every exists that for each the following holds: .
The latter definition uses the "language" of openballs, But we can do better  We can remove the from the definition of convergence, thus making the definition more topological. Let's define that converges to (and mark ) , if for every ball around , exists that for each the following holds: . is called the limit of the sequence.
The definitions are all the same, but the latter uses topological terms, and can be easily converted to a topological definition later.
PropertiesEdit
 If a sequence has a limit, it has only one limit.
Proof Let a sequence have two limits, and . If they are not the same, we must have . Let be smaller than this distance. Now for some , for all , it must be the case that both and by virtue of the fact and are limits. But this is impossible; the two balls are separate. Therefore the limits are coincident, that is, the sequence has only one limit.  If , then almost by definition we get that . ( Is the sequence of distances).
ExamplesEdit
 In with the natural metric, The series converges to . And we note it as follows:
 Any space, with the discrete metric. A series converges, only if it is eventually constant. In other words: If and only if, We can find that for each ,
 An example you might already know:
The space For any pnorm induced metric, when . Let . and let .
Then, If and only if .
Uniform ConvergenceEdit
A sequence of functions is said to be uniformly convergent on a set if for any , there exists an such that when and are both greater than , then for any .
Closed SetsEdit
ClosureEdit
Definition: The point is called point of closure of a set if there exists a sequence , such that
An equivalent definition using balls: The point is called point of closure of a set if for every open ball , we have .
The proof is left as an exercise.
Intuitively, a point of closure is arbitrarily "close" to the set . It is so close, that we can find a sequence in the set that converges to any point of closure of the set.
Example: Let A be the segment , The point is not in , but it is a point of closure: Let . (, and therefore ) and (that's because ).
Definition: The closure of a set , is the set of all points of closure. The closure of a set A is marked or .
Note that . a quick proof: For every , Let .
ExamplesEdit
For the metric space (the line), and let we have:
Closed setEdit
Definition: A set is closed in if .
Meaning: A set is closed, if it contains all its point of closure.
An equivalent definition is: A set is closed in If for every point , and for every Ball , then .
The proof of this definition comes directly from the former definition and the definition of convergence.
PropertiesEdit
Some basic properties of Cl (For any sets ):
 is closed iff
 While the above implies that the union of finitely many closed sets is also a closed set, the same does not necessarily hold true for the union of infinitely many closed sets. To see an example on the real line, let . We see that fails to contain its points of closure,
This union can therefore not be a closed subset of the real numbers.
The proofs are left to the reader as exercises. Hint for number 5: recall that .
Open vs ClosedEdit
That is, an open set approaches its boundary but does not include it; whereas a closed set includes every point it approaches. These two properties may seem mutually exclusive, but they are not:
 In any metric space , the set is both open and closed.
 In any space with a discrete metric, every set is both open and closed.
 In , under the regular metric, the only sets that are both open and closed are and . However, some sets are neither open nor closed. For example, a halfopen range like is neither open nor closed. As another example, the set of rationals is not open because an open ball around a rational number contains irrationals; and it is not closed because there are sequences of rational numbers that converge to irrational numbers (such as the various infinite series that converge to ).
Complementary setEdit
A Reminder/Definition: Let be a set in the space . We define the complement of , to be .
A Quick example: let . Then .
The plot continues...Edit
A very important Proposition: Let be a set in the space . Then, A is open iff is closed.
Proof: () For the first part, we assume that A is an open set. We shall show that . It is enough to show that because of the properties of closure. Let (we will show that ).
for every ball we have, by definition that (*). If the point is not in then . is open and therefore, there is a ball , such that: , that means that , contradicting (*).
() On the other hand, Lets a assume that is closed, and show that is open. Let be a point in (we will show that ). If is not in then for every ball we have that . That means that . And by definition of closure point is a closure point of so we can say that . is closed, and therefore That contradicts the assumption that
Note that, as mentioned earlier, a set can still be both open and closed!
On Edit
The following is an important theorem characterizing open and closed sets on .
Theorem: An open set O in R^{1} is a countable union of disjoint open intervals.
Proof: Let . Let and let . There exists an open ball (xε,x+ε) such that (xε,x+ε) ⊆ O because O is open. Thus, a≤xε and b≥x+ε. Thus, x ∈(a,b). The set O contains all elements of (a,b) since if a number is greater than a, and less than x but is not within O, then a would not be the supremum of {tt∉O, t<x}. Similarly, if there is a number is less than b and greater than x, but is not within O, then b would not be the infimum of {tt∉O, t>x}. Thus, O also contains (a,x) and (x,b) and so O contains (a,b). If y≠x and y∈(a,b), then the interval constructed from this element as above would be the same. If y<a, then inf{tt∉O, t>y} would also be less than a because there is a number between y and a which is not within O. Similarly if y>b, then sup{tt∉O, t<y} would also be greater than b because there is a number between y and b which is not within O. Thus, all possible open intervals constructed from the above process are disjoint. The union of all such open intervals constructed from an element x is thus O, and so O is a union of disjoint open intervals. Because the rational numbers is dense in R, there is a rational number within each open interval, and since the rational numbers is countable, the open intervals themselves are also countable.
Examples of closed setsEdit
 In any metric space, a singleton is closed. To see why, consider the open set, . Let . Then , so . Let . Then . So is open, and hence is closed.
 In any metric space, every finite set is closed. To see why, observe that is open, so is closed.
 Closed intervals [a,b] are closed.
 Cantor Set Consider the interval [0,1] and call it C_{0}. Let A_{1} be equal {0, } and let d_{n} = . Let A_{n+1} be equal to the set A_{n}∪{xx=a+2d_{n}, a∈A_{n}}. Let C_{n} be {[a,a+d_{n}]}, which is the finite union of closed sets, and is thus closed. Then the intersection is called the Cantor set and is closed.
ExercisesEdit
 Prove that a point x has a sequence of points within X converging to x if and only if all balls containing x contain at least one element within X.
 In the only sets that are both open and closed are the empty set, and the entire set. This is not the case when you look at . Give an example of a set which is both open and closed in .
 Let be a set in the space . Prove the following:
ContinuityEdit
DefinitionEdit
Let's recall the idea of continuity of functions. Continuity means, intuitively, that you can draw a function on a paper, without lifting your pen from it. Continuity is important in topology. But let's start in the beginning:
The classic deltaepsilon definition: Let be spaces. A function is continuous at a point if for all there exists a such that: for all such that , we have that .
Let's rephrase the definition to use balls: A function is continuous at a point if for all there exists such that the following holds: for every such that we have that . Or more simply:
Looks better already! But we can do more.
Definitions:
 A function is continuous in a set S if it is continuous at every point in S.
 A function is continuous if it is continuous in its entire domain.
Proposition: A function is continuous, by the definition above for every open set in , The inverse image of , , is open in .
Note that does not have to be surjective or bijective for to be well defined. The notation simply means .
Proof: First, let's assume that a function is continuous by definition (The direction). We need to show that for every open set , is open.
Let be an open set. Let . is in and because is open, we can find and , such that . Because f is continuous, for that , we can find a such that . that means that , and therefore, is an internal point. This is true for every  meaning that all the points in are internal points, and by definition, is open.
()On the other hand, let's assume that for a function for every open set , is open in . We need to show that is continuous.
For every and for every , The set is open in . Therefore the set is open in . Note that . Because is open, that means that we can find a such that , and we have that .
The last proof gave us an additional definition we will use for continuity for the rest of this book. The beauty of this new definition is that it only uses opensets, and there for can be applied to spaces without a metric, so we now have two equivalent definitions which we can use for continuity.
ExamplesEdit
 Let be any function from any space , to any space , were is the discrete metric. Then is continuous. Why? For every open set , the set is open, because every set is open in a space with the discrete metric.
 Let The identity function. is continuous: The source of every open set is itself, and therefore open.
ExerciseEdit
 Prove that a function is continuous for every closed set in , The inverse image of , , is closed in .
Uniform ContinuityEdit
In a metric space X, function from X to a metric space Y is uniformly continuous if for all , there exists a such that for all , implies that .
IsometryEdit
An isometry is a surjective mapping , where and are metric spaces and for all , .
In this case, and are said to be isometric.
Note that the injectivity of follows from the property of preserving distance:
So an isometry is necessarily bijective.
ExercisesEdit
 Show that a set is a metric open set iff it is a (possibly infinite) union of open balls.
 Show that the discrete metric is in fact a metric.