Topology is , where is a set and is the set of subsets of ; when unambiguous, can be used to describe the toplogy. satisfies the following properties:

.

Arbitrary unions and finite intersections of are in .
Examples: , , are examples of topologies, while is an example of one that is not.
By convention, all subsets of are open sets. The complement of is the set of subsets, termed as closed sets; for instance, the complement of is  hence, this topology is both open and closed. is said to be strictly finer than if .
Basis of a topology
The basis of a topology , , is defined as follows:

If , then atleast one such that .

If , then containing .
Topology is said to be generated by as follows: is said to be open in if , basis element such that and .
Basis of a topology is not unique. We have described how to go from the basis to the topology it generates; for the reverse direction, one way of finding a basis of a topology of follows.
Let be a collection of open sets of . For each , , there exists an element of such that . Then is a basis for the topology of . To prove this: let , and since is open, there exists, by hypothesis, an element such that ; this is enough to fulfill the first condition in the definition of a topology. For the second condition, let , where . Since are open, so is , and there exists, by hypothesis, , such that . Let be the collection of open sets in ; it remains to be shown that the topology generated by equals . First, note that if belongs to , then there exists, by hypothesis, an element such that . It follows that belongs to the topology , by definition. Conversely, if belongs to , then equals union of elements of . Since each element of belongs to , so does .
A subbasis of a topological space is defined as the collection of all subsets of whose union equals . The topology generated by the subbasis is defined as the collection of all unions of finite intersections of elements of .
Three topologies in
The important topologies on are:

The standard topology , defined as or

The lowerbound topology , defined as

The Ktopology , defined as , where
Order topology
An order topology is a collection of the following sets:

All intervals of the form

All intervals of the form

All intervals of the form
If has no smallest element, then there are no sets of type (ii), and if has no largest element, then there are no sets of type (iii).
If is an ordered set, and contains element , the following four subsets are called rays determined by : , , , .
Product topology
Given and , two topological spaces, the product topology is defined as a collection having as basis all subsets of the form , where is an open subset of , and is a an open subset of .
A property of product spaces is:
If is a basis for , and is a basis for , and being topological spaces, then the collection:
is a basis for . This can be proved as follows. Given an open set of , and a point , by definition of product topology, there is a basis element such that . Because are bases of , we can choose an element such that , and such that . Then . Thus the collection meets the criterion for being a basis of .
Projections and are defined in the usual way. Moreover, they are surjective.
The collection defined as:
is a subbasis for the product topology on .
Subspace topology
Given the topology and a , the subspace topology is defined as:
If is the basis for topology , then is a basis for the subspace topology on . We prove this as follows: Given open in and , we can choose so that . Then, . It follows that is the basis for the subpsace topology on .
Let be a subspace of . If is open in and is open in , then is open in . To prove this, notice that, since is open in , , for some open set in . Now, since both and are open in , so is .
If and are subspaces of and , then the product topology is the same as the topology one inherits as a subspace of . To prove this, let be the general basis element of , where is open in and is open in . We know that the general basis element for for the subspace topology of satisfies:
So, is the general basis element for the product topology on . Since the bases for the product topology on and the subspace topology are the same, the topologies are the same.
Let be an ordered set in the order topology, and be a subset. The resulting order topology on need not be the same as the topology inherits as a subspace of .
Closed sets
A subset of a topological space is said to be closed if is open. As an example, consider the subset . It is closed because
is open.
To prove (i), notice that are complements of open sets , and are hence closed. To prove (ii), apply DeMorgan's law to a collection of closed sets :
Notice that the right hand side of this equation represents arbitary unions of open sets, and is hence open, since is open by definition. To prove (iii), apply DeMorgan's law again on closed sets :
The right side of this equation represents finite intersections of open sets and is therefore open. Hence, is closed.
Closure and interior
Given a subset of a topology, the interior of , denoted by , is defined as the union of all open sets contained in , and the closure of , denoted by , is defined as the intersection of all closed sets containing .
If is open, , and if is closed, .
We term as a neighborhood of if is an open set containing . Let . Then:

iff every neighborhood of intersects .

Suppose the topological space is given by a basis, iff every basis element containing intersects .
Examples: For , . . .
Limit point
Let . Then, is termed as the limit point of if every neighborhood of intersects at some point other than .
Examples: In , the only limit point is . In , and are limit points. Every point in is a limit point.
The relationship between closure of , and the set of all limit points of , given by , is
To prove this, consider , so that every neighborhood of intersects in a point different from . Therefore, , and hence . Since by definition, it follows that . To demonstrate the reverse inclusion, let , and show that . If , this is trivial. If not, since , we know that every neighborhood of intersects different from . Then , and , completing the proof.
Hausdorff space
A topology converges to the point , if for each neighborhood of , there is a positive integer such that for each . In a general topology, we can have a sequence converging to more than one point; in order to disallow this nonintuitiveness, we define a Hausdorff space:
A topological space is Hausdorff if, for each pair of points and , the corresponding neighborhoods and are disjoint.
Every finite point set in a Hausdorff space is closed. The proof follows. It suffices to show that every onepoint set is closed. If is a point different from , then and have disjoint neighborhoods and . Since does not intersect , the point cannot belong to the closure of the set . As a result, the closure of is itself, so it is closed.
The axiom: every point set is closed; this is weaker than the Hausdorff condition and implies it. Our lack of interest in the axiom is due to the fact that most interesting results require the full strength of the Hausdorff condition.
A sequence of points of a Hausdorff space converges to atmost one point. To prove this, suppose that is a sequence of points in that converges to . If , let be disjoint neighborhoods of . Since contains for all but finitely many points of , the set cannot. Hence, cannot converge to .
Continuous functions
A function is continuous with respect to topologies and if, for each open set , is an open set on . For example is not continuous, but is (since produces an open set in ).
The following statements are equivalent:

is continuous

For every subset ,

For every closed set of , the set is closed in

For each , and each neighborhood of , there is a neighborhood of such that .
The pasting lemma: Let , where and are closed sets. Further, let and be continuous. If , then and combine to give defined by , .
A useful theorem about continuous functions whose range is a product space: A function given by is continuous iff and are continuous.
Box topology and product topology
Box topology on has as basis where is open in for each . Product topology adds the extra condition that equals for each except for finitely many values of .
Metric topology
A metric on a set is given by a distance function such that:



(Triangle inequality)
An ball centered at is defined as:
A set is open in the metric topology induced by iff for each ,
Let and be two metrics on set , and , be the topologies induced by them. is finer than iff for each and , such that:
An example of a metric space is:
The standard metric space on defined as . The standard bounded metric is defined as . The Eucledian metric is defined as:
The square metric is defined as:
Given an index set J, the uniform metric on is defined as:
The uniform topology on is finer than the product topology and coarser than the box topology; all these topologies are different if is infinite.
Every metric space satisfies the Hausdorff axiom. Let and . Then the triangle inequality implies that are disjoint.
Let and be two metric spaces with metrics and , and let . Further, let , , and . Then, the requirement for continuity of is equivalent to: such that:
The sequence lemma: Let be a topology, and . If a sequence of points of converge to , then . The converse holds if is metrizable.
Let be continuous. For every convergent sequence, in , . The converse holds if is metrizable. Here, we don't use the full strength of metrizability: all we need is countable collection of balls about .
Let , from set to metric space , be a sequence of functions. Then converges uniformly to if given , such that:
for all and . The uniform limit theorem additionally states that is continuous.
Connectedness and compactness
Three elementary theorems of calculus are:

Intermediate value theorem: for continuous function defined in ,
The property of a topological space satisfying this is connectedness.

Maximum value theorem: for continuous function , for all . The property of a topological space satisfying this is compactness.

Uniform continuity theorem: for continuous function , every pair of numbers and , and given , , . The property of a topological space satisfying this is compactness.
The first depends on the connectedness property, and the others depend on the compactness property, of topological spaces.
Connectedness
Separation of space is a pair of nonempty sets and whose union is , neither of which contains a limit point of the other. A nonseparable space is connected. Said differently, the space is connected iff the only the only subsets of that are both open and closed are and .
If is a subspace of , the separation of is a pair of disjoint nonempty sets whose union is , neither of which contains a limit point of the other. The space is connected if it is nonseparable. To prove this, suppose that form a separation of . Then, are both closed and open in . The closure of in is . Further, since is closed in , or . Since , contains no limit points of . A similar argument holds for . Conversely, suppose that are disjoint nonempty subsets whose union is , neither of which contains the limit point of the other. Then, ; therefore and . Thus, are closed in , and since , they're open in as well.
Examples: Let be a subspace of . is separable, and hence disconnected. However, is nonseparable since the first set contains a limit point of the second, namely .
If form a separation of , and is a connected subpsace of , then lies entirely within or .
The union of a collection of connected subspaces of that have a point in common is connected.
Connected subspaces of
Let us first generalize the order properties of . A simply ordered set is called a linear continuum if:

has least upper bound property

For ,
If is a linear continuum in the order topology, then , and all intervals and rays in are connected.
Generalization of IVT of calculus: Let be a continuous map from a connected space to an ordered set in order topology. Then, for , .
A continuous map in a space is a path in from a closed interval , such that , . is said to be path connected if every pair of points in can be joined by a path in .
The unit ball given by where:
is path connected since we can always take a path from given by:
Another example: The punctured Eucledian space given by is path connected for since we can always take a path connecting two points that doesn't go through the origin.
Components and local connectedness
The components of are the connected disjoint subspaces of whose union is such that each nonempty connected subspace of intersects only one of them.
We define an equivalence relation in space by defining if there is a path in from to . The equivalence classes are called path components of .
A space is said to be locally connected at , if for every neighborhood of , there is a connected neighborhood of contained in . If is locally connected at each of these points, then is simply said to be locally connected. Similarly, is said to be path connected at , if, for every neighborhood of , there is a pathconnected neighborhood of contained in . It is said to simply be path connected if it is path connected at each of its points.
Compactness
A collection of subsets of space is said to be the cover or covering of if the union of the elements of equals . It is said to be an open covering of if its elements are open subsets of .
A space is compact if every finite subcollection of also contains an open covering of .
All closed subsets of are compact, so is an example of a compact space. However, neither nor are compact. The latter is because we can choose an open covering
which doesn't cover .
Some properties of compact spaces:

Every closed subspace of a compact space is compact

Every compact subspace of a Hausdorff space is closed

The image of a compact space under a continuous map is compact
The bijective continuous map is a homeomorphism if is compact and is Hausdorff.
The tube lemma: Consider the product space where is compact. If the open set contains slice of , then it contains some tube about where is a neighborhood of .
The Tychonoff theorem: The product of infinitely many compact spaces is compact.
A collection of sets in is said to have the finite intersection property, if for every finite subcollection , the intersection is nonempty.
Redefinition of compactness in terms of the finite intersection property: is compact if for every finite subcollection of closed sets in having the finite intersection property, is nonempty.
Compact subspaces of
We need only the least upper bound property of for compactness. In order topology, a simply ordered set having least upper bound property is compact.
A subspace is compact if and only if it is closed and bounded in the eucledian metric or the square metric .
Countability axioms
A space is said to have a countable basis at if there is a countable collection of neighborhoods of , such that each neighborhood of contains atleast one element of . A space that has a countable basis at each of its points is said said to be firstcountable.
If a space has a countable basis for its topology, then is said to be secondcountable. This is obviously stronger than the firstcountable axiom.
A subspace of a firstcountable space is firstcountable, and a countable product of firstcountable spaces is firstcountable. The same applies to secondcountable spaces.
A subspace is said to be dense in if .
Suppose has a countable basis. Then:

Every open covering of contains a countable subcollection covering .

There exists a countable basis of that is dense in .