Finite Dimensional Space Orthogonal Projection...

42
Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick Computer Science, Graduate Center City University of New York

Transcript of Finite Dimensional Space Orthogonal Projection...

Page 1: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Finite Dimensional Space OrthogonalProjection Operators

Robert M. Haralick

Computer Science, Graduate CenterCity University of New York

Page 2: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Spaces

Spaces have points called vectorsSpaces have sets of pointsSome sets are called subspacesSpaces have directionsSpaces have sets of directionsSpaces have a language of representing points in terms oftraveling different lengths in different directions

Page 3: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Vector Spaces

DefinitionA space V is a vector space over a field of scalars S if and onlyif

x ∈ V and y ∈ V implies x + y ∈ Vx + y = y + x

x + (y + z) = (x + y) + z

There exists 0 ∈ V satisfying x + 0 = x for every x ∈ Vx ∈ V implies there exists a unique y ∈ V such that x + y = 0

If x ∈ V and α ∈ S, then αx ∈ VIf α, β ∈ S and x ∈ V, then α(βx) = (αβ)x

There exists a scalar 1 ∈ S

x ∈ V implies 1x = x

α(x + y) = αx + αy

(α+ β)x = αx + βx

Page 4: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Language of Spaces

The words of the language are the basis elementsb1,b2, . . . ,bN , ||bn|| = 1,n = 1, . . . ,N

The basis elements specify independent directionsThe sentence takes the form

∑Nn=1 αnbn

The meaning of the sentence isBegin at the originGo α1 in direction b1Go α2 in direction b2. . .Go αN in direction bNAnd you arrive at the point represented by (α1, . . . , αN)

The set of all places that can be reached by such asentence is called the space spanned by the directionsb1, . . . ,bN

The interesting sentences are the minimal ones

Page 5: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Linear Independence

Minimal sentence means using independent directions.

Definitionb1, . . . ,bN are independent directions (linearly independent)when

N∑n=1

αnbn = 0 if and only if αn = 0,n = 1, . . . ,N

If you travel α1 in direction b1, then travel α2 in direction b2, . . .,then travel αN in direction bN and you return to the origin, thenthe directions are dependent.

Page 6: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Linear Dependence

Definitionb1, . . . ,bN are linearly dependent if and only if for someα1, . . . , αN , not all 0

N∑n=1

αnbn = 0

If you travel α1 in direction b1, then travel α2 in direction b2, . . .,then travel αN in direction bN and you return to the origin, thenthe directions are dependent.

Page 7: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Finite Dimensional Vectors and Transpose

x =

x1x2...

xN

y =

y1y2...

yN

x ′y =

N∑n=1

xnyn

xy ′ =

x1y1 x1y2 . . . x1yNx2y1 x2y2 . . . x2yN

...xNy1 xNy2 . . . xNyN

Page 8: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Angles

b′

i bj cosine of the angle between directions bi and bj

b′

i bj = b′

j bi

b′

i bi = squared length

b′

i bi = ||bi ||2

b′(c + d) = b

′c + b

′d

(αb)′c = α(b

′c)

bi ⊥ bj means geometrically orthogonal

bi ⊥ bj if and only if b′

i bj = 0b1, . . . ,bN is orthonormal if and only if

b′

i bj = 0 when i 6= j||bi || = 1

Page 9: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Lengths

DefinitionThe length of a vector x is its distance from the origin.

||x || =√

x ′x

Let x =∑N

n=1 αnbn and b1, . . . ,bN be orthonormal

||x ||2 = ||N∑

i=1

αibi ||2 = (N∑

i=1

αibi)′

N∑j=1

αjbj

=N∑

i=1

αib′

i (N∑

j=1

αjbj) =N∑

i=1

N∑j=1

αiαjb′

i bj

=N∑

i=1

α2i b′

i bi +N∑

i=1

N∑j=1j 6=i

αiαjb′

i bj =N∑

i=1

α2i

Page 10: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Coordinate Representation

Let b1, . . . ,bN be an orthonormal basisLet x be a vectorFind α1, . . . , αN such that x =

∑Nn=1 αnbn

Suppose x =∑N

n=1 αnbn.

b′

i x = b′

i (N∑

n=1

αnbn)

=N∑

n=1

αnb′

i bn

= αib′

i bi = αi

x = (α1, . . . , αN) with respect to basis b1, . . . ,bnChange the basis and you change the coordinaterepresentation.

Page 11: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Inner Product

Let x = (α1, . . . , αN), y = (β1, . . . , βN), be coordinates withrespect to orthonormal basis b1, . . . ,bN

x′y = (

N∑i=1

αibi)′(

N∑j=1

βjbj)

=N∑

i=1

αib′

i (N∑

j=1

βjbj) =N∑

i=1

N∑j=1

αiβjb′

i bj

=N∑

i=1

αiβib′

i bi +N∑

i=1

N∑j=1j 6=i

αiβjb′

i bj

=N∑

i=1

αiβi

Page 12: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Dimensionality

N: Dimension of SpaceNumber of directions required in a minimal sentence tospecify (reach) any point in the spaceNumber of degrees of freedom needed to represent a pointin the space{x | x =

∑Nn=1 αnbn}

M: Dimension of SubspaceNumber of directions required in a minimal sentence tospecify (reach) any point in the subspaceNumber of degrees of freedom needed to represent a pointin the subspace{x | x =

∑Mm=1 βmbm}

{x | x =∑M

m=1 βmbm +∑N

m=M+1 0bm}M degrees of freedom; N −M degrees of constraint

Page 13: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Constraints

M: Dimension of SubspaceNumber of directions required in a minimal sentence tospecify (reach) any point in the subspaceNumber of degrees of freedom needed to represent a pointin the subspace{x | x =

∑Mm=1 βmbm}

{x | x =∑M

m=1 βmbm +∑N

m=M+1 0bm}M degrees of freedom; N −M degrees of constraint

Let i ∈ {M + 1, . . . ,N} and b1, . . . ,bN be orthonormal.Consider b

i x

b′

i x = b′

i

M∑m=1

βmbm =M∑

m=1

b′

iβmbm =M∑

m=1

βmb′

i bm

=M∑

m=1

βm0 = 0

Page 14: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Co-Dimension

M: Dimension of SubspaceNumber of directions required in a minimal sentence tospecify (reach) any point in the subspaceNumber of degrees of freedom needed to represent a pointin the subspace{x | x =

∑Mm=1 βmbm}

{x | x =∑M

m=1 βmbm +∑N

m=M+1 0bm}M degrees of freedomN −M degrees of constraintN −M Co-dimension

N −M Constraints

Let i ∈ {M + 1, . . . ,N} and b1, . . . ,bN be orthonormal.

b′

i x = 0, i ∈ {M + 1, . . . ,N}

Page 15: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Basis Vectors

Let b1, . . . ,bN be an orthonormal basis for a space S.Each bn is a directionThe length of each bn is oneA direction and a length represents a point or vector in thespacebi ⊥ bj , i 6= jbn is a point or vector in the space

Page 16: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Representing Subspaces

b1

b2

2-Dimensional Space

1-Dimensional Space

{x | for some α1, x = α1b1}{x | b′2x = 0}

Page 17: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Representing Subspaces

N Dimensional Space SM Dimensional Subspace Tb1, . . . ,bN orthonormal basisS = {x | for some α1, . . . , αN , x =

∑Nn=1 αnbn}

M degrees of freedomT = {x | for some α1, . . . , αM , x =

∑Mm=1 αmbm}

N −M degrees of constraintT = {x | b′

i x = 0, i ∈ {M + 1, . . . ,N}}

Page 18: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Orthogonal Subspaces

DefinitionA subspace T is orthogonal to a subspace U if and only if t ∈ Tand u ∈ U implies

t′u = 0

DefinitionLet T be a subspace of S. The orthogonal complement of T ,denoted by T⊥, is defined by

T⊥ = {x ∈ S |for every t ∈ T , x′t = 0}

Page 19: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Orthogonal Subspaces

PropositionLet b1, . . . ,bN be an orthogonal basis of S. Let V be asubspace of S spanned by b1, . . . ,bM . Then V⊥ is thesubspace spanned by bM+1 . . . ,bN

Proof.

V⊥ = {x ∈ S | v ∈ V implies x′v = 0}

x′v = x

′M∑

m=1

αmbm = (N∑

n=1

βnbn)′

M∑m=1

αmbm

=N∑

n=1

βn

M∑m=1

αmb′nbm =

M∑m=1

αmβm

∑Mm=1 αmβm = 0 for all α1, . . . , αM implies β1 = 0, . . . , βM = 0

Therefore,

V⊥ = {x | x =N∑

i=M+1

βibi}

Page 20: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Orthogonal Representations

PropositionLet V be a subspace of S and let x ∈ S. Then there exists av ∈ V and w ∈ V⊥ such that x = v + w

Proof.Let b1, . . . ,bN be an orthonormal basis for S such thatb1, . . . ,bM is an orthonormal basis for V and bM+1, . . .bN is anorthonormal basis for V⊥ Then for some α1, . . . , αN ,

x =N∑

n=1

αnbn =M∑

n=1

αnbn +N∑

i=M+1

αibi

But v =∑M

n=1 αnbn ∈ V and w =∑N

i=M+1 αibi ∈ V⊥.Therefore x = v + w for v ∈ V and w ∈ V⊥.

Page 21: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Orthogonal Projection

DefinitionLet V be a subspace of S. Let x ∈ S and x = v + w wherev ∈ V and w ∈ V⊥. Then v is called the orthogonal projectionof x onto V .

Page 22: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Orthogonal Projections are Unique

PropositionLet V be a subspace of S. Let x ∈ S and x = v1 +w1 = v2 +w2where v1, v2 ∈ V and w1,w2 ∈ V⊥. Then v1 = v2.

Proof.Let b1, . . . ,bM be an orthonormal basis for V . Thenv1 =

∑Mm=1 αmbm and v2 =

∑Mm=1 βmbm.

b′

i x = b′

i (v1 + w1) = b′

i

M∑m=1

αmbm = αi

= b′

i (v2 + w2) = b′

i

M∑m=1

βmbm = βi

Therefore, αi = βi , i = 1, . . . ,M

Page 23: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Orthogonal Projection Operator

Proposition

Let V be an M dimensional subspace of S. Let x ∈ S and x = v + wwhere v ∈ V and w ∈ V⊥. Let b1, . . . ,bN be an orthonormal basis ofS and b1, . . . ,bM be an orthonormal basis of V . Then v = Px whereP =

∑Mm=1 bmb

m.

Proof.

x ∈ S implies x =∑N

n=1 βnbn =∑M

m=1 βmbm +∑N

n=M+1 βnbn. Then

b′

mx = b′

m

N∑n=1

βnbn =N∑

n=1

βnb′

mbn = βm

Now,

v =M∑

m=1

βmbm =M∑

m=1

(b′

mx)bm = (M∑

m=1

bmb′

m)x

= Px

Page 24: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Orthogonal Projection Operator

PropositionLet b1, . . . ,bN be an orthonormal basis S and b1, . . . ,bM anorthonormal basis for the subspace V of S. ThenP =

∑Mm=1 bmb

′m is the orthogonal projection operator to V .

Page 25: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Orthogonal Projection Operators

Proposition

If P is an orthogonal projection operator to the subspace V of S, then

P2 = P

P = P′

Proof.

Let b1, . . . , bM be an orthonormal basis for V . Then,

P2 =M∑

m=1

bmb′m

M∑i=1

bib′i

=M∑

m=1

bm

M∑i=1

(b′mbi)b

′i =

M∑m=1

bmb′m = P

P′

= (M∑

m=1

bmb′m)

′=

M∑m=1

(bmb′m)

=M∑

m=1

bmb′m = P

Page 26: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Uniqueness

Proposition

Suppose P = P2, P = P′, Q = Q2, and Q = Q

′. If PQ = Q and

QP = P, then Q = P.

Proof.

Q = PQ = (PQ)′= Q

′P′= QP = P

Page 27: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Orthogonal Projection Operators are Unique

PropositionLet V be a M dimensional subspace of S. Let b1, . . . ,bM beone orthonormal basis for V and let c1, . . . , cM be anotherorthonormal basis for V . Define P =

∑Mm=1 bmb

′m and

Q =∑M

m=1 cmc′m. Then Q = P.

Proof.By the definition of orthogonal projection operators, both P andQ are orthogonal projection operators onto V . Hence, P = P2

and P = P′. Likewise, Q = Q2 and Q = Q

′. Since the columns

of P and Q are in V , PQ = Q and QP = P By the uniquenessproposition, Q = P.

Page 28: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Orthogonal Projection Operator CharacterizationTheorem

Theorem

If P = P2 and P = P′, then P is the orthogonal projection

operator onto Col(P).

Proof.Let b1, . . . ,bM be an orthonormal basis for Col(P). DefineQ =

∑Mm=1 bmb

′m. Then Q = Q2 and Q = Q

′. Clearly,

Col(Q) = Col(P) so that QP = P and PQ = Q. By theuniqueness proposition, P = Q. And since Q is the orthogonalprojection operator onto Col(P), P must also be the orthogonalprojection operator onto Col(P).

Page 29: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Projection Operators

Definition

P is called a projection operator if and only if P2 = P

(.3 .7.3 .7

)(.3 .7.3 .7

)=

(.3 .7.3 .7

)(

1 −10 0

)(1 −10 0

)=

(1 −10 0

)(.2 .4.4 .8

)(.2 .4.4 .8

)=

(.2 .4.4 .8

)

Page 30: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Trace

DefinitionLet A = (aij) be a square N × N matrix.

Trace(A) =N∑

n=1

ann

Proposition

Trace(∑N

n=1 αnAn) =∑N

n=1 αnTrace(An)

Page 31: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Trace

Proposition

Trace(AB) = Trace(BA)

Proof.

Let CN×N = (cij) = AN×K BK×N and DK×K = (dmn) = BK×NAN×K .

cij =K∑

k=1

aik bkj

dmn =N∑

i=1

bmiain

Trace(C) =N∑

i=1

cii =N∑

i=1

K∑k=1

aik bki

=K∑

k=1

N∑i=1

bkiaik =K∑

k=1

dkk = Trace(D) = Trace(BA)

Page 32: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Trace

Corollary

x′Ax = Trace(Axx

′)

Proof.

x′Ax = Trace(x

′Ax) = Trace(x

′(Ax))

= Trace((Ax)x′) = Trace(Axx

′)

Page 33: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Trace

Proposition

Let A = (aij) be a M × N matrix. Then

M∑m=1

N∑n=1

a2mn = Trace(AA

′)

Proof.

Let B = (bij) = AA′. Then bij =

∑Nn=1 ainajn. Hence,

bii =∑N

n=1 ainain =∑N

n=1 a2in. Therefore

Trace(B) = Trace(AA′) =

∑Mm=1 bmm =

∑Mm=1

∑Nn=1 a2

mn

Page 34: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Trace

PropositionLet P be an orthogonal projection operator to the Mdimensional subspace V . Then Trace(P) = M

Proof.Let b1, . . . ,bM be an orthonormal basis for V . ThenP =

∑Mm=1 bmb

′m

Trace(P) = Trace(M∑

m=1

bmb′m)

=M∑

m=1

Trace(bmb′m) =

M∑m=1

Trace(b′mbm)

=M∑

m=1

Trace(1) =M∑

m=1

1 = M

Page 35: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Trace

PropositionLet P be an orthogonal projection operator onto a Mdimensional subspace. Then

N∑i=1

N∑j=1

p2ij = M

Proof.

N∑i=1

N∑j=1

p2ij = Trace(PP ′) = Trace(PP) = Trace(P) = M

Page 36: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Kernel and Range

DefinitionThe Kernel of a matrix operator A is

Kernel(A) = {x |Ax = 0}

The Range of a matrix operator A is

Range(A) = {y | for some x , y = Ax}

Page 37: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Kernel and Range

PropositionLet P be a projection operator onto subspace V of S. Then

Range(P) + Ker(P) = S

Proof.Let x ∈ S. Px + (I − P)x = Px + x − Px = x. CertainlyPx ∈ Range(P). Consider (I − P)x.P[(I − P)x ] = Px − PPx = Px − Px = 0 Therefore, by definitionof Kernel(P), (I − P)x ∈ Kernel(P).

Page 38: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Kernel and Range

PropositionLet P be an orthogonal projection operator. ThenRange(P) ⊥ Kernel(P)

Proof.Let x ∈ Range(P) and y ∈ Kernel(P). Then for some u,x = Pu. Consider x

′y.

x′y = (Pu)

′y = u

′P′y = u

′Py

But y ∈ Kernel(P) so that Py=0. Therefore x′y = 0.

Page 39: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Projecting

b1b2

Range(P)Kernel(P)

P =

(.5 .5.5 .5

)

x

Px

Page 40: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

PropositionLet P be the orthogonal projection operator onto the subspaceV . Then I − P is the orthogonal projection operator onto thesubspace V⊥.

Proof.

(I − P)(I − P) = I − P − P + P2 = I − 2P + P = I − P(I − P)

′= I

′ − P′= I − P

V⊥ = Kernel(P). Let x ∈ V⊥. Then Px = 0. Consider(I − P)x = x − Px = x

Page 41: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Orthogonal Projection Minimizes Error

Theorem

Let V be a subspace of S. Let f : S → V and x ∈ S.

minf(x − f (x))′(x − f (x))

is achieved when f is the orthogonal projection operator from S to V

Proof.

Let x ∈ S. Then there exists v ∈ V and w ∈ V⊥ such that x = v + w. Consider

ε2 = (x − f (x))′(x − f (x))

= x ′x − (v + w)′f (x)− f (x)′(v + w) + f (x)′f (x)

= x ′x − v ′f (x)− f (x)′v − f (x)′f (x)

= (v + w)′(v + w)− v ′f (x)− f (x)′v − f (x)′f (x)

= v ′v − v ′f (x)− f (x)′v − f (x)′f (x) + w ′w

= (v − f (x))′(v − f (x)) + w ′w

ε2 is minimized by making f (x) = v, the orthogonal projection of x onto V .

Page 42: Finite Dimensional Space Orthogonal Projection Operatorsharalick.org/ML/Linearity_Projection_Operators.pdf · Finite Dimensional Space Orthogonal Projection Operators Robert M. Haralick

Constructing an Orthogonal Projection Operator

Proposition

Let X Z×N be of full rank. Then the orthogonal projection operatoronto the subspace col(X ) is given by X (X ′X )−1X ′.

Proof.

By definition col(X ) is spanned by the columns of X . Notice that X (X ′X )−1X ′

operating on X produces X.

X (X ′X )−1X ′X = X [(X ′X )−1(X ′X )] = X

Hence anything in col(X ) will be a fixed point of X (X ′X )−1X ′. Furthermore,for any z ∈ RN , X (X ′X )−1X ′z = X [(X ′X )−1X ′z] ∈ col(X ). Therefore,X (X ′X )−1X ′ maps onto col(X ).Now we check that X (X ′X )−1X ′ satisfies the definition of orthogonalprojection operator.

[X (X ′X )−1X ′][X (X ′X )−1X ′] = X [(X ′X )−1X ′X ](X ′X )−1X ′

= X (X ′X )−1X ′

[X (X ′X )−1X ′]′ = X (X ′X )−1X ′