# Is there a term for the opposite of an interpolation?

The question is specifically about linear Interpolation, which is usually defined to be a function $$f : V \times V \times \mathbb{R} \rightarrow V \\ f(v_0,v_1,\alpha) = v_0 + (v_1-v_0) \cdot \alpha$$ So it takes the arguments $$v_0$$ and $$v_1$$ and a real value $$\alpha$$ (often, but not necessarily, in $$[0,1]$$), and computes the linearly interpolated value.

Conversely, there may be a function like this: $$g : V \times V \times V \rightarrow \mathbb{R} \\ g(v_0,v,v_1) = (v - v_0) / (v_1 - v_0)$$ For the given arguments, it computes the "relative position" of one element between the others - namely, the value that could be used as the $$\alpha$$ value in the interpolation function, so that $$f(v_0, v_1, g(v_0, v, v_1)) = v$$.

It's not an "inverse", and the term "opposite" in the title was just for lack of a better term. Right now, I'm calling it ~"interpolation parameter function", but I wonder whether there is a commonly used term for that.

• I don't feel confident that this is the best description, and it probably couldn't be used without explanation, but I might describe that as a barycentric coordinate. Edit: wait, I assumed $v$ had to be on the line containing the other two (the affine span of them). – Mark S. Mar 13 at 21:11
• It is in fact an inverse after you "curry" your functions in the right way. Namely $g(v_0,\cdot,v_1)$ is an inverse of $f(v_0,v_1,\cdot)$. – Ian Mar 13 at 21:12
• @MarkS. That's indeed pretty close already (and I wonder why I didn't think of this yet). The fact that barycentric coordinates are mainly interpreted geometrically means that it does not fit perfectly in the most generic sense, but if nobody posts a better answer in the next days, I'd probably ping you to turn the comment into an answer and accept it as being "as close as it gets". – Marco13 Mar 13 at 21:22
• @Ian Yes, it can be boiled down to an inverse, but would require an additional description then - basically, some "verbal un-currying". Just calling it the "inverse of the interpolation" would not be sufficient, I guess... – Marco13 Mar 13 at 21:23
• @MarkS. Regarding the edit: I don't think that being contained in the simplex is a necessary condition for computing the barycentric coordinates, so this should not be a problem. – Marco13 Mar 13 at 21:25

As in the question, given a real vector space $$V$$, we can define a function for parametrizing lines between vectors by $$f : V \times V \times \mathbb{R} \rightarrow V \\ f(\mathbf v_0,\mathbf v_1,\alpha) = \mathbf v_0 + (\mathbf v_1-\mathbf v_0) \cdot \alpha\text{.}$$
If $$\mathbf v_0\ne\mathbf v_1$$, then $$\alpha\mapsto f(\mathbf v_0,\mathbf v_1,\alpha)$$ certainly defines an injective function $$\mathbb R\to V$$, with image line $$\overleftrightarrow{\mathbf v_0\mathbf v_1}$$. Thus, we can define a bijective function $$F_{\mathbf v_0,\mathbf v_1}:\mathbb R\to \overleftrightarrow{\mathbf v_0\mathbf v_1}$$.
The inverse is given by $$F_{\mathbf v_0,\mathbf v_1}^{-1}:\mathbf v\mapsto\dfrac{\mathbf v-\mathbf v_0}{\mathbf v_1-\mathbf v_0}$$, where the division is to be interpreted as yielding the relevant scalar multiple, as mentioned in this MSE answer. This inverse could be described as providing the barycentric coordinate for the input point on the line $$\overleftrightarrow{\mathbf v_0\mathbf v_1}$$ with respect to the affine basis $$(\mathbf v_0,\mathbf v_1)$$.
As alluded to in the original post, we could combine these inverses together as a single function, though writing the domain properly is a bit cumbersome. We could define $$g:\left\{(\mathbf v_0,\mathbf v,\mathbf v_1)\left|\mathbf v_0\ne\mathbf v_1\text{ and } \mathbf v\in\overleftrightarrow{\mathbf v_0\mathbf v_1}\right.\right\}\to \mathbb R$$ $$g(\mathbf v_0,\mathbf v,\mathbf v_1)= F_{\mathbf v_0,\mathbf v_1}^{-1}(\mathbf v)\text{.}$$