First, suppose (*X*, *d*) is a metric space. If *Y* is a subset of *X*, then one can restrict the metric to , i.e. for any , we set *d’*(*y*, *y’*) := *d*(*y*, *y’*). It’s not hard to show that the resulting function is a metric on *Y*. The resulting pair (*Y*, *d’*) is called a **metric subspace** of (*X*, *d*).

The open subsets of *Y* are related to those of *X* as follows.

Proposition. A subset is open if and only if for some open .

**Proof**.

First note that if , then an open ball in *Y* is of the form:

- Suppose
*U*is open in*X*and*V*=*U*∩*Y*. Each is also in*U*, and so for some ε>0. Hence . So*V*is open in*Y*. - Conversely, let
*V*be open in*Y*. For each*a*in*V*, we have for some ε>0 depending on*a*. Take the union*U*of all such ; then*U*is open in*X*since it’s a union of open balls in*X*. Also

♦

**Exercise**

If *U* is an open ball in *X*, is *U* ∩ *Y* necessarily an open ball in *Y*?

[ Answer (highlight to read): no, consider *X*=**R** and *Y*=**R**-{0}. Then (-1, +1) is an open ball *N*(0, 1) in *X* but (-1, +1) ∩ *Y* is the disjoint union of (-1, 0) and (0, +1) which is not an open ball in *Y*. ]

This inspires us to extend the definition of subspaces to general topological spaces.

Definition. Let (X, T) be a topological space and Y be a subset of X. Thesubspace topologyon Y is defined by:i.e. is open if and only if it’s of the form V = U ∩ Y for some open subset U of X.

Equivalently, the class of closed subsets of *Y* is given by *D* = *Y* – (*U*∩*Y*) = (*X*–*U*) ∩ *Y* = *C* ∩ *Y* for some closed subset *C* of *X*.

**Examples**

- A subspace of (
*X*,*d*) with the discrete metric is still discrete. - Pick the half-open interval . Then is open in
*Y*but not open in**R**. - Consider the subset of the real line
**R**. The singleton set {0} is an open subset of*Y*since {0} =*N*(0, 1/2). Furthermore, it is closed since the complement is a union of two open subsets. - Consider the subset
**Z**of**R**under the usual metric. Then the resulting subspace is the discrete space even though the induced metric*d*(*m*,*n*) = |*m*–*n*| is not exactly the discrete metric. - Let and
*Y*be the set of points (*x*,*y*) satisfying . Geometrically,*Y*is a circle. Here, we’ll think of it as a topological space with the subspace topology inherited from*X*. The space is denoted . More generally, for each positive integer*n*, the space is the subspace of comprising of all points satisfying - Consider
*X*=**N**under the right order topology.- If
*Y*= {1, 2, 3}, then the subspace topology gives { (empty set), {3}, {2, 3},*Y*}. - If
*Y*is the set of even numbers, then the bijection preserves the structure of topological spaces. We say that the two spaces are**homeomorphic**. We will say more about this in a later article.

- If

Since we’re often dealing with multiple spaces and subspaces, when describing open/closed subsets, it’s essential to qualify with “(XX) is open/closed in (YY)” instead of merely saying “(XX) is open”. E.g. in example 2 above, *Y* = [0, 1) is a subspace of **R** and the subset [0, 1/2) is open in *Y* but not in **R**.

The following diagram illustrates some open subsets of *Y* in example 3.

**Exercises**

- Consider the subspace
*Y*= {1/*n*:*n*positive integer} of**R**, under the usual metric. Is this space discrete? What about ? - Example 2 gives us the concept of
**clopen subsets**, i.e. subsets of a topological space which are both open and closed. In any topological space*X*, and*X*are always clopen. Are there any other clopen subsets of**Q**, where**Q**inherits the subspace topology from**R**?

**Answers**

*Y*is discrete since each {1/*n*} = (1/*n*– ε, 1/*n*+ ε) ∩*Y*for some small ε>0. On the other hand*Y** is not discrete since any open subset containing 0 must also contain some 1/*n*.- Yes,
**Q**has infinitely (in fact, uncountably) many clopen subsets. If*r*is irrational, then (-∞,*r*) ∩**Q**and (*r*, ∞) ∩**Q**form a disjoint union of**Q**by open subsets.

## Basic Properties of Subspaces

The following basic property is often taken for granted.

Theorem. If (X, T) is a topological space and are subsets, then we can form the subspace topology on Z in two ways:

- by taking the subspace topology from ; and
- by taking successive subspaces which is a topology on Y, then .
The two topologies are identical.

The proof is straightforward: in the first case, the class of all open subsets of *Z* is given by *U* ∩ *Z* for open subsets *U* of *X*; in the second case, the class is given by (*U* ∩ *Y*) ∩ *Z* = *U* ∩ *Z* for open subsets *U* of *X*. They’re identical. ♦

The following properties are also surprisingly useful in practice.

Theorem. Let Y be a subspace of (X, T). If Y is open in X, then any open subset of Y is an open subset of X. If Y is closed in X, then any closed subset of Y is a closed subset of X.

**Proof**.

For the first statement, an open subset of *Y* is of the form *V* = *U* ∩ *Y* for some open subset *U* of *X*. Since *U* and *Y* are both open in *X*, so is *V* = *U* ∩ *Y*. The same proof holds for the second statement by replacing ‘open’ with ‘closed’. ♦

Furthermore, for bases and subbases, we have:

Theorem. Let be a topological space with subspace .

- If B is a basis for T, then is a basis for Y.
- If S is a subbasis for T, then is a subbasis for Y.

**Proof**.

For the first statement, we first verify that is indeed a basis of some topology over *Y*:

- Any two elements of are of the form for some basic open subsets . Since
*B*is a basis, for some . This gives which is a union of elements in .

Finally, we need to show generates the topology .

- Every element (for some element
*U*in*B*) is open in*Y*by definition. So . - Conversely, any element of is of the form for some open subset
*U*of*X*. Since*B*is a basis for (*X*,*T*), for some . So which is a union of elements in .

This concludes the proof for the first statement.

For the second, suppose the intersections of finitely many elements of *S* form basis *B*. It suffices to show that the intersections of finitely many elements of form basis .

- In one direction, note that .
- Conversely, any element of is of the form
*U*∩*Y*for some . So for finitely many . But this gives for finitely many .

And the proof is complete. ♦

Summary.

- Any subset of a topological space X inherits a topology from it. The inheritance is consistent across inclusion chains of topological spaces.
- With spaces and subspaces, one should be more careful when talking about “open sets”, i.e. mention what it’s open in.
- If Y is open (resp. closed) in X and Z is open (resp. closed) in Y, then Z is open (resp. closed) in X.
- If Y is a subspace of X, then a basis (resp. subbasis) of X restrict to give a basis (resp. subbasis) of Y.