Projection (linear algebra)

In linear algebra and functional analysis, a **projection** is a linear transformation

P

{\displaystyle P}

 from a vector space to itself such that

P

2

=
P

{\displaystyle P^{2}=P}

. That is, whenever

P

{\displaystyle P}

 is applied twice to any value, it gives the same result as if it were applied once (idempotent). It leaves its image unchanged. Though abstract, this definition of "projection" formalizes and generalizes the idea of graphical projection. One can also consider the effect of a projection on a geometrical object by examining the effect of the projection on points in the object.

## Definitions

A **projection** on a vector space

V

{\displaystyle V}

 is a linear operator

P
:
V
↦
V

{\displaystyle P:V\mapsto V}

 such that

P

2

=
P

{\displaystyle P^{2}=P}

.

When

V

{\displaystyle V}

 has an inner product and is complete (i.e. when

V

{\displaystyle V}

 is a Hilbert space) the concept of orthogonality can be used. A projection

P

{\displaystyle P}

 on a Hilbert space

V

{\displaystyle V}

 is called an **orthogonal projection** if it satisfies

⟨
P
x
,
y
# ⟩
⟨
x
,
P
y
⟩

{\displaystyle \langle Px,y\rangle =\langle x,Py\rangle }

 for all

x
,
y
∈
V

{\displaystyle x,y\in V}

.
A projection on a Hilbert space that is not orthogonal is called an **oblique projection**.

### Projection matrix

* In the finite-dimensional case, a square matrix

P

{\displaystyle P}

 is called a **projection matrix** if it is equal to its square, i.e. if

P

2

=
P

{\displaystyle P^{2}=P}

.
* A square matrix

P

{\displaystyle P}

 is called an **orthogonal projection matrix** if

P

2

=
# P

P

T

{\displaystyle P^{2}=P=P^{\mathrm {T} }}

 for a real matrix, and respectively

P

2

=
# P

P

H

{\displaystyle P^{2}=P=P^{\mathrm {H} }}

 for a complex matrix, where

P

T

{\displaystyle P^{\mathrm {T} }}

 denotes the transpose of

P

{\displaystyle P}

 and

P

H

{\displaystyle P^{\mathrm {H} }}

 denotes the Hermitian transpose of

P

{\displaystyle P}

.
* A projection matrix that is not an orthogonal projection matrix is called an **oblique projection matrix**.

The eigenvalues of a projection matrix must be 0 or 1.

## Examples

### Orthogonal projection

For example, the function which maps the point

(
x
,
y
,
z
)

{\displaystyle (x,y,z)}

 in three-dimensional space

R

3

{\displaystyle \mathbb {R} ^{3}}

 to the point

(
x
,
y
,
0
)

{\displaystyle (x,y,0)}

 is an orthogonal projection onto the *x*–*y* plane. This function is represented by the matrix

# P

[

1

0

0

0

1

0

0

0

0

]

.

{\displaystyle P={\begin{bmatrix}1&0&0\\0&1&0\\0&0&0\end{bmatrix}}.}

The action of this matrix on an arbitrary vector is

P

(

x

y

z

)

=

(

x

y

0

)

.

{\displaystyle P{\begin{pmatrix}x\\y\\z\end{pmatrix}}={\begin{pmatrix}x\\y\\0\end{pmatrix}}.}

To see that

P

{\displaystyle P}

 is indeed a projection, i.e.,

# P

P

2

{\displaystyle P=P^{2}}

, we compute

P

2

(

x

y

z

)

=
P

(

x

y

0

)

=

(

x

y

0

)

=
P

(

x

y

z

)

{\displaystyle P^{2}{\begin{pmatrix}x\\y\\z\end{pmatrix}}=P{\begin{pmatrix}x\\y\\0\end{pmatrix}}={\begin{pmatrix}x\\y\\0\end{pmatrix}}=P{\begin{pmatrix}x\\y\\z\end{pmatrix}}}

.
Observing that

P

T

=
P

{\displaystyle P^{\mathrm {T} }=P}

 shows that the projection is an orthogonal projection.

### Oblique projection

A simple example of a non-orthogonal (oblique) projection (for definition see below) is

# P

[

0

0

α

1

]

.

{\displaystyle P={\begin{bmatrix}0&0\\\alpha &1\end{bmatrix}}.}

Via matrix multiplication, one sees that

P

2

=

[

0

0

α

1

]

[

0

0

α

1

]

=

[

0

0

α

1

]

=
P
.

{\displaystyle P^{2}={\begin{bmatrix}0&0\\\alpha &1\end{bmatrix}}{\begin{bmatrix}0&0\\\alpha &1\end{bmatrix}}={\begin{bmatrix}0&0\\\alpha &1\end{bmatrix}}=P.}

proving that

P

{\displaystyle P}

 is indeed a projection.

The projection

P

{\displaystyle P}

 is orthogonal if and only if

# α
0

{\displaystyle \alpha =0}

 because only then

P

T

=
P

{\displaystyle P^{\mathrm {T} }=P}

.

## Properties and classification

### Idempotence

By definition, a projection

P

{\displaystyle P}

 is idempotent (i.e.

P

2

=
P

{\displaystyle P^{2}=P}

).

### Complementarity of range and kernel

Let

W

{\displaystyle W}

 be a finite dimensional vector space and

P

{\displaystyle P}

 be a projection on

W

{\displaystyle W}

. Suppose the subspaces

U

{\displaystyle U}

 and

V

{\displaystyle V}

 are the range and kernel of

P

{\displaystyle P}

 respectively.
Then

P

{\displaystyle P}

 has the following properties:

1. P

{\displaystyle P}

 is the identity operator

I

{\displaystyle I}

 on

U

{\displaystyle U}

∀
x
∈
U
:
P
# x
x

{\displaystyle \forall x\in U:Px=x}

.
2. We have a direct sum

# W
U
⊕
V

{\displaystyle W=U\oplus V}

. Every vector

x
∈
W

{\displaystyle x\in W}

 may be decomposed uniquely as

# x
u
v

{\displaystyle x=u+v}

 with

# u
P
x

{\displaystyle u=Px}

 and

# v
x
−
P
# x
(
I
−
P
)
x

{\displaystyle v=x-Px=(I-P)x}

, and where

u
∈
U
,
v
∈
V

{\displaystyle u\in U,v\in V}

.

The range and kernel of a projection are *complementary*, as are

P

{\displaystyle P}

 and

# Q
I
−
P

{\displaystyle Q=I-P}

. The operator

Q

{\displaystyle Q}

 is also a projection as the range and kernel of

P

{\displaystyle P}

 become the kernel and range of

Q

{\displaystyle Q}

 and vice versa. We say

P

{\displaystyle P}

 is a projection along

V

{\displaystyle V}

 onto

U

{\displaystyle U}

 (kernel/range) and

Q

{\displaystyle Q}

 is a projection along

U

{\displaystyle U}

 onto

V

{\displaystyle V}

.

### Spectrum

In infinite dimensional vector spaces, the spectrum of a projection is contained in

{
0
,
1
}

{\displaystyle \{0,1\}}

 as

(
λ
I
−
P

)

−
1

=

1
λ

I

1

λ
(
λ
−
1
)

P
.

{\displaystyle (\lambda I-P)^{-1}={\frac {1}{\lambda }}I+{\frac {1}{\lambda (\lambda -1)}}P.}

Only 0 or 1 can be an eigenvalue of a projection. This implies that an orthogonal projection

P

{\displaystyle P}

 is always a positive semi-definite matrix. In general, the corresponding eigenspaces are (respectively) the kernel and range of the projection. Decomposition of a vector space into direct sums is not unique. Therefore, given a subspace

V

{\displaystyle V}

, there may be many projections whose range (or kernel) is

V

{\displaystyle V}

.

If a projection is nontrivial it has minimal polynomial

x

2

−
# x
x
(
x
−
1
)

{\displaystyle x^{2}-x=x(x-1)}

, which factors into distinct roots, and thus

P

{\displaystyle P}

 is diagonalizable.

### Product of projections

The product of projections is not in general a projection, even if they are orthogonal. If two projections commute then their product is a projection, but the converse is false: the product of two non-commuting projections may be a projection .

If two orthogonal projections commute then their product is an orthogonal projection. If the product of two orthogonal projections is an orthogonal projection, then the two orthogonal projections commute (more generally: two self-adjoint endomorphisms commute if and only if their product is self-adjoint).

### Orthogonal projections

When the vector space

W

{\displaystyle W}

 has an inner product and is complete (is a Hilbert space) the concept of orthogonality can be used. An **orthogonal projection** is a projection for which the range

U

{\displaystyle U}

 and the null space

V

{\displaystyle V}

 are orthogonal subspaces. Thus, for every

x

{\displaystyle x}

 and

y

{\displaystyle y}

 in

W

{\displaystyle W}

,

⟨
P
x
,
(
y
−
P
y
)
# ⟩
⟨
(
x
−
P
x
)
,
P
y
# ⟩
0

{\displaystyle \langle Px,(y-Py)\rangle =\langle (x-Px),Py\rangle =0}

. Equivalently:

⟨
x
,
P
y
# ⟩
⟨
P
x
,
P
y
# ⟩
⟨
P
x
,
y
⟩

{\displaystyle \langle x,Py\rangle =\langle Px,Py\rangle =\langle Px,y\rangle }

.
A projection is orthogonal if and only if it is self-adjoint. Using the self-adjoint and idempotent properties of

P

{\displaystyle P}

, for any

x

{\displaystyle x}

 and

y

{\displaystyle y}

 in

W

{\displaystyle W}

 we have

P
x
∈
U

{\displaystyle Px\in U}

,

y
−
P
y
∈
V

{\displaystyle y-Py\in V}

, and

⟨
P
x
,
y
−
P
y
# ⟩
⟨

P

2

x
,
y
−
P
y
# ⟩
⟨
P
x
,
P
(
I
−
P
)
y
# ⟩
⟨
P
x
,
(
P
−

P

2

)
y
# ⟩
0

{\displaystyle \langle Px,y-Py\rangle =\langle P^{2}x,y-Py\rangle =\langle Px,P(I-P)y\rangle =\langle Px,(P-P^{2})y\rangle =0\,}

where

⟨
⋅
,
⋅
⟩

{\displaystyle \langle \cdot ,\cdot \rangle }

 is the inner product associated with

W

{\displaystyle W}

. Therefore,

P
x

{\displaystyle Px}

 and

y
−
P
y

{\displaystyle y-Py}

 are orthogonal projections.
The other direction, namely that if

P

{\displaystyle P}

 is orthogonal then it is self-adjoint, follows from

⟨
x
,
P
y
# ⟩
⟨
P
x
,
y
# ⟩
⟨
x
,

P

∗

y
⟩

{\displaystyle \langle x,Py\rangle =\langle Px,y\rangle =\langle x,P^{\*}y\rangle }

for every

x

{\displaystyle x}

 and

y

{\displaystyle y}

 in

W

{\displaystyle W}

; thus

# P

P

∗

{\displaystyle P=P^{\*}}

.

H

{\displaystyle H}

 be a complete metric space with an inner product, and let

U

{\displaystyle U}

 be a closed linear subspace of

H

{\displaystyle H}

 (and hence complete as well).
For every

x

{\displaystyle x}

 the following set of non-negative norms

{
‖
x
−
u
‖

u
∈
U
}

{\displaystyle \{\|x-u\||u\in U\}}

 has an infimum, and due to the completeness of

U

{\displaystyle U}

 it is a minimum. We define

P
x

{\displaystyle Px}

 as the point in

U

{\displaystyle U}

 where this minimum is obtained.
Obviously

P
x

{\displaystyle Px}

 is in

U

{\displaystyle U}

. It remains to show that

P
x

{\displaystyle Px}

 satisfies

⟨
x
−
P
x
,
P
x
# ⟩
0

{\displaystyle \langle x-Px,Px\rangle =0}

 and that it is linear.
Let us define

# a
x
−
P
x

{\displaystyle a=x-Px}

. For every non-zero

v

{\displaystyle v}

 in

U

{\displaystyle U}

, the following holds:

‖
a
−

⟨
a
,
v
⟩

‖
v

‖

2

v

‖

2

=
‖
a

‖

2

−

⟨
a
,
v
⟩

2

‖
v

‖

2

By defining

# w
P
x

⟨
a
,
v
⟩

‖
v

‖

2

v

{\displaystyle w=Px+{\frac {\langle a,v\rangle }{\|v\|^{2}}}v}

 we see that

‖
x
−
w
‖
<
‖
x
−
P
x
‖

 unless

⟨
a
,
v
⟩

{\displaystyle \langle a,v\rangle }

 vanishes. Since

P
x

{\displaystyle Px}

 was chosen as the minimum of the abovementioned set, it follows that

⟨
a
,
v
⟩

{\displaystyle \langle a,v\rangle }

 indeed vanishes. In particular, (for

# y
P
x

{\displaystyle y=Px}

):

⟨
x
−
P
x
,
P
x
# ⟩
0

{\displaystyle \langle x-Px,Px\rangle =0}

.
Linearity follows from the vanishing of

⟨
x
−
P
x
,
v
⟩

{\displaystyle \langle x-Px,v\rangle }

 for every

v
∈
U

{\displaystyle v\in U}

:

⟨

(

x
y

)

−
P

(

x
y

)

,
v
# ⟩
0

{\displaystyle \langle \left(x+y\right)-P\left(x+y\right),v\rangle =0}

⟨

(

x
−
P
x

)

(

y
−
P
y

)

,
v
# ⟩
0

{\displaystyle \langle \left(x-Px\right)+\left(y-Py\right),v\rangle =0}

By taking the difference between the equations we have

⟨
P
x
P
y
−
P

(

x
y

)

,
v
# ⟩
0

{\displaystyle \langle Px+Py-P\left(x+y\right),v\rangle =0}

But since we may choose

# v
P
x
P
y
−
P
(
x
y
)

{\displaystyle v=Px+Py-P(x+y)}

 (as it is itself in

U

{\displaystyle U}

) it follows that

P
x
P
# y
P
(
x
y
)

{\displaystyle Px+Py=P(x+y)}

. Similarly we have

λ
P
# x
P
(
λ
x
)

{\displaystyle \lambda Px=P(\lambda x)}

 for every scalar

λ

{\displaystyle \lambda }

.

#### Properties and special cases

An orthogonal projection is a bounded operator. This is because for every

v

{\displaystyle v}

 in the vector space we have, by Cauchy–Schwarz inequality:

‖
P
v

‖

2

=
⟨
P
v
,
P
v
# ⟩
⟨
P
v
,
v
⟩
≤
‖
P
v
‖
⋅
‖
v
‖

Thus

‖
P
v
‖
≤
‖
v
‖

.

For finite dimensional complex or real vector spaces, the standard inner product can be substituted for

⟨
⋅
,
⋅
⟩

{\displaystyle \langle \cdot ,\cdot \rangle }

.

##### Formulas

A simple case occurs when the orthogonal projection is onto a line. If

u

{\displaystyle u}

 is a unit vector on the line, then the projection is given by the outer product

P

u

=
u

u

T

.

{\displaystyle P\_{u}=uu^{\mathrm {T} }.}

(If

u

{\displaystyle u}

 is complex-valued, the transpose in the above equation is replaced by a Hermitian transpose). This operator leaves *u* invariant, and it annihilates all vectors orthogonal to

u

{\displaystyle u}

, proving that it is indeed the orthogonal projection onto the line containing *u*. A simple way to see this is to consider an arbitrary vector

x

{\displaystyle x}

 as the sum of a component on the line (i.e. the projected vector we seek) and another perpendicular to it,

# x

x

∥

x

⊥

{\displaystyle x=x\_{\parallel }+x\_{\perp }}

. Applying projection, we get

P

u

# x
u

u

T

x

∥

u

u

T

x

⊥

=
u

(

s
i
g
n

(

u

T

x

∥

)
‖

x

∥

‖

)

u
⋅
# 0

x

∥

{\displaystyle P\_{u}x=uu^{\mathrm {T} }x\_{\parallel }+uu^{\mathrm {T} }x\_{\perp }=u\left(\mathrm {sign} (u^{\mathrm {T} }x\_{\parallel })\|x\_{\parallel }\|\right)+u\cdot 0=x\_{\parallel }}

by the properties of the dot product of parallel and perpendicular vectors.

This formula can be generalized to orthogonal projections on a subspace of arbitrary dimension. Let

u

1

,
…
,

u

k

{\displaystyle u\_{1},\ldots ,u\_{k}}

 be an orthonormal basis of the subspace

U

{\displaystyle U}

, and let

A

{\displaystyle A}

 denote the

n
×
k

{\displaystyle n\times k}

 matrix whose columns are

u

1

,
…
,

u

k

{\displaystyle u\_{1},\ldots ,u\_{k}}

, i.e

# A

[

u

1

…

u

k

]

{\displaystyle A={\begin{bmatrix}u\_{1}&\ldots &u\_{k}\end{bmatrix}}}

. Then the projection is given by:

P

A

=
A

A

T

{\displaystyle P\_{A}=AA^{\mathrm {T} }}

which can be rewritten as

P

A

=

∑

i

⟨

u

i

,
⋅
⟩

u

i

.

{\displaystyle P\_{A}=\sum \_{i}\langle u\_{i},\cdot \rangle u\_{i}.}

The matrix

A

T

{\displaystyle A^{\mathrm {T} }}

 is the partial isometry that vanishes on the orthogonal complement of

U

{\displaystyle U}

 and

A

{\displaystyle A}

 is the isometry that embeds

U

{\displaystyle U}

 into the underlying vector space. The range of

P

A

{\displaystyle P\_{A}}

 is therefore the *final space* of

A

{\displaystyle A}

. It is also clear that

A

A

T

{\displaystyle AA^{\mathrm {T} }}

 is the identity operator on

U

{\displaystyle U}

.

The orthonormality condition can also be dropped. If

u

1

,
…
,

u

k

{\displaystyle u\_{1},\ldots ,u\_{k}}

 is a (not necessarily orthonormal) basis, and

A

{\displaystyle A}

 is the matrix with these vectors as columns, then the projection is:

P

A

=
A
(

A

T

A

)

−
1

A

T

.

{\displaystyle P\_{A}=A(A^{\mathrm {T} }A)^{-1}A^{\mathrm {T} }.}

The matrix

A

{\displaystyle A}

 still embeds

U

{\displaystyle U}

 into the underlying vector space but is no longer an isometry in general. The matrix

(

A

T

A

)

−
1

{\displaystyle (A^{\mathrm {T} }A)^{-1}}

 is a "normalizing factor" that recovers the norm. For example, the rank-1 operator

u

u

T

{\displaystyle uu^{\mathrm {T} }}

 is not a projection if

‖
u
‖
≠

{\displaystyle \|u\|\neq 1.}

 After dividing by

u

T

# u
‖
u

‖

2

,

{\displaystyle u^{\mathrm {T} }u=\|u\|^{2},}

 we obtain the projection

u
(

u

T

u

)

−
1

u

T

{\displaystyle u(u^{\mathrm {T} }u)^{-1}u^{\mathrm {T} }}

 onto the subspace spanned by

u

{\displaystyle u}

.

In the general case, we can have an arbitrary positive definite matrix

D

{\displaystyle D}

 defining an inner product

⟨
x
,
y

⟩

D

=

y

†

D
x

{\displaystyle \langle x,y\rangle \_{D}=y^{\dagger }Dx}

, and the projection

P

A

{\displaystyle P\_{A}}

 is given by

P

A

# x

a
r
g
m
i
n

y
∈

r
a
n
g
e

(
A
)

‖
x
−
y

‖

D

2

{\displaystyle P\_{A}x=\mathrm {argmin} \_{y\in \mathrm {range} (A)}\|x-y\|\_{D}^{2}}

. Then

P

A

=
A
(

A

T

D
A

)

−
1

A

T

D
.

{\displaystyle P\_{A}=A(A^{\mathrm {T} }DA)^{-1}A^{\mathrm {T} }D.}

When the range space of the projection is generated by a frame (i.e. the number of generators is greater than its dimension), the formula for the projection takes the form:

P

A

=
A

A

{\displaystyle P\_{A}=AA^{+}}

. Here

A

{\displaystyle A^{+}}

 stands for the Moore–Penrose pseudoinverse. This is just one of many ways to construct the projection operator.

If

[

A

B

]

{\displaystyle {\begin{bmatrix}A&B\end{bmatrix}}}

 is a non-singular matrix and

A

T

# B
0

{\displaystyle A^{\mathrm {T} }B=0}

 (i.e.,

B

{\displaystyle B}

 is the null space matrix of

A

{\displaystyle A}

), the following holds:

I

=

[

A

B

]

[

A

B

]

−
1

[

A

T

B

T

]

−
1

[

A

T

B

T

]

=

[

A

B

]

(

[

A

T

B

T

]

[

A

B

]

)

−
1

[

A

T

B

T

]

=

[

A

B

]

[

A

T

A

O

O

B

T

B

]

−
1

[

A

T

B

T

]

=
A
(

A

T

A

)

−
1

A

T

B
(

B

T

B

)

−
1

B

T

{\displaystyle {\begin{aligned}I&={\begin{bmatrix}A&B\end{bmatrix}}{\begin{bmatrix}A&B\end{bmatrix}}^{-1}{\begin{bmatrix}A^{\mathrm {T} }\\B^{\mathrm {T} }\end{bmatrix}}^{-1}{\begin{bmatrix}A^{\mathrm {T} }\\B^{\mathrm {T} }\end{bmatrix}}\\&={\begin{bmatrix}A&B\end{bmatrix}}\left({\begin{bmatrix}A^{\mathrm {T} }\\B^{\mathrm {T} }\end{bmatrix}}{\begin{bmatrix}A&B\end{bmatrix}}\right)^{-1}{\begin{bmatrix}A^{\mathrm {T} }\\B^{\mathrm {T} }\end{bmatrix}}\\&={\begin{bmatrix}A&B\end{bmatrix}}{\begin{bmatrix}A^{\mathrm {T} }A&O\\O&B^{\mathrm {T} }B\end{bmatrix}}^{-1}{\begin{bmatrix}A^{\mathrm {T} }\\B^{\mathrm {T} }\end{bmatrix}}\\[4pt]&=A(A^{\mathrm {T} }A)^{-1}A^{\mathrm {T} }+B(B^{\mathrm {T} }B)^{-1}B^{\mathrm {T} }\end{aligned}}}

If the orthogonal condition is enhanced to

A

T

W
# B

A

T

W

T

# B
0

{\displaystyle A^{\mathrm {T} }WB=A^{\mathrm {T} }W^{\mathrm {T} }B=0}

 with

W

{\displaystyle W}

 non-singular, the following holds:

# I

[

A

B

]

[

(

A

T

W
A

)

−
1

A

T

(

B

T

W
B

)

−
1

B

T

]

W
.

{\displaystyle I={\begin{bmatrix}A&B\end{bmatrix}}{\begin{bmatrix}(A^{\mathrm {T} }WA)^{-1}A^{\mathrm {T} }\\(B^{\mathrm {T} }WB)^{-1}B^{\mathrm {T} }\end{bmatrix}}W.}

All these formulas also hold for complex inner product spaces, provided that the conjugate transpose is used instead of the transpose. Further details on sums of projectors can be found in Banerjee and Roy (2014). Also see Banerjee (2004) for application of sums of projectors in basic spherical trigonometry.

### Oblique projections

The term *oblique projections* is sometimes used to refer to non-orthogonal projections. These projections are also used to represent spatial figures in two-dimensional drawings (see oblique projection), though not as frequently as orthogonal projections. Whereas calculating the fitted value of an ordinary least squares regression requires an orthogonal projection, calculating the fitted value of an instrumental variables regression requires an oblique projection.

Projections are defined by their null space and the basis vectors used to characterize their range (which is the complement of the null space). When these basis vectors are orthogonal to the null space, then the projection is an orthogonal projection. When these basis vectors are not orthogonal to the null space, the projection is an oblique projection. Let the vectors

u

1

,
…
,

u

k

{\displaystyle u\_{1},\ldots ,u\_{k}}

 form a basis for the range of the projection, and assemble these vectors in the

n
×
k

{\displaystyle n\times k}

 matrix

A

{\displaystyle A}

. The range and the null space are complementary spaces, so the null space has dimension

n
−
k

{\displaystyle n-k}

. It follows that the orthogonal complement of the null space has dimension

k

{\displaystyle k}

. Let

v

1

,
…
,

v

k

{\displaystyle v\_{1},\ldots ,v\_{k}}

 form a basis for the orthogonal complement of the null space of the projection, and assemble these vectors in the matrix

B

{\displaystyle B}

. Then the projection is defined by

# P
A
(

B

T

A

)

−
1

B

T

.

{\displaystyle P=A(B^{\mathrm {T} }A)^{-1}B^{\mathrm {T} }.}

This expression generalizes the formula for orthogonal projections given above.

### Finding projection with an inner product

Let

V

{\displaystyle V}

 be a vector space (in this case a plane) spanned by orthogonal vectors

u

1

,

u

2

,
⋯
,

u

p

{\displaystyle u\_{1},u\_{2},\cdots ,u\_{p}}

. Let

y

{\displaystyle y}

 be a vector. One can define a projection of

y

{\displaystyle y}

 onto

V

{\displaystyle V}

 as

proj

V

⁡
# y

y
⋅

u

j

u

j

⋅

u

j

u

j

{\displaystyle \operatorname {proj} \_{V}y={\frac {y\cdot u^{j}}{u^{j}\cdot u^{j}}}u^{j}}

where the

j

{\displaystyle j}

 's imply  Einstein sum notation. The vector

y

{\displaystyle y}

 can be written as an orthogonal sum such that

# y

proj

V

⁡
y
z

{\displaystyle y=\operatorname {proj} \_{V}y+z}

.

proj

V

⁡
y

{\displaystyle \operatorname {proj} \_{V}y}

 is sometimes denoted as

y
^

{\displaystyle {\hat {y}}}

. There is a theorem in Linear Algebra that states that this

z

{\displaystyle z}

 is the shortest distance from

y

{\displaystyle y}

 to

V

{\displaystyle V}

 and is commonly used in areas such as machine learning.

# P

P

2

{\displaystyle P=P^{2}}

 on a vector space of dimension

d

{\displaystyle d}

 over a field is a diagonalizable matrix, since its minimal polynomial divides

x

2

−
x

{\displaystyle x^{2}-x}

, which splits into distinct linear factors. Thus there exists a basis in which

P

{\displaystyle P}

 has the form

# P

I

r

⊕

0

d
−
r

{\displaystyle P=I\_{r}\oplus 0\_{d-r}}

where

r

{\displaystyle r}

 is the rank of

P

{\displaystyle P}

. Here

I

r

{\displaystyle I\_{r}}

 is the identity matrix of size

r

{\displaystyle r}

, and

0

d
−
r

{\displaystyle 0\_{d-r}}

 is the zero matrix of size

d
−
r

{\displaystyle d-r}

. If the vector space is complex and equipped with an inner product, then there is an *orthonormal* basis in which the matrix of *P* is

# P

[

1

σ

1

0

0

]

⊕
⋯
⊕

[

1

σ

k

0

0

]

⊕

I

m

⊕

0

s

{\displaystyle P={\begin{bmatrix}1&\sigma \_{1}\\0&0\end{bmatrix}}\oplus \cdots \oplus {\begin{bmatrix}1&\sigma \_{k}\\0&0\end{bmatrix}}\oplus I\_{m}\oplus 0\_{s}}

 .
where

σ

1

≥

σ

2

≥
…
≥

σ

k

>
0

{\displaystyle \sigma \_{1}\geq \sigma \_{2}\geq \ldots \geq \sigma \_{k}>0}

. The integers

k
,
s
,
m

{\displaystyle k,s,m}

 and the real numbers

σ

i

{\displaystyle \sigma \_{i}}

 are uniquely determined. Note that

k
s
# m
d

{\displaystyle k+s+m=d}

. The factor

I

m

⊕

0

s

{\displaystyle I\_{m}\oplus 0\_{s}}

 corresponds to the maximal invariant subspace on which

P

{\displaystyle P}

 acts as an *orthogonal* projection (so that *P* itself is orthogonal if and only if

# k
0

{\displaystyle k=0}

) and the

σ

i

{\displaystyle \sigma \_{i}}

-blocks correspond to the *oblique* components.

## Projections on normed vector spaces

When the underlying vector space

X

{\displaystyle X}

 is a (not necessarily finite-dimensional) normed vector space, analytic questions, irrelevant in the finite-dimensional case, need to be considered. Assume now

X

{\displaystyle X}

 is a Banach space.

Many of the algebraic results discussed above survive the passage to this context. A given direct sum decomposition of

X

{\displaystyle X}

 into complementary subspaces still specifies a projection, and vice versa. If

X

{\displaystyle X}

 is the direct sum

# X
U
⊕
V

{\displaystyle X=U\oplus V}

, then the operator defined by

P
(
u
v
# )
u

{\displaystyle P(u+v)=u}

 is still a projection with range

U

{\displaystyle U}

 and kernel

V

{\displaystyle V}

. It is also clear that

P

2

=
P

{\displaystyle P^{2}=P}

. Conversely, if

P

{\displaystyle P}

 is projection on

X

{\displaystyle X}

, i.e.

P

2

=
P

{\displaystyle P^{2}=P}

, then it is easily verified that

(
1
−
P

)

2

=
(
1
−
P
)

{\displaystyle (1-P)^{2}=(1-P)}

. In other words,

1
−
P

{\displaystyle 1-P}

 is also a projection. The relation

P

2

=
P

{\displaystyle P^{2}=P}

 implies

# 1
P
(
1
−
P
)

{\displaystyle 1=P+(1-P)}

 and

X

{\displaystyle X}

 is the direct sum

r
a
n

(
P
)
⊕

r
a
n

(
1
−
P
)

{\displaystyle \mathrm {ran} (P)\oplus \mathrm {ran} (1-P)}

.

However, in contrast to the finite-dimensional case, projections need not be continuous in general. If a subspace

U

{\displaystyle U}

 of

X

{\displaystyle X}

 is not closed in the norm topology, then projection onto

U

{\displaystyle U}

 is not continuous. In other words, the range of a continuous projection

P

{\displaystyle P}

 must be a closed subspace. Furthermore, the kernel of a continuous projection (in fact, a continuous linear operator in general) is closed. Thus a *continuous* projection

P

{\displaystyle P}

 gives a decomposition of

X

{\displaystyle X}

 into two complementary *closed* subspaces:

# X

r
a
n

(
P
)
⊕

k
e
r

(
P
# )

k
e
r

(
1
−
P
)
⊕

k
e
r

(
P
)

{\displaystyle X=\mathrm {ran} (P)\oplus \mathrm {ker} (P)=\mathrm {ker} (1-P)\oplus \mathrm {ker} (P)}

.

The converse holds also, with an additional assumption. Suppose

U

{\displaystyle U}

 is a closed subspace of

X

{\displaystyle X}

. If there exists a closed subspace

V

{\displaystyle V}

 such that *X* = *U* ⊕ *V*, then the projection

P

{\displaystyle P}

 with range

U

{\displaystyle U}

 and kernel

V

{\displaystyle V}

 is continuous. This follows from the closed graph theorem. Suppose *xn* → *x* and *Pxn* → *y*. One needs to show that

P
# x
y

{\displaystyle Px=y}

. Since

U

{\displaystyle U}

 is closed and {*Pxn*} ⊂ *U*, *y* lies in

U

{\displaystyle U}

, i.e. *Py* = *y*. Also, *xn* − *Pxn* = (*I* − *P*)*xn* → *x* − *y*. Because

V

{\displaystyle V}

 is closed and {(*I* − *P*)*xn*} ⊂ *V*, we have

x
−
y
∈
V

{\displaystyle x-y\in V}

, i.e.

P
(
x
−
y
# )
P
x
−
P
# y
P
x
−
# y
0

{\displaystyle P(x-y)=Px-Py=Px-y=0}

, which proves the claim.

The above argument makes use of the assumption that both

U

{\displaystyle U}

 and

V

{\displaystyle V}

 are closed. In general, given a closed subspace

U

{\displaystyle U}

, there need not exist a complementary closed subspace

V

{\displaystyle V}

, although for Hilbert spaces this can always be done by taking the orthogonal complement. For Banach spaces, a one-dimensional subspace always has a closed complementary subspace. This is an immediate consequence of Hahn–Banach theorem. Let

U

{\displaystyle U}

 be the linear span of

u

{\displaystyle u}

. By Hahn–Banach, there exists a bounded linear functional

φ

{\displaystyle \varphi }

 such that *φ*(*u*) = 1. The operator

P
(
x
# )
φ
(
x
)
u

{\displaystyle P(x)=\varphi (x)u}

 satisfies

P

2

=
P

{\displaystyle P^{2}=P}

, i.e. it is a projection. Boundedness of

φ

{\displaystyle \varphi }

 implies continuity of

P

{\displaystyle P}

 and therefore

ker
⁡
(
P
# )
ran
⁡
(
I
−
P
)

{\displaystyle \operatorname {ker} (P)=\operatorname {ran} (I-P)}

 is a closed complementary subspace of

U

{\displaystyle U}

.

## Applications and further considerations

Projections (orthogonal and otherwise) play a major role in algorithms for certain linear algebra problems:

* QR decomposition (see Householder transformation and Gram–Schmidt decomposition);
* Singular value decomposition
* Reduction to Hessenberg form (the first step in many eigenvalue algorithms)
* Linear regression
* Projective elements of matrix algebras are used in the construction of certain K-groups in Operator K-theory

As stated above, projections are a special case of idempotents. Analytically, orthogonal projections are non-commutative generalizations of characteristic functions. Idempotents are used in classifying, for instance, semisimple algebras, while measure theory begins with considering characteristic functions of measurable sets. Therefore, as one can imagine, projections are very often encountered in the context operator algebras. In particular, a von Neumann algebra is generated by its complete lattice of projections.

## Generalizations

More generally, given a map between normed vector spaces

T
:
V
→
W
,

{\displaystyle T\colon V\to W,}

 one can analogously ask for this map to be an isometry on the orthogonal complement of the kernel: that

(
ker
⁡
T

)

⊥

→
W

{\displaystyle (\ker T)^{\perp }\to W}

 be an isometry (compare Partial isometry); in particular it must be onto. The case of an orthogonal projection is when *W* is a subspace of *V.* In Riemannian geometry, this is used in the definition of a Riemannian submersion.