向量 模(module) 范数(norm)

2019-04-13 13:02发布

1,向量的模和范数的计算结果都是一个实数,这个数字对应着单个向量的长度或者两个向量之间的距离。

2,在空间几何中(经常是2或3维空间),常用模来表示向量的长度或两个向量间的距离,符号为||xvec{x}||。

例子:
在二维空间中有两个向量:x=(1,2)y=(2,3)vec{x}=(1,2),vec{y}=(2,3)
xx=12+22vec{x}的长度为||vec{x}||=sqrt{1^2+2^2}
xyxy=(12)2+(23)2vec{x}和vec{y}之间的距离为||vec{x}-vec{y}||=sqrt{(1-2)^2+(2-3)^2}

3,在线性代数中,常用范数这个概念。对于1维空间的实数集,标准的范数就是绝对值,将绝对值的概念推广到多维空间就叫做范数。

4,范数的定义:

A norm is any function g that maps vectors to real numbers that satis es the following conditions:
1, Non-negativity: for all xRD,g(x)>=0;vec{x} in R^D, g(vec{x})>=0;
2, Strictly positive: for all x,g(x)=0vec{x}, g(vec{x})=0 implies that x=0vec{x}=0;
3, Homogeneity: for all xvec{x} and a, g(ax)=ag(x),g(avec{x})=|a|g(vec{x}), where |a| is the absolute value;
4, Triangle inequality: for all x,y,g(x,y)<=g(x)+g(y)vec{x}, vec{y}, g(vec{x}, vec{y})<=g(vec{x})+g(vec{y}).

5,ell-p norm (pell_p)

这是一类特殊的范数家族,读作“little ell p 范数”。
定义如下:
Let pp be in the range [0,][0, infin]; then the pell_p norm of x, denoted by xp||vec{x}||_p, is de ned by: xp=(d=1Dxdp)1p||vec{x}||_p=(sum_{d=1}^{D}|x_{d}|^p)^frac{1}{p}

6,由pell_p范数家族衍生出来的特殊范数

1,欧式范数(Euclidean norm):
g(x)=d=1Dxd2g(x)=sqrt{sum_{d=1}^{D} x_d^2}
(对应着2ell_2范数) 2,曼哈顿范数(Manhattan norm):
g(x)=d=1Dxdg(x)=sum_{d=1}^{D} |x_d|
(对应着1ell_1范数) 3,最大值范数(Maximum norm):
g(x)=maxdxdg(x)=max_d|x_d|
(对应着ell_infin范数) 4,0范数(Zero norm):
g(x)=d=1D1[xd0]g(x)=sum_{d=1}^{D}1[x_d不等于0]
(对应着0ell_0范数