# What does it mean to say that a set is equipped with a function?

While reading a book on general topology I found the definition of a metric space as follows.

"A metric space (X,d) is a set X equipped with a metric d on X"

What exactly does it mean to say that a set is equipped with a function?

-

It's just a conventional choice of words. It means that the set $X$ is a metric space when you think of it together with the metric.

Formally, a metric space is the combination of $X$ with the metric, and if you change the metric you get a different metric space even though $X$ may stay the same.

The conventional way of speech is useful because there are many common cases where there's only one metric under consideration for each $X$ -- then it is convenient to be able to speak about "a subset of the metric space $X$" where for full formal completeness one must otherwise have said "a subset of the underlying set of the metric space $M$", which would be more wordy without really adding any information that's interesting in context.

-

It just means that $d$ is a metric on $X$. One could just as well say that a metric space $\langle X,d\rangle$ is a set $X$ together with a metric $d$ on $X$, or that a metric space is an ordered pair whose first component is a set and whose second component is a metric on that set. Of course all of these versions presuppose that the reader already knows what it means for a function $d$ to be a metric on $X$:

1. $d:X\times X\to\Bbb R$;
2. $d(x,y)\ge 0$ for all $x,y\in X$, with equality iff $x=y$;
3. $d(x,y)=d(y,x)$ for all $x,y\in X$; and
4. $d(x,y)\le d(x,z)+d(z,y)$ for all $x,y,z\in X$.
-
Metric space is the pair of set $X$ and some function $d\colon X\times X \rightarrow \mathbb{R}$. Function $d$ must satisfy metric axioms. We may define on $X$ different metrics, so obtain different metric spaсes.