Metric is jointly continuous

Statement
Let $$(X,d)$$ be a metric space. Then $$X$$ is also a topological space in the induced topology, and we can consider the metric as a map of topological spaces $$d:X \times X \to \R$$. This map is jointly continuous, i.e. it is continuous from $$X \times X$$ given the product topology.

Proof
It suffices to show that inverse images of open subsets of the form $$(-\infty,a)$$ and $$(b,\infty)$$ are open subsets of $$X \times X$$. We will use the triangle inequality to prove this.