right|thumb|Given three points <math>x_1, x_2, x_3</math> in a plane as shown in the figure, the point <math>P</math> is a convex combination of the three points, while <math>Q</math> is not. (<math>Q</math> is however an affine combination of the three points, as their [[affine hull is the entire plane.)]]
thumb|Convex combination of two points <math> v_1,v_2 \in \mathbb{R}^2</math> in a two dimensional vector space <math>\mathbb{R}^2</math> as animation in [[Geogebra with <math>t \in [0,1]</math> and <math> K(t) := (1-t)\cdot v_1 + t \cdot v_2</math> ]]
thumb|Convex combination of three points <math>v_{0},v_{1},v_{2} \text{ of } 2\text{-simplex} \in \mathbb{R}^{2}</math> in a two dimensional vector space <math> \mathbb{R}^{2}</math> as shown in animation with <math>\alpha^{0}+\alpha^{1}+\alpha^{2}=1</math>, <math>P( \alpha^{0},\alpha^{1},\alpha^{2} )</math> <math>:= \alpha^{0} v_{0} + \alpha^{1} v_{1} + \alpha^{2} v_{2}</math> . When P is inside of the triangle <math>\alpha_{i}\ge 0</math>. Otherwise, when P is outside of the triangle, at least one of the <math>\alpha_{i}</math> is negative.
thumb|Convex combination of four points <math>A_{1},A_{2},A_{3},A_{4} \in \mathbb{R}^{3}</math> in a three dimensional vector space <math> \mathbb{R}^{3}</math> as animation in [[Geogebra with <math>\sum_{i=1}^{4} \alpha_{i}=1</math> and <small><math>\sum_{i=1}^{4} \alpha_{i}\cdot A_{i}=P</math></small>.
When P is inside of the tetrahedron <math>\alpha_{i}>=0</math>. Otherwise, when P is outside of the tetrahedron, at least one of the <math>\alpha_{i}</math> is negative.]]
[[File:Convex combination 1 ord functions with geogebra.gif|thumb|Convex combination of two functions as vectors in a vector space of functions - visualized in Open Source Geogebra with <math>[a,b]=[-4,7]</math> and as the first function <math>f:[a,b]\to \mathbb{R}</math> a polynomial is defined. <math>f(x):= \frac{3}{10} \cdot x^2 - 2 </math>
A trigonometric function <math>g:[a,b]\to \mathbb{R}</math> was chosen as the second function. <math>g(x):= 2 \cdot \cos(x) + 1</math>
The figure illustrates the convex combination <math>K(t):= (1-t)\cdot f + t \cdot g</math> of <math>f</math> and <math>g</math> as graph in red color.]]
In convex geometry and vector algebra, a convex combination is a linear combination of points (which can be vectors, scalars, or more generally points in an affine space) where all coefficients are non-negative and sum to 1. In other words, the operation is equivalent to a standard weighted average, but whose weights are expressed as a percent of the total weight, instead of as a fraction of the count of the weights as in a standard weighted average.
Formal definition
More formally, given a finite number of points <math>x_1, x_2, \dots, x_n</math> in a real vector space or affine space, a convex combination of these points is a point of the form
: <math>\alpha_1x_1+\alpha_2x_2+\cdots+\alpha_nx_n</math>
where the real numbers <math>\alpha_i</math> satisfy <math>\alpha_i\ge 0 </math> and <math>\alpha_1+\alpha_2+\cdots+\alpha_n=1.</math>
