Convex combination

From testwiki
Revision as of 13:43, 9 December 2024 by imported>Bert Niehaus (added Category:Curve using HotCat)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
File:Geogebra convex ord3.png
Visualization of convex combinations of order 1, 2 and 3 in Geogebra
Convex Combination in 3D with 4 Vectors
Convex Combination in 3D with 4 Vectors

Introduction

In convex geometry, 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]


Definition - Convex Combination

More formally, given a finite number of points x1,x2,,xn in a real vector space, a convex combination of these points is a point of the form

λ1x1+λ2x2++λnxn

where the real numbers λi satisfy λi0 and λ1+λ2++λn=1.[1]

Remark - outside of convex hull

In the animation of the tetrahedron there are examples of points that

  • fulfill λ1+λ2++λn=1, but
  • violate the condition λi0.

In case that on λi is negative, then linear combination

λ1x1+λ2x2++λnxn

is a point outside the tetrahedron (see animation and consider, when values become negative.

Convex combinations in the plane

If we consider a convex combinations in the plane, then the underlying vector space is the two-dimensional space V:=2. First, we consider convex combinations of two vectors in 2. Later we transfer that to infinite dimensional vector spaces of functions and visualize convex combination as GIF animation with Open Source Geogebra. By the condition λ1+λ2=1, scalars are interdependent. For example, if we define t[0,1], then we can set λ1:=(1t) and λ2:=t.

Convex combinations as mappings into the vector space

File:Convex combination 1 ord with geogebra.gif
Convex combination of two points as GIF-Animation - generated with geogebra

Convex combination of two functions

Convex combination of two functions visualized in Geogebra

Geogebra: Interaktives Applet - Download: Geogebra-File

Convex Combination as a Mapping

Now we consider the convex combination as a mapping K:[0,1]V into the underlying vector space. Due to the fact that the equation can generally represent 1st order convex combinations of 2 vectors v1,v2V as follows over the mapping K:

K(t):=(1t)v1+tv2

Convex Combination of 2 Points

As a particular example, every convex combination of two points lies on the line segment between the points.[1]

Convex Combination of 2 Functions as Vectors

Let [a,b]=[4,7] be an interval and as the first function is defined as a polynomial f:[a,b].

f(x):=310x22

As the second function a trigonometric function g:[a,b] was chosen for the convex combination in the vector space of continuous functions.

g(x):=2cos(x)+1

The animation above illustrates the convex combination K(t):=(1t)f+tg.

Remark - Vector space of continuous functions

Both functions f,g and K(t) for all t[0,1] are elements of the vector space of continuous functions from [a,b] to (i.e. f,g,K(t)𝒞([a,b],) ).

Remark - Deformation

If the first function f describes the initial shape and g the target shape. A convex combinations of those functions can describe (e.g. in computer graphics) a continuous deformation of an initial shape into a target shape.

Convex combination of more than 2 Points

Convex combinations of three points x1,x2,x3 in a plane

The figure above, the point P is a convex combination of the three points, while Q is not. (Q is however an affine combination of the three points, as their affine hull is the entire plane.)]]

Convex combination of n points

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]

v=λ1v1+λ2v2++λnvn=i=1nλivi,mit0λi1,i=1nλi=1.

Linear Combinations and Convex Combinations

There exist subsets of a vector space that are not closed under linear combinations but are closed under convex combinations. For example, the interval [0,1] 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 non-negativity nor affinity (i.e., having total integral one).

Convex combinations of convex combinations

In the animation above you can see a convex combination of 2 vectors in the plane or in a function space. If one uses three points then one can create a 1st order convex combination between every two points. We will now consider higher order convex combinations by constructing e.g. a 2nd order convex combination generated from two 1st order convex combinations. Generally from 2 convex combinations of order n you can create a convex combination of order n+1.

Convex hull

The set of all convex combinations of a given set of vectors is called a convex hull (see also p-convex hull).

Video convex combinations in the plane

File:Convex combination geogebra.webm

Geogebra: Interactive applet - Download:' Geogebra-File

Remarks video about convex combinations of order 1, 2 and 3 in Geogebra

In the video you can see convex combinations of the

  • 1st order between A1 and B1 without auxiliary points,
  • 2nd order between A2 and B2 with auxiliary point S1,
  • 3rd order between A3 and B3 with auxiliary points H1,H2,

Convex combinations as polynomials of t

Convex combinations can be conceived as polynomials where the coefficients come from a vector space (V,+,,) (see also Polynomial Algebra). For example, if one chooses V:=n, one can take a convex combination K to be an element of algebra of polynomial V[t].

3D convex combination - 1st order

For example, choosing n=3 and V:=3, a 1st order convex combination is defined as follows.

A=(124),B=(410),K(t):=(1t)A+tB=(BA)t+A

Thus, a 1st order convex combination yields a polynomial of degree 1. with argument t. Represent the convex combination in Geogebra 3D with t[0,1] (see also Representation of a Straight Line by Direction Vector and Location Vector).

3D convex combination - 2nd order

Choosing again n=3 and V:=3 with an auxiliary point H1V, two 1st order convex combinations yield 2nd order convex combinations.

H1=(222),K(1,1)(t):=(H1A)t+AK(1,2)(t):=(BH1)t+H1K2(t):=((H1A)t+A)(1t)+((BH1)t+H1)t

Represent K2 as a polynomial K2(t)=P2t2+P1t1+P0t0 and calculate for n=2 (n=3,4,...) the coefficients in PkV=3.

Bernstein polynomial - order 1

K1(t):=A(1t)+Bt=A(1t)1t0+B(1t)0t1

Calculation of the polynomial - order 2

K2(t):=((H1A)t+A)(1t)+((BH1)t+H1)t=(H1tAt+A)(H1t2At2+At)+(Bt2H1t2+H1t)=(BH1+A)t2+2(H1A)t+A

Bernstein polynomial - order 2

K2(t):=((H1A)t+A)(1t)+((BH1)t+H1)t=A(1t)2+2H1t(1t)+Bt2

Bernstein polynomial - order 3

K3(t):=A(1t)3+3H1(1t)2t+3H2(1t)t2+Bt3

Convex combination as a mapping

A convex combination can be used to interpolate points A=v1 and B=vn. Furthermore, if the auxiliary points H1=v2,....Hn1=vn1 are given for a convex combination n-th order. The convex combinations can be generally thought of as mapping from the interval [0,1] to n as follows:

Kn:[0,1]ntk=0n(nk)(1t)nktkvk+1=(n0)(1t)nv1+(n1)(1t)n1tv2++(nn)tnvn

Interpolations

Convex combinations can also be used to interpolate polynomials. Start first with first order interpolations by interpolating the points with straight lines of the form fk(x):=mkx+bk. Here, the points 𝔻:={(x0,y0),,(xn,yn)} are given data points that are interpolated piecewise using the functions fk(x):=mkx+bk. Compute from the convex combinations Pk(t)2 the functional representation fk:[xk1,xk] with fk(x):=mkx+bk:

Pk(t):=(1t)(xk1yk1)+t(xkyk)

Calculation of t as a function of x

Given x[xk1,xk]. We now compute the corresponding t[0,1] for the convex combination with the preliminary consideration that t=0 for x=xk1 and t=1 for x=xk. The following figure takes the linear transformation T:[xk1,xk][0,1].

T(x):=xxk1xkxk1

Calculation of the function value at x

The convex combination

Pk(t):=(1t)(xk1yk1)+t(xkyk)

gives the interpolation point of the graph. However, we only need the y-coordinate of the corresponding interpolation point Pk(t)=((1t)xk1+txk(1t)yk1+tyk). So we use the following term: (1t)yk1+tyk.

Functional representation

Substituting for t[0,1] gives the linear interpolation function fk:[xk1,xk] over:

fk(x):=(1xxk1xkxk1=t)yk1+(xxk1xkxk1=t)yk.

Learning Tasks

  • Calculate the coefficients mk,bk of the function fk:[xk1,xk] with fk(x):=mkx+bk!
  • Transfer this interpolation to convex combination of order 3 and consider how, depending on the data points, you must choose the two auxiliary points of the interpolation so that the interpolation is differentiable and generates differentiable transitions between the interpolation points in the plot.
  • What geometric properties must auxiliary points between two adjacent interpolation intervals have for differentiability.

Interpolation with convex combination of order 3

Interpolation with convex combination of order 3

Geogebra: Interactive Applet - Download: Geogebra-File


3D Interpolation with Convex Combinations of 3rd Order

Geogebra: Interactive Applet - Download: Geogebra-File

Develop a mathematical/algebraic description by terms for the following:

  • The green stippled lines are 1st order convex combinations,
  • At the vertices of the open Polygon course, create an angle bisector (constructively, this can be implemented by a rhombus, where two sides and a vertex are defined by two adjacent lines in the polygon course).
  • Create an orthogonal through the connection point of two adjacent lines in the polygon course.
  • Analyze the figure above and determine the next steps for defining the two auxiliary points for a 3rd order convex combination. The procedure is not clear especially at the boundary points of the polygon course. What speaks to your choice of mathematical implementation?

Use altogether methods from linear algebra (e.g. scalar product,... for the vectorial description of the above geometric procedure.

Morphing and the use of convex combinations

In the following section we will consider transformations of images in the context of convex combinations. In Morphing there are different mathematical tools. Here we will only consider aspects in the context of convex combinations.

Error creating thumbnail:

  • Look at the above GIF animation and first take two different black and white images transform the first image pixel by pixel to the second image by applying a convex combination from gray level values (black=0,...255=white) of a pixel in image 1 to a pixel in image 2 (implementation e.g. in Octave Image Processing v7.3.0 or Octave Image Processing v5.2.0. Note that the convex combinations yields real values of brightness in the gray levels, which must rounded to integer values (e.g. 232.423 to 232 = approximately white). This is necessary due to that the fact that brightness encoding is done with 256 values (Byte).
  • Transfer the procedure to color images only, similarly transferring color values for the primary colors from grayscale values to color values.
  • In the above morphing animation, however, not only static pixel-by-pixel convex combinations are made, but for fixedly defined points, such as eyes, a spatial transformation process also takes place. Consider how, for example, the center of the iris in the eye is spatially shifted from image1 to image2.
  • now connect spatial transformation processes with a color adjustment of the pixels, so that a pixel moves from the location (x1,y1) in the image matrix to (x2,y2) and on the way from (x1,y1) to (x2,y2) the color changes from yellow to blue.

CAS4Wiki

With the following CAS4Wiki commands you can play around with the definition of curves in 2

Curves in 2 and 3
Error creating thumbnail:
Plot of convex combination

Other objects

  • Linear Combination
  • A conical combination is a linear combination with nonnegative coefficients. When a point x is to be used as the reference origin for defining displacement vectors, then x is a convex combination of n points x1,x2,,xn if and only if the zero displacement is a non-trivial conical combination of their n respective displacement vectors relative to x.
  • Weighted means are functionally the same as convex combinations, but they use a different notation. The coefficients (weights) in a weighted mean are not required to sum to 1; instead the weighted linear combination is explicitly divided by the count of the weights.
  • Affine combinations are like convex combinations, but the coefficients are not required to be non-negative. Hence affine combinations are defined in vector spaces over any field.

See also

References

  1. 1.0 1.1 1.2 1.3 Rockafellar, R. Tyrrell (1970), Convex Analysis, Princeton Mathematical Series, vol. 28, Princeton University Press, Princeton, N.J., pp. 11–12, MR 0274683

Page Information

You can display this page as Wiki2Reveal slides

Wiki2Reveal

The Wiki2Reveal slides were created for the Linear algebra' and the Link for the Wiki2Reveal Slides was created with the link generator.

Wikipedia2Wikiversity

This page was based on the following Wikipedia source page:


de:Konvexkombination