Convex Combinations as Lines

The locus defined by a convex combination of two points is the line between them. I provide some geometric intuition for this fact and then prove it.

The locus of all convex combinations of two points is the line between them. This is easy to visualize in two dimensions. Consider the linear equation

y(x)=mx+b(1) y(x) = mx + b \tag{1}

where mm is the slope of the line and bb is the bias or yy-intercept. We can rewrite this as

y(x)=mx+b=x[m+bb]+b=x(m+b)+(1x)b.(2) \begin{aligned} y(x) &= mx + b \\ &= x [m + b - b] + b \\ &= x (m + b) + (1 - x) b. \end{aligned} \tag{2}

This equation is a linear combination of two points, (0,b)(0, b) and (1,m+b)(1, m+b). When 0x10 \leq x \leq 1, the equation is a convex combination of the two points and defines a line between them. When x0x \leq 0, the equation traces a line to the left of (0,b)(0, b). When x1x \geq 1, the equation traces a line to the right of (1,m+b)(1, m+b) (Figure 11).

Figure 1. The line y(x)=x(m+b)+(1x)by(x) = x (m + b) + (1 - x) b is a linear combination of the points (0,b)(0, b) and (1,m+b)(1, m+b).

We can extend this visualization to arbitrary dimensions. Consider a vector y(x)\mathbf{y}(x) that is the convex combination of two vectors d\mathbf{d} and b\mathbf{b}:

y(x)=xd+(1x)b,0x0.(3) \mathbf{y}(x) = x \mathbf{d} + (1-x) \mathbf{b}, \qquad 0 \leq x \leq 0. \tag{3}

We could visualize this as vector addition. As xx varies between zero and one, the two vectors xdx \mathbf{d} and (1x)b(1-x) \mathbf{b} add to produce a new vector y(x)\mathbf{y}(x) (Figure 22).

Figure 2. The line y(x)\mathbf{y}(x) defined as a convex combination of b\mathbf{b} and d\mathbf{d}.

Another way to visualize this is to use Equation 11. Let’s rewrite Equation 33 as

y(x)=xd+(1x)b=xd+(1x)b+xbxb=x(db)+b.(4) \begin{aligned} \mathbf{y}(x) &= x \mathbf{d} + (1-x) \mathbf{b} \\ &= x \mathbf{d} + (1-x) \mathbf{b} + x \mathbf{b} - x \mathbf{b} \\ &= x (\mathbf{d} - \mathbf{b}) + \mathbf{b}. \end{aligned} \tag{4}

(Clearly, a vector m\mathbf{m} could be defined as mdb\mathbf{m} \triangleq \mathbf{d} - \mathbf{b}.) Now we can think of y(x)\mathbf{y}(x) as simply a fraction of the vector subtraction db\mathbf{d} - \mathbf{b} plus b\mathbf{b} (Figure 33). While Figure 33 is not a proof, I think it provides useful intuition: as xx ranges between zero and one, the vector x(db)x (\mathbf{d} - \mathbf{b}) ranges between the two end points defined by b\mathbf{b} and d\mathbf{d}. The vector y(x)\mathbf{y}(x) is just this fractional distance plus b\mathbf{b}.

Figure 3. The line y(x)\mathbf{y}(x) defined as b\mathbf{b} plus db\mathbf{d} - \mathbf{b} rescaled by xx.

Now that we some geometric intuition, let’s prove that y(x)\mathbf{y}(x) must be on the line between b\mathbf{b} and d\mathbf{d}. First, let’s compute the distance between b\mathbf{b} and y(x)\mathbf{y}(x):

by(x)=b[x(db)+b](Equation 4)=x(db)=x(bd)=xbd.(x0)(5) \begin{aligned} \lVert \mathbf{b} - \mathbf{y}(x) \rVert &= \lVert \mathbf{b} - [x (\mathbf{d} - \mathbf{b}) + \mathbf{b}] \rVert && \text{(Equation $4$)} \\ &= \lVert - x (\mathbf{d} - \mathbf{b}) \rVert \\ &= | x | \lVert (\mathbf{b} - \mathbf{d}) \rVert \\ &= x \lVert \mathbf{b} - \mathbf{d} \rVert. && \text{($x \geq 0$)} \end{aligned} \tag{5}

Next, let’s compute the distance between y(x)\mathbf{y}(x) and d\mathbf{d}:

y(x)d=xd+(1x)bd(Equation 3)=(x1)d+(1x)b=(1x)b(1x)d=1xbd=(1x)bd.(1x0)(6) \begin{aligned} \lVert \mathbf{y}(x) - \mathbf{d} \rVert &= \lVert x \mathbf{d} + (1-x) \mathbf{b} - \mathbf{d} \rVert && \text{(Equation $3$)} \\ &= \lVert (x - 1) \mathbf{d} + (1-x) \mathbf{b} \rVert \\ &= \lVert (1-x) \mathbf{b} - (1 - x) \mathbf{d} \rVert \\ &= |1 - x| \lVert \mathbf{b} - \mathbf{d} \rVert \\ &= (1 - x) \lVert \mathbf{b} - \mathbf{d} \rVert. && \text{($1 - x \geq 0$)} \end{aligned} \tag{6}

Taken together, Equations 55 and 66 imply that the total distance is

by(x)+y(x)d=xbd+(1x)bd=bd.(7) \begin{aligned} \lVert \mathbf{b} - \mathbf{y}(x) \rVert + \lVert \mathbf{y}(x) - \mathbf{d} \rVert &= x \cdot \lVert \mathbf{b} - \mathbf{d} \rVert + (1 - x) \cdot \lVert \mathbf{b} - \mathbf{d} \rVert \\ &= \Vert \mathbf{b} - \mathbf{d} \rVert. \end{aligned} \tag{7}

Thus, y(x)\mathbf{y}(x) must be on the line between b\mathbf{b} and d\mathbf{d}. Why? Imagine a triangle with vertices defined by b\mathbf{b}, y(x)\mathbf{y}(x), and d\mathbf{d} (Figure 44).

Figure 4. A triangle with vertices b\mathbf{b}, y(x)\mathbf{y}(x), and d\mathbf{d}. By the triangle inequality, if the sum of the lengths of any two sides is equal to the length of the remaining side, the vertices must be collinear.

Then the lengths of the sides would be

by(x),y(x)d,bd.(8) \lVert \mathbf{b} - \mathbf{y}(x) \rVert, \qquad \lVert \mathbf{y}(x) - \mathbf{d} \rVert, \qquad \Vert \mathbf{b} - \mathbf{d} \rVert. \tag{8}

By the triangle inequality, the sum of the first two lengths can only equal the sum of the third if we have a degenerate triangle, i.e. the triangle’s vertices are collinear. So the three vertices b\mathbf{b}, y(x)\mathbf{y}(x), and d\mathbf{d} must be collinear. Since we can easily verify that y(0)=b\mathbf{y}(0) = \mathbf{b} and y(1)=d\mathbf{y}(1) = \mathbf{d}, then the locus of points defined by y(x)\mathbf{y}(x) is the line between b\mathbf{b} and d\mathbf{d}.