矩阵和向量的范式(Norms for Vectors and Matrices)
1 Vector Norms
p | Form |
---|---|
1 | ∥ v ∥ 1 = ∣ v 1 ∣ + ⋯ + ∣ v n ∣ \|v\|_1=\vert v_1 \vert+\cdots+ \vert v_n \vert ∥v∥1=∣v1∣+⋯+∣vn∣ |
2 | ∥ v ∥ 2 = ∣ v 1 ∣ 2 + ⋯ + ∣ v n ∣ 2 \|v\|_2=\sqrt{\vert v_1 \vert^ 2+\cdots+\vert v_n \vert^2} ∥v∥2=∣v1∣2+⋯+∣vn∣2 |
∞ \infty ∞ | ∥ v ∥ ∞ = max { ∣ v 1 ∣ , ⋯ , ∣ v n ∣ } \|v\|_\infty= \max \{\vert v_1 \vert ,\cdots, \vert v_n \vert \} ∥v∥∞=max{∣v1∣,⋯,∣vn∣} |
0 | ∥ v ∥ 0 = number of non-zero componnets \|v\|_0= \text{number of non-zero componnets} ∥v∥0=number of non-zero componnets |
S | ∥ v ∥ S = v T S v \|v\|_S= \sqrt{v^TSv} ∥v∥S=vTSv |
l1-norm
C
n
\mathbf{C}^n
Cn上的和范式(sum norm),也叫l1-范式(l1-norm),定义如下:
∥
v
∥
1
=
∣
v
1
∣
+
⋯
+
∣
v
n
∣
\|v\|_1=|v_1|+\cdots+|v_n|
∥v∥1=∣v1∣+⋯+∣vn∣
通常也被称为曼哈顿范式(Manhattan norm)。
l2-norm
一个向量
v
=
[
v
1
,
.
.
.
,
v
n
]
T
∈
C
n
v=[v_1,...,v_n]^T\in \mathbf{C}^n
v=[v1,...,vn]T∈Cn的欧几里得范式(Euclidean norm),也叫l2范式(l2-norm),定义如下:
∥
v
∥
2
=
(
∣
v
1
∣
2
+
⋯
+
∣
v
n
∣
2
)
1
/
2
\|v\|_2=(|v_1|^2+\cdots+|v_n|^2)^{1/2}
∥v∥2=(∣v1∣2+⋯+∣vn∣2)1/2
经常使用
∥
x
−
y
∥
2
\|x-y\|_2
∥x−y∥2来衡量两个点
x
,
y
∈
C
n
x,y\in \mathbf{C}^n
x,y∈Cn的欧几里得距离(Euclidean distance)。
infinity-norm
C
n
\mathbf{C}^n
Cn上的max norm(
l
∞
l_\infty
l∞-norm)为:
∥
v
∥
∞
=
max
{
∣
v
1
∣
,
⋯
,
∣
v
n
∣
}
\|v\|_\infty= \max \{|v_1|,\cdots,|v_n| \}
∥v∥∞=max{∣v1∣,⋯,∣vn∣}
0-norm
C
n
\mathbf{C}^n
Cn上的
l
0
l_0
l0-norm为非零部分的个数。
∥
v
∥
0
=
number of non-zeros
\|v\|_0 = \text{number of non-zeros}
∥v∥0=number of non-zeros
S-norm
S为对称正定矩阵(symmetric positive definite),例如 S = ( 2 0 0 3 ) S= \left( \begin{array}{ccc} 2 & 0 \\ 0&3 \end{array} \right) S=(2003), ∥ v ∥ S = v T S v = 2 v 1 2 + 3 v 2 2 \|v\|_S =\sqrt{\mathbf{v}^TS\mathbf{v}}=\sqrt{2v_1^2+3v_2^2} ∥v∥S=vTSv=2v12+3v22
一般的,
C
n
\mathbf{C}^n
Cn上的
l
p
l_p
lp-norm定义为:
∥
v
∥
p
=
(
∣
v
1
∣
p
+
⋯
+
∣
v
n
∣
p
)
1
/
p
,
p
≥
1
\|v\|_p=(|v_1|^p+\cdots+|v_n|^p)^{1/p},\quad p\ge 1
∥v∥p=(∣v1∣p+⋯+∣vn∣p)1/p,p≥1
以二维向量 v = ( v 1 , v 2 ) \mathbf{v}=(v_1, v_2) v=(v1,v2)举例,范式的值恰好为1的图像如下,其中横轴代表 v 1 v_1 v1,纵轴代表 v 2 v_2 v2
l1范式,即 ∥ v ∥ 1 = ∣ v 1 ∣ + ∣ v 2 ∣ = 1 \|v\|_1=|v_1|+|v_2|=1 ∥v∥1=∣v1∣+∣v2∣=1

l2范式,即 ∥ v ∥ 2 = ∣ v 1 ∣ 2 + ∣ v 2 ∣ 2 = 1 \|v\|_2=\sqrt{|v_1|^2+|v_2|^2}=1 ∥v∥2=∣v1∣2+∣v2∣2=1

Infinity范式,即 ∥ v ∥ ∞ = max { ∣ v 1 ∣ , ∣ v 2 ∣ } = 1 \|v\|_\infty= \max \{|v_1|,|v_2| \}=1 ∥v∥∞=max{∣v1∣,∣v2∣}=1

0范式,即 ∥ v ∥ 0 = number of non-zeros = 1 \|v\|_0 = \text{number of non-zeros}=1 ∥v∥0=number of non-zeros=1

S范式,还是上面那个例子, ∥ v ∥ S = v T S v = 2 v 1 2 + 3 v 2 2 = 1 \|v\|_S =\sqrt{\mathbf{v}^TS\mathbf{v}}=\sqrt{2v_1^2+3v_2^2}=1 ∥v∥S=vTSv=2v12+3v22=1,即 2 v 1 2 + 3 v 2 2 = 1 2v_1^2+3v_2^2=1 2v12+3v22=1,结果是一个椭圆

所以对满足前提条件下,最小化一个向量的范式的问题如下,这里举例最小化l1范式和l2范式,令
x
=
[
x
1
,
x
2
]
T
∈
R
2
\mathbf{x} = [x_1, x_2]^T \in \mathbb{R}^2
x=[x1,x2]T∈R2
min
∥
x
∥
1
or
∥
x
∥
1
subject to:
c
1
x
1
+
c
2
x
2
=
b
\text{min } \|x\|_1 \text{ or } \|x\|_1 \\ \text{subject to: } c_1x_1 + c_2x_2 = b
min ∥x∥1 or ∥x∥1subject to: c1x1+c2x2=b

2 Matrix norms
p | Form |
---|---|
2 | ∥ A ∥ 2 = σ 1 \|A\|_2=\sigma_1 ∥A∥2=σ1 |
Frobenius | ∥ A ∥ F = ∑ i , j = 1 n ∣ a i j ∣ 2 = σ 1 2 + ⋯ + σ n 2 \|A\|_F=\sqrt{ \sum_{i,j=1}^{n} \vert a_{ij} \vert^2 }=\sqrt{\sigma_1^2+\cdots+\sigma_n^2} ∥A∥F=∑i,j=1n∣aij∣2=σ12+⋯+σn2 |
Nuclear | ∥ A ∥ N = σ 1 + ⋯ + σ r \|A\|_N= \sigma_1+\cdots+\sigma_r ∥A∥N=σ1+⋯+σr |