8.3 Convex combinations (凸组合)

本文介绍了线性代数中关于凸组合和凸包的概念。凸包是包含所有可能凸组合的最小集合,可以直观地理解为在不离开集合的情况下任意两点间视线所形成的边界。例如,二维空间中,凸包是连接任意两点的线段;三维空间中,由三个标准基向量构成的集合的凸包是一个三角形表面。Caratheodory定理表明,在n维空间中,任何点都可以表示为最多n+1个点的凸组合。此外,文章通过示例详细展示了如何计算和理解这些概念。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

本文为《Linear algebra and its applications》的读书笔记

Convex combinations

在这里插入图片描述

convex hull: 凸包

The convex hull of a single point v 1 \boldsymbol v_1 v1 is just the set { v 1 } \{\boldsymbol v_1\} {v1}, the same as the affine hull. In other cases, the convex hull is properly contained in the affine hull. Recall that the affine hull of distinct points v 1 \boldsymbol v_1 v1 and v 2 \boldsymbol v_2 v2 is the line

在这里插入图片描述
Because the weights in a convex combination are nonnegative, the points in c o n v { v 1 , v 2 } conv\{\boldsymbol v_1,\boldsymbol v_2\} conv{v1,v2} is the line segment between v 1 \boldsymbol v_1 v1 and v 2 \boldsymbol v_2 v2, hereafter denoted by v 1 v 2 ‾ \overline{\boldsymbol v_1\boldsymbol v_2} v1v2.

If a set S S S is affinely independent and if p ∈ a f f S \boldsymbol p\in aff S paffS, then p ∈ c o n v S \boldsymbol p\in conv S pconvS if and only if the barycentric coordinates of p \boldsymbol p p are nonnegative.

Example 1 shows a special situation in which S S S is much more than just affinely independent.

EXAMPLE 1
Let

在这里插入图片描述

and S = { v 1 , v 2 , v 3 } S=\{\boldsymbol v_1,\boldsymbol v_2,\boldsymbol v_3\} S={v1,v2,v3}. Note that S S S is an orthogonal set. Determine whether p 1 \boldsymbol p_1 p1 is in S p a n S Span S SpanS, a f f S aff S affS, and c o n v S conv S convS.
SOLUTION
Let W W W be the subspace spanned by S S S.

在这里插入图片描述
The orthogonal projection of p 1 \boldsymbol p_1 p1 onto W W W is p 1 \boldsymbol p_1 p1 itself: This shows that p 1 \boldsymbol p_1 p1 is in S p a n S Span S SpanS. Also, since the coefficients sum to 1, p 1 \boldsymbol p_1 p1 is in a f f S aff S affS. In fact, p 1 \boldsymbol p_1 p1 is in c o n v S conv S convS, because the coefficients are also nonnegative.


Recall that a set S S S is affine if it contains all lines determined by pairs of points in S S S. When attention is restricted to convex combinations, the appropriate condition involves line segments rather than lines.

在这里插入图片描述
Intuitively, a set S S S is convex if every two points in the set can “see” each other without the line of sight leaving the set. Figure 1 illustrates this idea.

在这里插入图片描述
在这里插入图片描述
PROOF
The argument is similar to the proof of Theorem 2.


The intersection of any collection of subspaces is itself a subspace. A similar result holds for affine sets and convex sets.

在这里插入图片描述

在这里插入图片描述
PROOF
Let T T T denote the intersection of all the convex sets containing S S S. Since c o n v S conv S convS is a convex set containing S S S, it follows that T ⊂ c o n v S T\subset conv S TconvS. On the other hand, let C C C be any convex set containing S S S. Then C C C contains every convex combination of points of C C C, and hence also contains every convex combination of points of the subset S S S. That is, c o n v S ⊂ C conv S \subset C convSC. Since this is true for every convex set C C C containing S S S, it is also true for the intersection of them all. That is, c o n v S ⊂ T conv S\subset T convST .

Theorem 9 shows that c o n v S conv S convS is in a natural sense the “smallest” convex set containing S S S. For example, consider a set S S S that lies inside some large rectangle in R 2 \R^2 R2, and imagine stretching a rubber band around the outside of S S S. As the rubber band contracts around S S S, it outlines the boundary of the convex hull of S S S. Or to use another analogy, the convex hull of S S S fills in all the holes in the inside of S S S and fills out all the dents in the boundary of S S S.

EXAMPLE 2
a. The convex hulls of sets S S S and T T T in R 2 \R^2 R2 are shown below.

在这里插入图片描述
b. Let S S S be the set consisting of the standard basis for R 3 \R^3 R3, S = { e 1 , e 2 , e 3 } S=\{\boldsymbol e_1,\boldsymbol e_2,\boldsymbol e_3\} S={e1,e2,e3}. Then c o n v S conv S convS is a triangular surface in R 3 \R^3 R3, with vertices e 1 \boldsymbol e_1 e1, e 2 \boldsymbol e_2 e2, and e 3 \boldsymbol e_3 e3. See Figure 2.

在这里插入图片描述
EXAMPLE 3
Let

在这里插入图片描述
Show that the convex hull of S S S is

在这里插入图片描述
See Figure 3.

在这里插入图片描述
SOLUTION
Consider any point p \boldsymbol p p in the shaded region of Figure 3, say

在这里插入图片描述
The line through 0 \boldsymbol 0 0 and p \boldsymbol p p has the equation y = ( b / a ) t y =(b/a)t y=(b/a)t for t t t real. That line intersects S S S where t t t satisfies ( b / a ) t = t 2 (b/a)t=t^2 (b/a)t=t2, that is, when t = b / a t= b/a t=b/a. Thus, p \boldsymbol p p is on the line segment from 0 \boldsymbol 0 0 to [ b / a b 2 / a 2 ] \begin{bmatrix}b/a\\ b^2/a^2\end{bmatrix} [b/ab2/a2], which shows that Figure 3 is correct.


The following theorem is basic in the study of convex sets. It was first proved by Constantin Caratheodory in 1907. If p \boldsymbol p p is in the convex hull of S S S, then, by definition, p \boldsymbol p p must be a convex combination of points of S S S. But the definition makes no stipulation(规定) as to how many points of S S S are required to make the combination. Caratheodory’s remarkable theorem says that in an n n n-dimensional space, the number of points of S S S in the convex combination never has to be more than n + 1 n+ 1 n+1.

在这里插入图片描述
PROOF
Given p \boldsymbol p p in c o n v S conv S convS, one may write p = c 1 v 1 + . . . + c k v k \boldsymbol p = c_1\boldsymbol v_1+...+c_k\boldsymbol v_k p=c1v1+...+ckvk, where v i ∈ S \boldsymbol v_i\in S viS, c 1 + . . . + c k = 1 c_1+...+ c_k= 1 c1+...+ck=1, and c i ≥ 0 c_i\geq 0 ci0, for some k k k and i = 1 , . . . , k i=1,..., k i=1,...,k. The goal is to show that such an expression exists for p \boldsymbol p p with k ≤ n + 1 k\leq n + 1 kn+1.

If k > n + 1 k > n + 1 k>n+1, then { v 1 , . . . , v k } \{\boldsymbol v_1,...,\boldsymbol v_k\} {v1,...,vk} is affinely dependent, by Exercise 12 in Section 8.2. Thus there exist scalars d 1 , . . . , d k d_1,..., d_k d1,...,dk, not all zero, such that

在这里插入图片描述
Consider the two equations

在这里插入图片描述

and

在这里插入图片描述

By subtracting an appropriate multiple of the second equation from the first, we now eliminate one of the v i \boldsymbol v_i vi terms and obtain a convex combination of fewer than k k k elements of S S S that is equal to p \boldsymbol p p.

Since not all of the d i d_i di coefficients are zero, we may assume (by reordering subscripts if if necessary) that d k > 0 d_k > 0 dk>0 and that c k / d k ≤ c i / d i c_k/d_k\leq c_i/d_i ck/dkci/di for all those i i i for which d i > 0 d_i > 0 di>0. For i = 1 , . . . , k i= 1,..., k i=1,...,k, let b i = c i − ( c k / d k ) d i b_i=c_i-(c_k/d_k)d_i bi=ci(ck/dk)di . Then b k = 0 b_k= 0 bk=0 and

在这里插入图片描述

Furthermore, each b i ≥ 0 b_i\geq 0 bi0. Indeed, if d i ≤ 0 d_i\leq 0 di0, then b i ≥ c i ≥ 0 b_i\geq c_i\geq 0 bici0. If d i > 0 d_i > 0 di>0, then b i = d i ( c i / d i − c k / d k ) ≥ 0 b_i=d_i(c_i/d_i-c_k/d_k)\geq 0 bi=di(ci/dick/dk)0. By construction,

在这里插入图片描述

Thus p \boldsymbol p p is now a convex combination of k − 1 k- 1 k1 of the points v 1 , . . . , v k \boldsymbol v_1,...,\boldsymbol v_k v1,...,vk. This process may be repeated until p \boldsymbol p p is expressed as a convex combination of at most n + 1 n+1 n+1 of the points of S S S.

The following example illustrates the calculations in the proof above.

EXAMPLE 4
Let

在这里插入图片描述
and S = { v 1 , v 2 , v 3 , v 4 } S=\{\boldsymbol v_1,\boldsymbol v_2,\boldsymbol v_3,\boldsymbol v_4\} S={v1,v2,v3,v4}. Then

在这里插入图片描述
Use the procedure in the proof of Caratheodory’s Theorem to express p \boldsymbol p p as a convex combination of three points of S S S.
SOLUTION
The set S S S is affinely dependent. Use the technique of Section 8.2 to obtain an affine dependence relation

在这里插入图片描述
Next, choose the points v 2 \boldsymbol v_2 v2 and v 4 \boldsymbol v_4 v4 in (3), whose coefficients are positive. For each point, compute the ratio of the coefficients in equations (2) and (3). The ratio for v 2 \boldsymbol v_2 v2 is 1 / 24 1/24 1/24, and that for v 4 \boldsymbol v_4 v4 is 1 / 48 1/48 1/48. The ratio for v 4 \boldsymbol v_4 v4 is smaller, so subtract 1 / 48 1/48 1/48 times equation (3) from equation (2) to eliminate v 4 \boldsymbol v_4 v4:

在这里插入图片描述

This result cannot, in general, be improved by decreasing the required number of points. Indeed, given any three non-collinear points in R 2 \R^2 R2, the centroid(质心) of the triangle formed by them is in the convex hull of all three, but is not in the convex hull of any two.

### 组合的概念 在数学和优化领域,组合是一个重要的概念。对于一组向量 \( \{x_1, x_2, ..., x_n\} \),如果存在一组非负系数 \( \{\lambda_1, \lambda_2, ..., \lambda_n\} \) 满足 \( \sum_{i=1}^{n}\lambda_i = 1 \),那么这些向量的一个组合可以表示为: \[ y = \sum_{i=1}^{n}\lambda_ix_i \] 其中每一个 \( \lambda_i \geq 0 \)[^1]。 这种定义意味着任何两个点之间的线段上的所有点都可以通过这两个端点的组合来获得。这一性质使得组合成为研究几何形状以及函数凹性的基础工具之一。 ### 组合的应用实例 #### 图形学中的应用 在一个二维平面上给定三个不共线的顶点 A(0,0), B(4,0), C(2,3),考虑它们形成的三角形内部任意一点 P(x,y) 可以被写作这三个顶点坐标的加权平均形式即: \[ (x, y) = \alpha(0,0)+\beta(4,0)+\gamma(2,3)\quad where\quad \alpha+\beta+\gamma=1,\;and\;\alpha,\beta,\gamma≥0 \] 这里权重 α, β 和 γ 就构成了一个标准单纯形内的坐标系转换参数集,而这样的表达方式正是基于上述提到过的组合原理实现的。 #### 机器学习中的应用 当训练神经网络模型时,为了防止过拟合现象的发生,通常会采用正则化方法。Lasso回归就是一种利用 L1 范数作为惩罚项的方法,在某些情况下也可以看作是对不同特征子集之间的一种稀疏组合过程[^2]。 ```python import numpy as np def convex_combination(points, weights): """ 计算多个点按照指定权重构成的组合 参数: points : list of lists or array-like shape=(N,d) N个d维空间中的点组成的列表或数组 weights: list or array-like shape=(N,) 对应于points中每个点所分配到的非负实数值 返回值: result: ndarray shape=(d,) 表示由输入点及其相应权重计算得到的新位置 """ # 验证weights是否满足条件 assert abs(sum(weights)-1)<1e-6,"The sum of all given weight must be equal to one." for w in weights: assert w>=0,f"All elements within &#39;weights&#39; should greater than zero but got {w}." return np.dot(np.array(points).T,np.array(weights)).reshape(-1) # 测试例子 test_points=[[0,0],[4,0],[2,3]] test_weights=[0.2,0.5,0.3] print(convex_combination(test_points,test_weights)) ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值