Let $h:\mathbb R^m \to \mathbb R$ be a convex diifferentiable function and define $C_h := \{x \in \mathbb R^m \mid h(x) = 0\}$, assumed to be non-empty.
Question. Given $x \in \mathbb R^m$ such that $\nabla h(x) \ne 0$, is there any geometric interpretation of the quantity $\omega_h(x) := (h(x))_+/\|\nabla h(x)\|$ vis à vis the set $C_h$ ?
Motivation. In the linear case where $h(x) = v^Tx$ for some unit-vector $v \in \mathbb R^m$, one has
- $C_h = v^\perp$, the hyperplane perpendicular to $v$.
- $\|\nabla h(x)\| = \|v\| = 1$ for all $x \in \mathbb R^m$, and so $\omega_h(x) = (h(x))_+ = (v^Tx)_+$, which is the distance of $x$ from $C_h$.
Given a unit-vector $v \in \mathbb S_{m-1} := \{v \in \mathbb R^m \mid \|v\| = 1\}$, let $\mathscr L_v := \{x + tv \mid t \ge 0\} \subseteq \mathbb R^m$ be the ray generated by $v$ and starting at $x$. The distance of $x$ from $C_h$ can be written as $$ r_h(x) := d(x,C_h) := \inf_{x' \in C_h}\|x'-x\| = \inf_{v \in \mathbb S_{m-1}}\inf_{x' \in \mathscr L_v \cap C_h}\|x'-x\|. $$
Now, by definition, $x' \in \mathscr L_v \cap C_h$ if and only if there exists a time $t \in [0,\infty)$ such that $x' = x + tv$ and $h(x') = 0$. Thus, \begin{eqnarray} r_h(x) = \inf\{t \mid (v,t) \in \mathbb S_{m-1} \times [0,\infty),\; h(x + tv) = 0\}. \tag{1} \end{eqnarray}
The convex case
If $h$ is convex and differentiable, then for all $(v,t) \in \mathbb S_{m-1} \times [0,\infty)$ one has \begin{eqnarray*} \begin{split} h(x+tv) &\ge h(x) + t\nabla h(x)^Tv\ge h(x) - t\|\nabla h(x)\|,\\ -h(x+tv) &\le -h(x) - t\nabla h(x)^Tv \le -h(x) + t\|\nabla h(x)\|, \end{split} \end{eqnarray*} where we have used Cauchy-Schwarz to reach the final term of each chain of inequalities. Combining the above inequalities and (1) one computes \begin{eqnarray*} \begin{split} r_h(x) &\ge \inf\{t \ge 0 \mid h(x) - t\|\nabla h(x)\|\le 0\} = \frac{\max(h(x),0)}{\|\nabla h(x)\|},\\ r_h(x) &\ge \inf\{t \ge 0 \mid -h(x) + t\|\nabla h(x)\|\ge 0\} = \frac{\max(-h(x), 0)}{\|\nabla h(x)\|}, \end{split} \end{eqnarray*} We have thus proved
Lipschitz case
If we instead assume $h$ Lipschitz continuous (but not necessarily convex), then $|h(x + tv) - h(x)| \le Lt$ for all $(v,t) \in \S_{m-1} \times [0,\infty)$. Using (1), we may then compute \begin{eqnarray} \begin{split} r_h(x) &\ge \inf\{t \ge 0\mid h(x) - tL \ge 0\} = \frac{\max(h(x),0)}{L},\\ r_h(x) &\ge \inf\{t \ge 0\mid h(x) + tL \ge 0\} = \frac{\max(-h(x),0)}{L}. \end{split} \end{eqnarray} Putting things together, we get