Closest line to point after non-linear map

47 Views Asked by At

I have a map on a vector space $M(\vec{r})$, defined as below. All components (vectors, matrices, everything) are reals in the unit range $[0,1]$.

The map $M(\vec r)$ is defined as the sum of an infinite sequence, and ends:

$$M(\vec r) = \matrix{R}(\matrix{I} - \matrix{A} + \matrix{A}\matrix{R})^{-1}\vec{k}$$ $$\text{where} \matrix{R} = \begin{pmatrix}r_0 \\ & \ddots \\ && r_n \end{pmatrix}$$

for some constant vector $\vec k$ and matrix $\matrix A$. This expression came from summing the infinite sequence: $m_i = R{(A(I - R))^i}k$

The problem

I want to somehow find the input vector $\vec r$ such that the line $l(t) = t\matrix{M}(\vec r)$ passes as close as possible to a target vector $\vec{x}$.

In fact, I'm not even interested in $\vec r$, I'm only really interested in the line (or rather, the closest point on the line to $\vec x$).

I have no idea how to do this!

(My fallback numerical solution is to start at $\vec{r} = [1, 1, ...]$ and try hillwalking - which might not find the closest point but makes sense in context - but I'd much prefer there to be a closed-form solution.)


EDIT: the target point $\vec x$ is always guaranteed to line on the plane $Z$ defined by $\vec{v} \cdot \vec{z} = \vec{z} \cdot \vec{z}$. It's also acceptable to replace the distance metric by "distance on the plane Z", and to select $\vec z$ and $\vec x$ such that $\vec z$ is a unit vector.

This would change the "nearest line to point" part to minimising the metric:

$$d(a) = \frac{a \cdot a}{(a \cdot z)^2} - 2\frac{a \cdot x}{a \cdot z}$$

This is in some ways a better metric to be using (in terms of the underlying problem) but I don't know if it helps solve the problem.