先看乙個例子:
設三個向量分別為: α1
α2α3
=(1,
−1,0
)t=(
1,0,
−1)t
=(1,
1,1)
t 那麼對 α1
,α2 正交化: β1
β2=α
1=(1
,−1,
0)t=
α2−(
α2,β
1)(β
1,β1
)β1=
(1,0
,−1)
t−1×
1+0×
(−1)
+(−1
)×01
×1+(
−1)×
(−1)
+0×0
(1,−
1,0)
t=(1
,0,−
1)t−
12(1
,−1,
0)t=
12(1
,1,−
2)t
再對 β1,
β2,β
3 單位化: γ1
γ2γ3
=12‾
‾√(1
,−1,
0)t=
16‾‾
√(1,
1,−2
)t=1
3‾‾√
(1,1
,1)t
以下施密特正交化的標準定義引自wiki
we define the projection operator by pr部分符號和國內教材上有差異。oju(
v)=⟨
v,u⟩
⟨u,u
⟩uwhere ⟨
v,u⟩
denotes the inner product of the vectors v
and u
. this operator projects the vector v
orthogonally onto the line spanned by vector u
. if u
=0, we define p
roj0
(v):=
0 . i.e., the procjection map p
roj0
is the zero map, sending every vector to the zero vector.
the gram-schmidt process then works as follows: u
1u2u
3u4u
k=v1
=v2−
proj
u1(v
2)=v
3−pr
oju1
(v3)
−pro
ju2(
v3),
=v4−
proj
u1(v
4)−p
roju
2(v4
)−pr
oju3
(v4)
,⋮=v
k−∑j
=1k−
1pro
juj(
vk),
e1=u
1∥u1
∥e2=
u2∥u
2∥e3
=u3∥
u3∥e
3=u4
∥u4∥
ek=u
k∥uk
∥
the sequence u
1,..
.,uk
is the required system of orthogonal vectors, and the normalized vectors e
1,..
.,ek
from an orthonormal set. the calculation of the sequence u
1,..
.,uk
is known as
gram-schmidt rothogonalization, while the calculation of the sequence e
1,..
.,ek
is known as
gram-schmidt orthonormalization as the vectors are normalized.
施密特正交化
對於一組向量,有時候我們需要對其進行正交化處理,也就是說,該組向量中任意兩個向量都是互相垂直的。那麼,要怎麼做呢?假設只有兩個向量,vec v 0 和 vec v 1 正交化的幾何示意圖如下所示。假設正交化之後的向量為 vec w 0 和 vec w 1 那麼由圖可知,可得 vec w 0 vec ...
列正交化 施密特正交化方法
a1 1 1 0 0 a2 1 0 1 0 a3 1 0 0 1 a a1 a2 a3 u a m,n size u y u y 1 y 1 norm y 1 for k 2 n y k u k endfor k 2 n for j k n y j y j y k 1 y j y k 1 endp1...
徹底理解施密特正交化
在遊戲程式設計中我們經常會用到施密特正交化,比如求解法線的切空間,我們需要把一組非正交的座標系 轉換為正交的座標系 n b t 施密特正交化如何理解呢?我們先來看看官方給出的解釋。施密特正交化 schmidt orthogonalization 是求歐氏空間正交基的一種方法。從歐氏空間任意線性無關的...