Given three points

in a plane as shown in the figure, the point
is a convex combination of the three points, while

is
not.
(

is however an affine combination of the three points, as their
affine hull is the entire plane.)
Convex combination of two points

in a two dimensional vector space

as animation in
Geogebra with
![t\in [0,1]](https://wikimedia.org/api/rest_v1/media/math/render/svg/31a5c18739ff04858eecc8fec2f53912c348e0e5)
and
Convex combination of three points

in a two dimensional vector space

as shown in animation with

,

. When P is inside of the triangle

. Otherwise, when P is outside of the triangle, at least one of the

is negative.
Convex combination of four points

in a three dimensional vector space

as animation in
Geogebra with

and

. When P is inside of the tetrahedron

. Otherwise, when P is outside of the tetrahedron, at least one of the

is negative.
Convex combination of two functions as vectors in a vector space of functions - visualized in Open Source Geogebra with
![{\displaystyle [a,b]=[-4,7]}](https://wikimedia.org/api/rest_v1/media/math/render/svg/183bacef4a989104893e2c37017d84af54a1a23f)
and as the first function
![{\displaystyle f:[a,b]\to \mathbb {R} }](https://wikimedia.org/api/rest_v1/media/math/render/svg/b592d102ccd1ba134d401c5b3ea177baaba3ffac)
a polynomial is defined.

A trigonometric function
![{\displaystyle g:[a,b]\to \mathbb {R} }](https://wikimedia.org/api/rest_v1/media/math/render/svg/8b1d5103d0e36767a27715bcfc57137119294aad)
was chosen as the second function.

The figure illustrates the convex combination

of

and

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.[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.
More formally, given a finite number of points
in a real vector space, a convex combination of these points is a point of the form

where the real numbers
satisfy
and
[1]
As a particular example, every convex combination of two points lies on the line segment between the points.[1]
A set is convex if it contains all convex combinations of its points.
The convex hull of a given set of points is identical to the set of all their convex combinations.[1]
There exist subsets of a vector space that are not closed under linear combinations but are closed under convex combinations. For example, the interval
is convex but generates the real-number line under linear combinations. Another example is the convex set of probability distributions, as linear combinations preserve neither nonnegativity nor affinity (i.e., having total integral one).