# Embeddings in topology

In topology, an **embedding** is a continuous and injective function \( f: X \rightarrow Y \) between two topological spaces \( X \) and \( Y \), such that \( f \) induces a homeomorphism between \( X \) and its image \( f(X) \), where \( f(X) \) is given the subspace topology from \( Y \).

This means an embedding has three key properties:

- The function \( f \) is continuous.
- The function \( f \) is injective, meaning no two distinct points in \( X \) are mapped to the same point in \( Y \).
- The inverse of \( f \), seen as a function from \( f(X) \) to \( X \), is continuous with respect to the subspace topology on \( f(X) \)

In other words, an embedding preserves the topological structure of \( X \) within its image \( f(X) \) in \( Y \), allowing \( f(X) \) to be viewed as a subspace of \( Y \), i.e., \( f(X) \subset Y \).

## A practical example

Let’s define two topological spaces:

**Space \( X \)**

The set \( X = \{a, b, c\} \) with the topology \( \mathcal{T}_X = \{\emptyset, \{a\}, \{a, b\}, X\} \), which defines the open sets in \( X \).**Space \( Y \)**

The set \( Y = \{1, 2, 3, 4\} \) with the topology \( \mathcal{T}_Y = \{\emptyset, \{1\}, \{1, 2\}, \{1, 2, 3\}, Y\} \), which defines the open sets in \( Y \).

Now, define a function \( f: X \rightarrow Y \) as follows:

$$ f(a) = 1 \\ f(b) = 2 \\ f(c) = 3 $$

Next, let’s check if \( f \) satisfies the conditions for an embedding.

**1] Continuity of \( f \)**

A function \( f: X \rightarrow Y \) is continuous (see the definition of continuity with open sets) if the preimage of every open set in \( Y \) is an open set in \( X \), meaning the preimage belongs to the topology \( \mathcal{T}_X \).

- \( f^{-1}(\emptyset) = \emptyset \in \mathcal{T}_X \), which is open in \( X \).
- \( f^{-1}(\{1\}) = \{a\} \in \mathcal{T}_X \), which is open in \( X \).
- \( f^{-1}(\{1, 2\}) = \{a, b\} \in \mathcal{T}_X \), which is open in \( X \).
- \( f^{-1}(\{1, 2, 3\}) = X \in \mathcal{T}_X \), which is open in \( X \).
- \( f^{-1}(Y) = X \in \mathcal{T}_X \), which is open in \( X \).

Since the preimage of every open set in \( \mathcal{T}_Y \) is open in \( \mathcal{T}_X \), the function \( f \) is continuous.

**2] Injectivity**

The function \( f \) is injective because it maps each element of \( X \) to a distinct element in \( Y \).

$$ f(a) = 1 \\ f(b) = 2 \\ f(c) = 3 $$

**3] Continuity of the inverse**

Next, consider the image of \( f \), which is \( f(X) = \{1, 2, 3\} \subset Y \).

The **subspace topology** on \( f(X) \) is \( \mathcal{T}_{f(X)} = \{\emptyset, \{1\}, \{1, 2\}, \{1, 2, 3\}\} \).

**Note**. The subspace topology on a subset of a topological space is defined as the collection of all sets that are intersections of open sets from the original space with the subset. In this case:

- The space \( Y = \{1, 2, 3, 4\} \) has the topology \( \mathcal{T}_Y = \{\emptyset, \{1\}, \{1, 2\}, \{1, 2, 3\}, \{1, 2, 3, 4\}\} \).
- The image of \( f(X) \) is \( f(X) = \{1, 2, 3\} \subset Y \).

The possible intersections are:

- \( \emptyset \cap \{1, 2, 3\} = \emptyset \)
- \( \{1\} \cap \{1, 2, 3\} = \{1\} \)
- \( \{1, 2\} \cap \{1, 2, 3\} = \{1, 2\} \)
- \( \{1, 2, 3\} \cap \{1, 2, 3\} = \{1, 2, 3\} \)
- \( \{1, 2, 3, 4\} \cap \{1, 2, 3\} = \{1, 2, 3\} \) (which coincides with the previous set)

Therefore, the subspace topology \( \mathcal{T}_{f(X)} \) is: $$ \mathcal{T}_{f(X)} = \{\emptyset, \{1\}, \{1, 2\}, \{1, 2, 3\} \} $$

To check the continuity of the inverse restricted to the image \( f^{-1}: f(X) \rightarrow X \), we need to verify that the preimage of each open set in \( \mathcal{T}_X \) is open in the subspace topology \( \mathcal{T}_{f(X)} \).

- \( \emptyset \) is open in \( \mathcal{T}_X \), and its preimage under \( f^{-1} \) is \( \emptyset \), which is open in \( \mathcal{T}_{f(X)} \).
- \( \{a\} \) is open in \( \mathcal{T}_X \), and its preimage under \( f^{-1} \) is \( \{1\} \), which is open in \( \mathcal{T}_{f(X)} \).
- \( \{a, b\} \) is open in \( \mathcal{T}_X \), and its preimage under \( f^{-1} \) is \( \{1, 2\} \), which is open in \( \mathcal{T}_{f(X)} \).
- \( X \) is open in \( \mathcal{T}_X \), and its preimage under \( f^{-1} \) is \( \{1, 2, 3\} \), which is open in \( \mathcal{T}_{f(X)} \).

Thus, the inverse function \( f^{-1} \) restricted to the image \( f(X) \) is continuous.

In conclusion, **the function \( f \) is an embedding between \( X \) and \( f(X) \)** because it is continuous, injective, and its inverse, restricted to the image \( f(X) \), is continuous.

Even though the image of \( X \) under \( f \) (\( \{1, 2, 3\} \)) does not cover all of \( Y \), it preserves the topological structure of \( X \) within its image.

## The difference between an embedding and a homeomorphism

The difference between an embedding and a homeomorphism lies in the domain, the image of the function, and how they preserve the topological structure.

**Homeomorphism**

A homeomorphism is a bijective function that maps \( X \) onto \( Y \), preserving the topological structure of both spaces entirely.**Embedding**

An embedding is a function that maps \( X \) into \( Y \) in such a way that the topological structure of \( X \) is preserved, but only within the image \( f(X) \), which is a subspace of \( Y \).

In other words, while a homeomorphism implies a full one-to-one correspondence between two spaces, an embedding only ensures that \( X \) corresponds to a subspace of \( Y \), with the structure of \( X \) preserved within that subspace \( X \subset Y \).

And so on...