Topology
Topology is the study of properties of spaces that do not change under smooth deformations. This is called invariance. The way I like to think of this is by imagining the surfaces to be made of clay. we can change the shapes of these surfaces, under certain rules, and the interest of the field of topology is in general properties shared by all these deformations. Thus, topologically all the shapes that belong to a certain class and can be interchanged through deformation are topologically equivalent. A standard joke is the topological equivalence of a coffee cup and a donut → Both have one hole! These kinds of relationships are called homeomorphisms in Topology
The main idea starts by classifying sets and then figure out a way to stack structures on top of it and this is the essence of spaces. A recurring theme, then, is figuring out a way to preserve structures while transforming a set. In other words, we first need to define a way to give structure to a set. Let u define two things here:
 Space → We take a set and add some kind of structure to it to form a space. This structure is defined by a topology on a set, or a group structure, etc. Thus, a set is basically space where the structure is Null
 Map → A map between two sets \(\phi: A \rightarrow B\) is ar elation such that \(\forall a \in A\) there exists exactly one \(b \in B\) such that \(\phi(a,b)\), and we can say \(b = \phi(a)\).
Now, we can define this recurring theme as essentially the classification of spaces based on structurepreserving maps between those spaces.
Topological Spaces
In vanilla calculus, we define a function as
\[f: \mathbb{R}^n \rightarrow \mathbb{R}^m \iff \forall x \rightarrow x' \in \mathbb{R}^m \implies f(x) \rightarrow f(x')\]We call \(\mathbb{R}^n\) as the Domain of this function and \(\mathbb{R}^m\) as the codomain of this function. Now, if we are to generalize this notion, we are essentially generalizing the domain and the codomain to arbitrary sets on which this function can be defined i.e
\[f: X \rightarrow Y \iff \forall x \in X \rightarrow y \in Y \implies f(x) \rightarrow f(y)\]However, we need to define what it means when we say \(x \rightarrow y\). One way to do this is through the Metric Space where we say that the idea of \(x\) approaching a value \(y\) implies that a certain notion of distance between these points tends to reduce towards zero. This distance can be defined through any kind of metric and we basically have a way to define function over this space. However, there are certain issues with this:
 The distance function contains extra path information that is probably not required if we are only interested in the notion of \(x \rightarrow y\). In other words, if I am on a contract or expand the geometry of my set \(X\), given that this operation is continuous, the notion of \(x \rightarrow y\) still holds. However, the change that I have applied changes all distances that can be measured. So, in a sense, the distance is extra information if we are interested in continuity
 Metric spaces are not general enough to express pointwise convergence → Suppose we have a sequence of functions  \(f_n\)  that share the same domain and codomain, then the sequence converges pointwise to \(f\) if these sequences converge to the function int eh limit of infinity. Now, if I am to compare the \(f_n\) sequence’s individual members, there is a not a clear notion of distance that the Metric space can provide to do this. \(\lim_{n \rightarrow \infty} f_n(x) = f(x)\)
Thus, we export some notions from calculus to get the topological notions to get this generalization:

We take the notion of \(\epsilon\) enclosing region and extend it to define an \(\epsilon\) ball around \(x \in \mathbb{R}^n\) as
\[B_\epsilon(x) = \big\{ x' \big \,\, x  x' < \epsilon \big \}\]  We use this notion of the \(\epsilon\)ball to define an Open set \(S \subseteq \mathbb{R}^n\) as the set for which we can find an \(\epsilon\)ball for all points inside this set, for \(\epsilon > 0\). In other words, we can call \(S\) a union of \(\epsilon\)balls that can be contained inside \(S\). Thus, an open set is defined as a subset containing a neighborhood for each of its points.
 We define the Neighborhood of some \(x \in \mathbb{R}^n\) as the \(\epsilon\)ball around \(x\).
To understand the topological spaces, we first need to understand what does it mean to endow a set with a topology. The core idea is to take a set and stack some extra information on it. This extra information on the set is called topology, and it helps us define notions of continuous deformation of subspaces, continuity, etc. The vanilla calculus that we learn on the Euclidean Space, and in general any kind of metric space, is essentially taking the set \(\mathbb{R}^n\) and applying a metric onto it that helps us do calculus on this set. In the general sense, we define this topology through open sets, defined previously. Thus, we can now define a topological space as a set \(X\) and a collection \(O\) of open subsets, such that the following 3 criteria are met:
 \[\Phi, X \in O\]
 \(U,V \in O \implies \cap \{ U, V \} \in O\) → elements, which are defined through open sets, are closed under finite intersection
 \(U,V \in O \implies \cup \{ U, V \} \in O\) → elements are closed under arbitrary unions
This collection of subsets \(O\) is called a topology on \(X\), and the pair \((X, O)\) is called a topological space. We can define many different topologies on the same set, and each of these topologies helps us define the notions of continuity and convergence on this set, which helps us do calculus on this space. So, we can use the notion of the topological spaces to define continuity → For topological space \(X, Y\) , we can say that \(f: X \rightarrow Y\) is continuous if for any open set \(V \subseteq Y\) we have
\[f^{1} (v) = \{ x \in X  f(x) \in V\}\]which is open in \(Y\). Thus, we are essentially defining continuity as open sets mapping to open sets by saying that any function that produces a value in an open set of \(X\) will have an inverse image as also an open set in \(X\); and we can now say that for a given \(\epsilon > 0\) , we can find a \(\delta > 0\) such that:
\[x  x' < \delta \implies f(x)  f(x') < \epsilon\]Some common kinds of topology are:
 Chaotic Topology → The topology defined by \(O = \{M, \Phi\}\) i.e none of the elements in M are open sets
 Discrete Topology → Defined by \(O = \Rho(M)\) i.e each and every element of M is an open set
 Standard topology → Defined by taking the \(\epsilon\)ball around each point and asserting that for all points in \(M\), we can construct a ball with radius \(\epsilon\) that is entirely inside M. This also highlights the importance of defining open Sets. If we were to take the boundaries of the set into its definition, thereby making it a closed set, then all the boundary points essentially violate the standard topology condition.

Metric Topology → The one applicable to metric spaces, where we define the \(\epsilon\)ball as a distance measure i.e it has to obey the properties of being greater than zero, commutativity and triangle inequality
\[B_\epsilon(x) = \big\{ x' \big \,\, d(x, x) < \epsilon \big \}\]
Constructing New topologies on a given Topology
Once we have a topological space, then we can create topologies on it. Let \((M,O)\) be a topological space. Then for a subset \(N \subset M\), we define a new topology:
\[O_N := \big \{ U \cap N \,\,\, \big  \,\,\, U \in O \big \} \subseteq \Rho(N)\]This new topology $$O  _{N}\(is called an **induced (subset) topology** on\)N\(which created by intersecting open sets that define the topology on the superset\)M\(with the subset\)N\(, which leads to the new smaller collection of open sets being in the power set of\)N\(. we easily see why by testing the 3 criteria of\)O  {N}\(being a topology as defined above. A cool thing that induced topologies help us with is defining a topology on nonopen subsets of\)M\(. For example, we can take the set\)\mathbb{R}\(and add the standard topology on it to get\)(R, O{std})\(and take the subset\)N = [1, 1]\(. Now if we are to consider the set\)(0,1]\(and see that clearly, it does not belong to\)O_{std}\(since it is not open. However, it can easily be written as\)(0,1] = (0,2) \cap[1,1]\(and this make it a set in the induced topology\)O_{std}  _N$$. Thus, 
Convergence
To define convergence, we take a sequence and define it as a map from \(\N\) to the set \(M\)
\[q: \N \rightarrow M\]which essentially means that we have a sequence of number in \(\N\) that uniquely map to points in \(M\). Now, let’s take a point \(a \in M\) . Let a belong to a subset of the topology i.e \(a \in U \in O\) , then we can say that the sequence \(q\) is convergent to this limit point \(a\) if :
\[\forall U \in O : \exists N \in \N : \forall n > N : q(n) \in U\]In other words, we can say that \(q\) is convergent to \(a\) if, for any open set in the topology to which this point can belong, there exists a point \(N\) in the set \(\N\) beyond which the sequence always maps to this subset. If this were not happening, the sequence would never converge. For standard topology, these subsets would be the \(\epsilon\)balls, and thus the notion of convergence would be that beyond \(N\) the sequence should always map to a point within this \(\epsilon\)ball. Hence, this is a generalized notion of our vanilla notion of convergence, extended to any kind of topology.
Continuity
For continuity, let’s take two topological spaces \((M, O_M)\) and \((N, O_N)\) and take a map between these spaces as \(\phi: M \rightarrow N\) . Now, we can call this map continuous if
\[\forall U \in O_N : \exists V \in O_m : \phi(v \in V) = u \in U\]In other words we are saying that for all open subsets of \(N\)  \(U \in O_N\)  the preimage of U  $$\big { m \in M \big  \phi(m) \in U \big }\(exists in\)O_M$$ 
Homeomorphism
Let \(\phi: M \rightarrow N\) be a bijection. Now, if we equip these sets with topologies \((M, O_M) \,\,\,\, (N, O_N)\), then we say that \(\phi\) is a homeomorphism if :
 \(\phi: M \rightarrow N\) is continuous
 \(\phi ^ {1}: M \rightarrow N\) is continuous
Thus, we have essentially used the notion of continuity provided by topological spaces to define a map between two topologies that preserves the structure. This is why we can see that the nongeometrical essence of a toroid and a cup are the same since this homeomorphism exists. This homomorphism is providing a oneone pairing of the open sets of \(M\) and \(N\). And if such homeomorphisms exist, then we can say that \(M\) and \(N\) are isomorphic in the topological sense
\[M \cong_{top} N\]Topological Properties
Separation Properties

T1 → A topological space \((M,O)\) is called T1 if for any two distinct points \(p \ne q\)
\[\exists U \in O : p \in U: q \notin U\] 
Hausdorff or T2 → A topological space \((M,O)\) is T2 if for \(p \ne q\)
\[\begin{aligned} &\exists U \in O : p \in U \\ &\exists V \in O : q \in V \\ &U \cap V = \Phi \end{aligned}\]
T1 is a weaker argument than T2 since we are not applying the neighborhood condition on both points. Any topology that is Hausdorff will by extension be T1, but not the other way round. We can have multiple such properties for separation, depending on how we decide to separate our points, but the core idea remains the same.
Compactness
Compactness generalizes the notion of boundedness and closed sets in Euclidean space. Ideally, we can construct properties that are only valid for finite sets and become invalid for infinite sets. These essentially are:
 Boundedness of function → If \(f: X \rightarrow \mathbb{R}\) we always have \(f(x) \leq K\)
 All functions attain a maximum → There is some \(x_0\) such that \(f(x) < f( x_0) \,\,\,\,\, \forall x \in X\)
The first statement is essentially saying that if we can bound our function locally, then we can also boost this boundedness globally, while the second statement is asserting that the perturbations of our function are bounded some maximum value. it is easy to see why there is no guarantee that this might be the case if \(X\) is an infinite set. Now, when we endow our domain with additional structure, to create the topological space \((M,O)\), then it turns out that some kinds of sets start exhibiting properties similar to finite sets, even though they may technically be infinite. We call these spaces compact.
To understand this, we need to first generalize what it means to be closed or bounded in the topological sense, and we do this through is Covers → We can call a set \(C\) a cover of our topological space \((M, O)\) if it satisfied the following conditions:
 \(C \subseteq O\) → \(C\) is a collection of open sets
 \(\cup C = M\) → The union of the elements of \(C\) give rise to \(M\)
Since \(C\) solely comprises open sets, we also call it the Open Cover of \(M\). Now any such open cover \(C'\) that can be formed and is a subset of \(C\) will be called a subcover of \(M\). Now, we can use these covers to define compactness → Any topological space \((M,O)\) is compact if every cover \(C\) of \(M\) has a finite subcover \(C'\).
 The need for including subcovers in this definition is because there is no finiteness guarantee for covers. For example, let’s think of \(\mathbb{R}\) as our topological space, and let’s consider the set \((0,1)\). For every element of this set, we can create a partition \((0,\frac{1}{n})\) and \((\frac{1}{n}, 1)\) such that it will fall in any one of the two and thus, we can’t say that there exists a subcover that is finite. However, if we include the endpoint to get the interval \([0,1]\), then we can see that \(0\) and \(1\) might not fall in these partitions and so there has to exist a finite subcover. Hence, the subcover is allowing us to essentially understand what it means to be small in a purely mathematical sense. Also, this process of including endpoints is called compactification
This notion of compactness also extends to subspaces and homeomorphic spaces of a topological space \((M,O)\). The HeineBorel Theorem says that for a metric space, every closed and bounded subset is compact.
Paracompactness
Paracompactness is a weaker notion than compactness. To understand it, we will define a refinement on a cover \(C\) as a subset \(C' \subseteq C\) such that
\[\forall U \in C : \exists U' \in C' : U' \subseteq U\]Now, we can call our topological space \((M,O)\) paracompact if every open cover has an open refinement that is locally finite. We can call a refinement locally finite if every point of the space has a neighborhood that intersects only finitely many sets in the cover. Thus, we are saying that our space locally behaves in a certain bounded manner. This is important for defining manifolds. It can be seen that compactness implies paracompactness, and thus, the Stone Theorem says that every metrizable space is paracompact.
Connectedness
The idea behind connectedness in topological spaces is to be able to define the notion of a ‘whole’. Put simply, if we can express our topological space as the union of two or more disjoint nonempty open subsets, then essentially our space is a composite of those two spaces. Thus, define a topological space \((M,O)\) as connected if the following condition does not hold.
\[\exists A,B \in O : M = \ A \cup B\]Here, we are not defining the notion of a ‘how’ \(A\) and \(B\) connect. All we are saying is that we can create \(M\) through the union of \(A\) and \(B\). To explore these kinds of connections, we formalize the notion of a path from a point \(p\) to a point \(q\) as a continuous function \(\gamma\) such that :
\[\begin{aligned} &\gamma : [0,1] \rightarrow M \\ &\gamma (0) = p \\ &\gamma (1) = q \end{aligned}\]Thus, if tis condition holds for every pair \(p,q \in M\) , then we call our topology PathConnected
Homotopic Curves and the fundamental Group
The idea of Homotopy is to deform the paths between two points in a topological space into one another. We are essentially saying that if two points \(p,q \in M\) are connected by two paths \(\gamma, \delta\) such that:
\[\begin{aligned} &\gamma (0) = \delta(0) = p \\ &\gamma (1) = \delta(1) = q \end{aligned}\]Then we can talk about a function on all such paths between \(p\) and \(q\) :
\[\begin{aligned} h: [0,1] \times [0,1] \rightarrow M \\ h(0, \lambda) = \gamma(\lambda) \\ h(1, \lambda) = \delta(\lambda) \end{aligned}\]And if this function exists, then \(\gamma\) and \(\delta\) are homotopic. Thus, we are essentially saying that all the paths between \(p\) and \(q\) that satisfy the requirements of \(h\) are deformable into oneanother. This is an interesting visualization, shown below:
We can now define loops as essentially paths that start and end at the same point i.e
\[L_p : \big \{ \gamma: [0,1] \rightarrow M \big \gamma(0) = \gamma(1) \big \}\]