# Subspace topology

In topology and related areas of mathematics, a subspace of a topological space (X, 𝜏) is a subset S of X which is equipped with a topology induced from that of 𝜏 called the subspace topology (or the relative topology, or the induced topology, or the trace topology).

## Definition

Given a topological space $(X,\tau )$ and a subset $S$ of $X$, the subspace topology on $S$ is defined by
    $\tau _{S}=\lbrace S\cap U\mid U\in \tau \rbrace .$
That is, a subset of $S$ is open in the subspace topology if and only if it is the intersection of $S$ with an open set in $(X,\tau )$. If $S$ is equipped with the subspace topology then it is a topological space in its own right, and is called a subspace of $(X,\tau )$. Subsets of topological spaces are usually assumed to be equipped with the subspace topology unless otherwise stated.
Alternatively we can define the subspace topology for a subset $S$ of $X$ as the coarsest topology for which the inclusion map
    $\iota :S\hookrightarrow X$
is continuous.
More generally, suppose $\iota$ is an injection from a set $S$ to a topological space $X$. Then the subspace topology on $S$ is defined as the coarsest topology for which $\iota$ is continuous. The open sets in this topology are precisely the ones of the form $\iota ^{-1}(U)$ for $U$ open in $X$. $S$ is then homeomorphic to its image in $X$ (also with the subspace topology) and $\iota$ is called a topological embedding.
A subspace $S$ is called an open subspace if the injection $\iota$ is an open map, i.e., if the forward image of an open set of $S$ is open in $X$. Likewise it is called a closed subspace if the injection $\iota$ is a closed map.

## Terminology

The distinction between a set and a topological space is often blurred notationally, for convenience, which can be a source of confusion when one first encounters these definitions. Thus, whenever $S$ is a subset of $X$, and $(X,\tau )$ is a topological space, then the unadorned symbols "$S$" and "$X$" can often be used to refer both to $S$ and $X$ considered as two subsets of $X$, and also to $(S,\tau _{S})$ and $(X,\tau )$ as the topological spaces, related as discussed above. So phrases such as "$S$ an open subspace of $X$" are used to mean that $(S,\tau _{S})$ is an open subspace of $(X,\tau )$, in the sense used above; that is: (i) $S\in \tau$; and (ii) $S$ is considered to be endowed with the subspace topology.

## Examples

In the following, $\mathbb {R}$ represents the real numbers with their usual topology.
* The subspace topology of the natural numbers, as a subspace of $\mathbb {R}$, is the discrete topology.
* The rational numbers $\mathbb {Q}$ considered as a subspace of $\mathbb {R}$ do not have the discrete topology ({0} for example is not an open set in $\mathbb {Q}$ because there is no open subset of $\mathbb {R}$ whose intersection with $\mathbb {Q}$ can result in only the singleton {0}). If a and b are rational, then the intervals (a, b) and [a, b] are respectively open and closed, but if a and b are irrational, then the set of all rational x with a < x < b is both open and closed.
* The set [0,1] as a subspace of $\mathbb {R}$ is both open and closed, whereas as a subset of $\mathbb {R}$ it is only closed.
* As a subspace of $\mathbb {R}$, [0, 1] ∪ [2, 3] is composed of two disjoint open subsets (which happen also to be closed), and is therefore a disconnected space.
* Let S = [0, 1) be a subspace of the real line $\mathbb {R}$. Then [0, 1⁄2) is open in S but not in $\mathbb {R}$ (as for example the intersection between (-1⁄2, 1⁄2) and S results in [0, 1⁄2)). Likewise [1⁄2, 1) is closed in S but not in $\mathbb {R}$ (as there is no open subset of $\mathbb {R}$ that can intersect with [0, 1) to result in [1⁄2, 1)). S is both open and closed as a subset of itself but not as a subset of $\mathbb {R}$.

## Properties

The subspace topology has the following characteristic property. Let $Y$ be a subspace of $X$ and let $i:Y\to X$ be the inclusion map. Then for any topological space $Z$ a map $f:Z\to Y$ is continuous if and only if the composite map $i\circ f$ is continuous.
This property is characteristic in the sense that it can be used to define the subspace topology on $Y$.
We list some further properties of the subspace topology. In the following let $S$ be a subspace of $X$.
* If $f:X\to Y$ is continuous then the restriction to $S$ is continuous.
* If $f:X\to Y$ is continuous then $f:X\to f(X)$ is continuous.
* The closed sets in $S$ are precisely the intersections of $S$ with closed sets in $X$.
* If $A$ is a subspace of $S$ then $A$ is also a subspace of $X$ with the same topology. In other words the subspace topology that $A$ inherits from $S$ is the same as the one it inherits from $X$.
* Suppose $S$ is an open subspace of $X$ (so $S\in \tau$). Then a subset of $S$ is open in $S$ if and only if it is open in $X$.
* Suppose $S$ is a closed subspace of $X$ (so $X\setminus S\in \tau$). Then a subset of $S$ is closed in $S$ if and only if it is closed in $X$.
* If $B$ is a basis for $X$ then $B_{S}=\{U\cap S:U\in B\}$ is a basis for $S$.
* The topology induced on a subset of a metric space by restricting the metric to this subset coincides with subspace topology for this subset.

## Preservation of topological properties

If a topological space having some topological property implies its subspaces have that property, then we say the property is hereditary. If only closed subspaces must share the property we call it weakly hereditary.
* Every open and every closed subspace of a completely metrizable space is completely metrizable.
* Every open subspace of a Baire space is a Baire space.
* Every closed subspace of a compact space is compact.
* Being a Hausdorff space is hereditary.
* Being a normal space is weakly hereditary.
* Total boundedness is hereditary.
* Being totally disconnected is hereditary.
* First countability and second countability are hereditary.