The Cantor set may be considered a topological space, homeomorphic to a product of countably many copies of a two-point space with the discrete topology. It is thus compact. It may be realised as the space of binary sequences
in which the open sets are generated by the cylinders, of the form
where s is a given binary sequence of length k.
The topology on the countable product of the two-point space D is induced by the metric
where is the discrete metric on D.
The Cantor set is a complete metric space with respect to d.
Embedding in the unit interval
The Cantor set may be embedded in the unit interval by the map
which is a homeomorphism onto the subset of the unit interval obtained by iteratively deleting the middle third of each interval. As a subset of the unit interval it is closed, nowhere dense, perfect and dense-in-itself. It has Lebesgue measure zero.