Metric
The most fundamental idea in single variable calculus, on which other ideas such as derivatives and integrals depend, is the notion of a limit. A limit is an expression of tolerance, which conditions must one impose in order to be within a certain distance of the limit. As such, one needs a notion of distance to define such ideas.
On the real number line this is easy, the distance between
The idea of a metric is to work out which are the fundamental properties of a distance function that make it useful for the sake of limits, and generalise it so that these ideas from calculus can be applied to more exotic sets.
A metric, or distance function is a function
In fact, the first property is not necessary in the definition because
yet it is often included because it is a key part of the intuition of what a metric should be.
There is a close relationship between the definition of a metric and a vector space norm.