Compactification in String Theory and Compactification in Topology are they the same thing? In topology, there is a concept of compactification which is defined as follows.
A space $Z$ is a compactification of $X$ if $Z$ is compact Hausdorff and there exists an
embedding $j:X \rightarrow Z $ such that $\overline{j(X)} = Z$.
I would like to know if the compactification in String theory is the same compactification defined in topology.
 A: No, different concepts.
The compactification in string theory is the process of taking a theory with extra infinitely extended dimensions (w.r.t. the canonical 3+1 dimensions) and modifying it so that the extra dimensions are finite.
Intuitively, compactness in topology does not refer to the size of a space, but to properties of not having "gaps" or "missing endpoints". In particular a compact space may very well extend infinitely, for instance the real line including the endpoints $+\infty$, $-\infty$.
A: I don't know much about compactification in string theory, but the idea is based on the compactification in (4+1) D Kaluza-Klein theory, proposed in the years after the theory of general relativity was published to unite gravity and electromagnetism. (The weak and strong interaction were not discovered yet.)
The idea proposed by Kaluza was to generalize the metric tensor to five dimensions to add the electromagnetic vector potential as the components of the fifth dimension.
The idea proposed by Klein was that this dimension cannot be observed because it is compactified and here we have the connection to the topological one-point or Alexandroff compactification: $\mathbb{R}$ can be mapped to $\mathbb{S}^1\setminus\{*\}$ by the stereographic projection (which is your map $j$) and then be compactified to $\mathbb{S}^1$ by adding the missing point. Spacetime is therefore not $\mathbb{R}^{1,4}$, but $\mathbb{R}^{1,3}\times\mathbb{S}^1$, the same topological space as the Anti-deSitter space $\operatorname{AdS}_5$.
The extension of this extra dimension curled up is described by another scalar field $\phi$ added to the theory and so small, that only microscopic objects can observe it. (Just like a rope looks like a one-dimensional line to us, but has a two-dimensional surface to an ant.) Electric charge for example can be described as the velocity of the particle along the curled up fifth dimension, but is far above that of light so the theory failed.
Decades later, string theory reused the idea again to compactify even more dimensions using six-dimensional Calabi-Yau manifolds to reduce the dimensions from ten to four.
