Let $K$ be a compact subset of $\mathbb{R}^n$ (for simplicity, I am happy to take $K=\overline{B(0,1)}$ for now if it is easier).


Let $f:K \rightarrow \mathbb{R}^m$ be a **continuous** function.


Is there a **new metric** $d$ on $\mathbb{R}^m$ (compatible with the topology) such that
$$ f: K \rightarrow (\mathbb{R}^m,d) $$
is **Lipschitz**?


(Here $K$ is still equipped with the usual Euclidean metric, and only the metric on the target space $\mathbb{R}^m$ has changed.)


If not,


* What are obstructions?
* Are there sufficient conditions?



Recognizing Lipschitz functions up to change of target metric
It can't be done. Here's a counterexample with $n = 2$ and $m = 1$.


For each $k \in \mathbb{N}$, define a function $f\_k: [0,1] \to [0,1]$ by linearly interpolating between the values $f\_k(\frac{i}{k}) = \frac{i}{k}$ ($0 \leq i \leq k$) and $f\_k(\frac{i}{k} + \frac{1}{k^2}) = \frac{i+1}{k}$ ($0 \leq i \leq k -1$). They look like staircases.


I claim there is no metric on the target $[0,1]$ that makes all of the $f\_k$ contractions. If $f\_k$ is a contraction this forces the distance from $\frac{i}{k}$ to $\frac{i+1}{k}$ to be at most $\frac{1}{k^2}$, and thus the distance from $0$ to $1$ to be at most $\frac{1}{k}$. If this were true for all $k$ then the distance from $0$ to $1$ would have to be zero and the metric would not be compatible with the topology.


Now define $f(t,\frac{1}{k}) = f\_k(t)$ for all $k$ and $f(t,0) = t$. Then $f$ is a continuous function defined on a compact subset of $[0,1]^2$, so by Tietze it extends to a continuous function from the unit square to $[0,1]$. If there were a change of metric on the target $[0,1]$ that made $f$ Lipschitz then by scaling there would be a change of metric that made $f$ a contraction, and this would make each $f\_k$ a contraction, contradicting the claim.


