Known:
b
⃗
is projected onto the vector
a
⃗
to form a projection
p
⃗
.
p
⃗
=
x
a
⃗
,
where x is a expansion coefficient and x is a scalar.
e
⃗
=
b
⃗
−
p
⃗
,
where e is a error.
证明:1.将向量投影到向量
a
⃗
∵
a
⃗
⊥
e
⃗
∴
a
⃗
T
(
b
⃗
−
p
⃗
)
=
0
⇒
a
⃗
T
(
b
⃗
−
x
a
⃗
)
=
0
⇒
a
⃗
T
b
⃗
−
x
a
⃗
T
a
⃗
=
0
⃗
∴
x
a
⃗
T
a
⃗
=
a
⃗
T
b
⃗
∴
x
=
a
⃗
T
b
⃗
a
⃗
T
a
⃗
(
x is a scalar and
a
⃗
T
a
⃗
is a number.
)
∵
p
=
x
a
⃗
=
a
⃗
x
∴
p
=
a
⃗
x
=
a
⃗
a
⃗
T
b
⃗
a
⃗
T
a
⃗
⇒
p
=
a
⃗
a
⃗
T
a
⃗
T
a
⃗
⏟
p
r
o
j
e
c
t
i
o
n
b
⃗
⇒
p
r
o
j
e
c
t
i
o
n
p
=
p
⃗
×
b
⃗
证明:2.推广:将向量投影到平面
A
⃗
∵
p
⃗
=
x
1
^
a
1
+
x
2
^
a
2
=
[
a
1
a
2
]
[
x
1
x
2
]
=
A
⃗
X
^
;
b
⃗
−
A
⃗
X
^
⊥
p
l
a
n
e
A
;
∴
[
a
1
T
a
2
T
]
(
b
−
A
⃗
x
^
)
=
0
⃗
⇒
A
⃗
T
(
b
⃗
−
A
⃗
X
^
)
=
0
⃗
⇒
A
⃗
T
A
⃗
X
^
=
A
⃗
T
b
⃗
(
e
⃗
=
b
⃗
−
A
⃗
X
^
,
e
⃗
位
于
A
转
置
的
零
空
间
)
∵
e
⊥
C
(
A
)
(
Column space of A
)
∴
如果A为一维向量且定义为a,则
A
T
A
为一个数。
∴
A
⃗
T
A
⃗
X
^
=
A
⃗
T
b
⃗
⇒
X
^
=
(
A
⃗
T
A
⃗
)
−
1
A
⃗
T
b
⃗
⇒
P
⃗
=
A
⃗
X
^
=
A
⃗
(
A
⃗
T
A
⃗
)
−
1
A
T
⏟
P
r
o
j
e
c
t
i
o
n
m
a
t
r
i
x
b
\begin{aligned} \text{Known: } \ \ &\vec{b} \text{ is projected onto the vector } \vec{a} \text{ to form a projection } \vec{p}. \\ & \vec{p}=x \vec{a},\text{where x is a expansion coefficient and x is a scalar. } \\ & \vec{e}=\vec{b}-\vec{p},\text{where e is a error.} \\ &\text{证明:1.将向量投影到向量} \vec{a} \\ \because \ \ & \vec{a} \perp \vec{e} \\ \therefore \ \ & \vec{a}^T(\vec{b}-\vec{p})=0 \Rightarrow \vec{a}^T(\vec{b}-x\vec{a})=0 \Rightarrow \vec{a}^T\vec{b}-x\vec{a}^T\vec{a}=\vec{0} \\ \therefore \ \ & x\vec{a}^T\vec{a}=\vec{a}^T\vec{b} \\ \therefore \ \ & x=\frac{\vec{a}^T\vec{b}}{\vec{a}^T\vec{a}}(\text{x is a scalar and} \ \ \vec{a}^T\vec{a}\text{ is a number.}) \\ \because \ \ & p=x\vec{a}=\vec{a}x \\ \therefore \ \ & p=\vec{a}x= \vec{a}\frac{\vec{a}^T\vec{b}}{\vec{a}^T\vec{a}} \Rightarrow p=\underbrace{\boxed{\frac{\vec{a}\vec{a}^T}{\vec{a}^T\vec{a}}}}_{projection}\vec{b} \Rightarrow projection \ \ p = \vec{p} \times \vec{b} \\ &\text{证明:2.推广:将向量投影到平面} \vec{A} \\ \because \ \ & \vec{p}=\hat{x_1}a_1+\hat{x_2}a_2 = \left[\begin{array} {c} a_1 \ \ a_2 \end{array}\right] \left[\begin{array} {c} x_1 \\ x_2 \end{array}\right ]={\vec{A}}\hat{X};\\ \ \ & \boxed{ \vec{b}-{\vec{A}}\hat{X} } \perp \boxed{plane \ \ A} ; \\ \therefore \ \ & \left[\begin{array} {c} a_1^T \\ a_2^T \end{array}\right](b-\vec{A}\hat{x})=\vec{0} \\ \ \ & \Rightarrow \vec{A}^T(\vec{b}-\vec{A}\hat{X})=\vec{0}\Rightarrow \vec{A}^T\vec{A}\hat{X}=\vec{A}^T\vec{b}(\vec{e}=\vec{b}-\vec{A}\hat{X},\vec{e}位于A转置的零空间)\\ \because \ \ & e \perp C(A) (\text{Column space of A}) \\ \therefore \ \ & \text{如果A为一维向量且定义为a,则} A^TA \text{为一个数。} \\ \therefore \ \ & \vec{A}^T\vec{A}\hat{X}=\vec{A}^T\vec{b} \Rightarrow \hat{X}=(\vec{A}^T\vec{A})^{-1}\vec{A}^T\vec{b} \Rightarrow \vec{P}=\vec{A}\hat{X}=\underbrace{\boxed{\vec{A}(\vec{A}^T\vec{A})^{-1}A^T}}_{Projection \ \ matrix}b \end{aligned}
Known: ∵ ∴ ∴ ∴ ∵ ∴ ∵ ∴ ∵ ∴ ∴ b is projected onto the vector a to form a projection p.p=xa,where x is a expansion coefficient and x is a scalar. e=b−p,where e is a error.证明:1.将向量投影到向量aa⊥eaT(b−p)=0⇒aT(b−xa)=0⇒aTb−xaTa=0xaTa=aTbx=aTaaTb(x is a scalar and aTa is a number.)p=xa=axp=ax=aaTaaTb⇒p=projection
aTaaaTb⇒projection p=p×b证明:2.推广:将向量投影到平面Ap=x1^a1+x2^a2=[a1 a2][x1x2]=AX^;b−AX^⊥plane A;[a1Ta2T](b−Ax^)=0⇒AT(b−AX^)=0⇒ATAX^=ATb(e=b−AX^,e位于A转置的零空间)e⊥C(A)(Column space of A)如果A为一维向量且定义为a,则ATA为一个数。ATAX^=ATb⇒X^=(ATA)−1ATb⇒P=AX^=Projection matrix
A(ATA)−1ATb
key 1 : A一定是方阵,所以不存在 A − 1 A^{-1} A−1。
key 2 : 投影矩阵是对称矩阵。 ⇒ \Rightarrow ⇒ P T = P , P 2 = P P^T=P,P^2=P PT=P,P2=P