What operations is a metric closed under? Suppose $X$ is a set with a metric $d: X \times X \rightarrow \mathbb{R}$. What "operations" on $d$ will yield a metric in return?
By this I mean a wide variety of things. For example, what functions $g: \mathbb{R} \rightarrow \mathbb{R}$ will make $g \circ d$ into a metric, for example $g \circ d = \sqrt{d}$. Or what functions of metrics will yield metrics in return, for example $d_1 + d_2$, where $d_1$ and $d_2$ are distinct metrics on $X$.
I'm looking for a list of such operations, and counterexamples of ones which plausibly seem like they could define a metric but do not.
 A: A common example is $\rho(x,y) = \frac{d(x,y)}{1+d(x,y)}$, so $g$ in this case is the function $\frac{x}{1+x}$.
A: I am not sure if this answer is specific enough for the OP, but I am not sure there is a specific answer to this question. 
Most constructions that transform a single old metric into a new one can be generalized via subadditive functions. More specifically,

Suppose $g : [0, \infty) \to [0, \infty)$ is such that:
  
  
*
  
*$g$ is monotone increasing in $[0,\infty)$;
  
*$g(t) > 0$ for $t > 0$ and $g(0)=0$; 
  
*$g$ is subadditive: $g(s+t) \leq g(s) + g(t)$ for all $s, t \geq 0$. 
  
  
  Then whenever $(X,d)$ is a metric space, then so is $(X, e)$ where $e = g \circ d$. 

In some common scenarios, $g$ happens to be strictly increasing in $[0, \infty)$, in which case the condition (2.) is automatically satisfied.
To prove the above proposition, just verify the definitions of a metric. Since this calculation is routine, I will verify only the most interesting property, namely triangle inequality:
$$e(x,z) = g(d(x,z)) \stackrel{?}{\leq} g(d(x,y)+d(y,z)) \stackrel{?}{\leq} g(d(x,y)) + g(d(y,z)) = e(x,y)+e(y,z) .$$
(Why do the inequalities marked with "?" hold?) 
Remark. In fact, we can say a bit more than the fact $e$ defines a metric on the space $X$. Assuming further that $g$ is continuous, the new metric $e$ is "equivalent" to $d$ (in the sense that they generate the same topologies). 

Here are some commonly used examples of $g$:


*

*$g(t) = t^p$ for any $p \in (0,1]$.

*$g(t) = \min \{t,1 \}$.

*$g(t) = \frac{t}{t+1}$. 
Notice that in the second and third examples, $g$ is a bounded function. In fact, these are standard examples used to show that every metric $d$ is, in fact, topologically equivalent to a bounded metric. (In particular, boundedness of a metric is not a topological property.) 
A: $\sqrt{d_1^2+d_2^2}$ is a metric.
In general, if $\|\cdot\|$ is any norm on $\mathbb{R}^n$ and $(d_j)_{1\leq j\leq n}$ are $n$ metrics on $X$, then 
$$\tilde{d}(x,y)=\| (d_j(x,y))_{1\leq j\leq n}\|$$ defines a metric on $X$ as well.
A: One result is that if $(X,d)$ and $(Y,e)$ are metric spaces and if $F:X\to Y$ is continuous then $$d'(x,x')=d(x,x')+e(F(x),F(x'))$$ is a metric on $X$ equivalent to $d. $That is, $d$ and $d'$ generate the same topology on $X.$
This can be useful, especially with $Y=\Bbb R$ and $e(y,y')=|y-y'|.$
For example suppose $(X,d)$ is not compact. Then $X$ has a countably infinite closed discrete subspace $U.$ (Not all non-compact spaces have this property but non-compact metric spaces do.) We can build a continuous $F:X\to \Bbb R$ such that $\{F(u):u\in  U\}$ is unbounded in $\Bbb R.$ So there is an equivalent unbounded metric $d'(x,x')=d(x,x')+|F(x)-F(x')|$ on $X.$ This is the converse to "If $(X,d)$ is a compact metric space then any metric on $X$ that is equivalent to $d$ is bounded." 
