2D Euclidian Space:

Problem: given a vector $(a,b)$ and a vector $(x,y)$, find the smallest $(\delta x, \delta y)$ such that $(a,b) \cdot ((x,y) + (\delta x,\delta y)) = 0$
Lagrangian multipliers
Let $\phi(\delta x, \delta y) = \delta x^2 + \delta y^2$ be the displacement of our vector, which we want to minimize.
subject to constraint $a (x + \delta x) + b ( y + \delta y) = 0$
Let $\mu(\delta x, \delta y) = (a,b) \cdot ((x,y) + (\delta x, \delta y)) = a (x + \delta x) + b (y + \delta y)$ be the constraint function subject to $\mu = 0$
First solve for $\nabla \phi = 0$:
$\nabla \phi = (\frac{\partial}{\partial \delta x}, \frac{\partial}{\partial \delta y}) \phi = 2 (\delta x, \delta y)$
So $\nabla \phi = 0$ only for $(\delta x, \delta y) = (0,0)$, which only occurs on our domain when $a x + b y = 0$, which is only true if our constraint is already solved.
Next solve for $\nabla \phi = \lambda \nabla \mu$
$\nabla \mu = (\frac{\partial}{\partial \delta x}, \frac{\partial}{\partial \delta y}) \mu = (a, b)$
$\lambda \nabla \mu = \nabla \phi$ for
$\lambda (a, b) = 2 (\delta x, \delta y)$
$(\delta x, \delta y) = \frac{1}{2} \lambda (a, b)$
subject to our constraint $a (x + \delta x) + b (y + \delta y) = 0$
substitute ...
$a (x + \frac{1}{2} \lambda a) + b (y + \frac{1}{2} \lambda b) = 0$
$a x + b y + \frac{1}{2} \lambda (a^2 + b^2) = 0$
$\lambda = -2 \frac{a x + b y}{a^2 + b^2}$
substitute some more...
$(\delta x, \delta y) = \frac{1}{2} (-2 (a x + b y) / (a^2 + b^2)) (a, b)$
$(\delta x, \delta y) = -\frac{a x + b y}{a^2 + b^2} (a, b) = -\frac{(a,b) \cdot (x,y)}{(a,b) \cdot (a,b)} (a,b)$
$(x + \delta x, y + \delta y) = (x,y) - \frac{(a,b) \cdot (x,y)}{(a,b) \cdot (a,b)} (a,b)$

arbitrary metric, minimize Euclidian L2-norm displacement:

Given a vector $a^u$ and vector $b^u$, find the smallest $\delta^u$ such that $a_u (b^u + \delta^u) = 0$
Let $\phi = \delta^2 = (\delta^a)^2 + (\delta^b)^2$ be the Euclidian distance we want to minimize.
So if we have a graph of isobars of the metric, we are going to project to th closest point on this graph, which means a L2 Euclidian norm.
I should try doing the same with the same metric later ... or any other metric? Separate displacement metric and separate inner product metric?
Let $\mu = a_u (b^u + \delta^u) = a^u (b^v + \delta^v) g_{uv}$
Subject to $\mu = 0$
$\nabla_u \phi = \frac{\partial}{\partial \delta^u} \phi = 2 \delta^u$ notice, because we're using the Euclidian L2 norm, we end up breaking index gymnastic rules.
$\nabla_u \phi = 0$ for $\delta^u = 0$
$\nabla_u \mu = \frac{\partial}{\partial \delta^u} \mu = a_u$
$\nabla_u \phi = \lambda \nabla_u \mu$ for
$2 \delta^u = \lambda a_u$ broken index gymnastics
$\delta^u = \frac{1}{2} \lambda a_u$
subject to our constraint $\mu = 0$
$a_u (b^u + \delta^u) = 0$
$\underset{u}{\Sigma} a_u (b^u + \frac{1}{2} \lambda a_u) = 0$ more broken index gymnastics
$a_u b^u + \frac{1}{2} \lambda \underset{u}{\Sigma} (a_u)^2 = 0$
$\lambda = -2 \frac{a_u b^u}{\underset{u}{\Sigma} (a_u)^2}$
substitute some more...
$\delta^u = \frac{1}{2} (-2 \frac{a_u b^u}{\underset{u}{\Sigma} (a_u)^2}) a_u$
$\delta^u = (-\frac{a_u b^u}{\underset{u}{\Sigma} (a_u)^2}) a_u$

separate metric of inner product and of norm to minimize:

Given vector $a^u$ and vector $b^u$, find smallest $\delta^u$ such that $a^u (b^v + \delta^v) g_{uv} = 0$ so that $g_{uv}$ is the metric of the inner product.
Let $\phi = \delta^u \delta^v h_{uv}$ so that $h_{uv}$ is the metric of the norm to minimize with respect to.
Let $\mu = a^u (b^v + \delta^v) g_{uv}$ subject to $\mu = 0$
$\nabla_u \phi = \frac{\partial}{\partial \delta^u} \phi = 2 \delta^v h_{uv}$
$\nabla_u \phi = 0$ for $\delta^v$ in the nullspace of $h_{uv}$.
If this is the case then our minimization of $\delta^u$ is already satisfied... but our inner product constraint may not be ...
which means for $h_{uv}$ with nullspace that I must now consider a separate case of solutions.
TODO
Otherwise, for invertible $h_{ab}$ such that $h_{ac} h^{cb} = \delta^b_a$, let's look at solutions that lie along $\nabla_u \mu = 0$
$\nabla_u \mu = \frac{\partial}{\partial \delta^u} \mu = a^v g_{uv}$
$\nabla_u \phi = \lambda \nabla_u \mu$ for
$2 \delta^v h_{uv} = \lambda a^v g_{uv}$
$\delta^u = \frac{1}{2} \lambda a^a g_{ab} h^{bu}$
subject to our constraint $\mu = 0$
$a^u (b^v + \delta^v) g_{uv} = 0$
$a^u (b^v + \frac{1}{2} \lambda a^a g_{ab} h^{bv}) g_{uv} = 0$
$a^u g_{uv} b^v + \frac{1}{2} \lambda a^a g_{ab} h^{bv} g_{uv} a^u = 0$
$\lambda = -2 \frac{a^v g_{vw} b^w}{a^c g_{cd} h^{de} g_{ef} a^f}$
substitute some more...
$\delta^u = \frac{1}{2} \lambda a^a g_{ab} h^{bu}$
$\delta^u = \frac{1}{2} (-2 \frac{a^v g_{vw} b^w}{a^c g_{cd} h^{de} g_{ef} a^f}) \cdot a^a g_{ab} h^{bu}$
$\delta^u = -\frac{a^v g_{vw} b^w}{a^c g_{cd} h^{de} g_{ef} a^f} a^a g_{ab} h^{bu}$