Convex combination (source code)

= Convex combination
{title2=$\sum_{i=1}^n\lambda_ix_i,\quad\lambda_i\geq0,\quad\sum_i\lambda_i=1$}
{wiki}

A convex combination is a finite weighted average of points in a real <vector space>. For $n\geq1$, it has the form
$$
\sum_{i=1}^n\lambda_i x_i,
\qquad \lambda_i\geq0,
\qquad \sum_{i=1}^n\lambda_i=1.
$$
The nonnegative <coefficients> forbid subtracting a component, and their unit sum keeps the result on the same affine scale as the inputs. With two points it parametrizes their <line segment>; equal <coefficients> give their <centroid>. A <convex set> contains every finite convex combination of its points. Conversely, the two-point case already gives the defining property of a <convex set>.<Convex Optimization by Stephen Boyd and Lieven Vandenberghe>[§2.1.4, p. 24: finite combinations, weighted-average interpretation and convex hull]{ref}

The distinction from a <linear combination> is concrete. Combining $(0,0)$ and $(2,0)$ with <coefficients> $-1$ and $2$ gives $(4,0)$, outside their <line segment>, despite the unit coefficient sum. Using two <coefficients> both equal to one gives $(2,0)$ here, but their sum is two, so it is not a convex combination with those <coefficients>. A numerical output may happen to coincide with a point admitting a different convex representation; the definition applies to the specified <coefficients>.