# The orthogonal projection #

Given a nonempty complete subspace K of an inner product space E, this file constructs orthogonalProjection K : E โL[๐] K, the orthogonal projection of E onto K. This map satisfies: for any point u in E, the point v = orthogonalProjection K u in K minimizes the distance โu - vโ to u.

Also a linear isometry equivalence reflection K : E โโแตข[๐] E is constructed, by choosing, for each u : E, the point reflection K u to satisfy u + (reflection K u) = 2 โข orthogonalProjection K u.

Basic API for orthogonalProjection and reflection is developed.

Next, the orthogonal projection is used to prove a series of more subtle lemmas about the orthogonal complement of complete subspaces of E (the orthogonal complement itself was defined in Analysis.InnerProductSpace.Orthogonal); the lemma Submodule.sup_orthogonal_of_completeSpace, stating that for a complete subspace K of E we have K โ Kแฎ = โค, is a typical example.

## References #

The orthogonal projection construction is adapted from

• [Clรฉment & Martin, The Lax-Milgram Theorem. A detailed proof to be formalized in Coq]
• [Clรฉment & Martin, A Coq formal proof of the LaxโMilgram theorem]

The Coq code is available at the following address: http://www.lri.fr/~sboldo/elfic/index.html

### Orthogonal projection in inner product spaces #

theorem exists_norm_eq_iInf_of_complete_convex {F : Type u_3} [] {K : Set F} (ne : K.Nonempty) (hโ : ) (hโ : ) (u : F) :
โ v โ K, โu - vโ = โจ (w : โK), โu - โwโ

Existence of minimizers Let u be a point in a real inner product space, and let K be a nonempty complete convex subset. Then there exists a (unique) v in K that minimizes the distance โu - vโ to u.

theorem norm_eq_iInf_iff_real_inner_le_zero {F : Type u_3} [] {K : Set F} (h : ) {u : F} {v : F} (hv : v โ K) :
โu - vโ = โจ (w : โK), โu - โwโ โ โ w โ K, โชu - v, w - vโซ_โ โค 0

Characterization of minimizers for the projection on a convex set in a real inner product space.

theorem exists_norm_eq_iInf_of_complete_subspace {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] (K : Submodule ๐ E) (h : IsComplete โK) (u : E) :
โ v โ K, โu - vโ = โจ (w : โโK), โu - โwโ

Existence of projections on complete subspaces. Let u be a point in an inner product space, and let K be a nonempty complete subspace. Then there exists a (unique) v in K that minimizes the distance โu - vโ to u. This point v is usually called the orthogonal projection of u onto K.

theorem norm_eq_iInf_iff_real_inner_eq_zero {F : Type u_3} [] (K : ) {u : F} {v : F} (hv : v โ K) :
โu - vโ = โจ (w : โโK), โu - โwโ โ โ w โ K, โชu - v, wโซ_โ = 0

Characterization of minimizers in the projection on a subspace, in the real case. Let u be a point in a real inner product space, and let K be a nonempty subspace. Then point v minimizes the distance โu - vโ over points in K if and only if for all w โ K, โชu - v, wโซ = 0 (i.e., u - v is orthogonal to the subspace K). This is superceded by norm_eq_iInf_iff_inner_eq_zero that gives the same conclusion over any RCLike field.

theorem norm_eq_iInf_iff_inner_eq_zero {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] (K : Submodule ๐ E) {u : E} {v : E} (hv : v โ K) :
โu - vโ = โจ (w : โฅK), โu - โwโ โ โ w โ K, โชu - v, wโซ_๐ = 0

Characterization of minimizers in the projection on a subspace. Let u be a point in an inner product space, and let K be a nonempty subspace. Then point v minimizes the distance โu - vโ over points in K if and only if for all w โ K, โชu - v, wโซ = 0 (i.e., u - v is orthogonal to the subspace K)

class HasOrthogonalProjection {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] (K : Submodule ๐ E) :

A subspace K : Submodule ๐ E has an orthogonal projection if evey vector v : E admits an orthogonal projection to K.

• exists_orthogonal : โ (v : E), โ w โ K, v - w โ Kแฎ
Instances
theorem HasOrthogonalProjection.exists_orthogonal {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} [self : ] (v : E) :
โ w โ K, v - w โ Kแฎ
@[instance 100]
instance HasOrthogonalProjection.ofCompleteSpace {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] (K : Submodule ๐ E) [CompleteSpace โฅK] :
Equations
• โฏ = โฏ
instance instHasOrthogonalProjectionOrthogonal {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] (K : Submodule ๐ E) :
Equations
• โฏ = โฏ
instance HasOrthogonalProjection.map_linearIsometryEquiv {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] (K : Submodule ๐ E) {E' : Type u_4} [] [InnerProductSpace ๐ E'] (f : E โโแตข[๐] E') :
HasOrthogonalProjection (Submodule.map (โf.toLinearEquiv) K)
Equations
• โฏ = โฏ
instance HasOrthogonalProjection.map_linearIsometryEquiv' {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] (K : Submodule ๐ E) {E' : Type u_4} [] [InnerProductSpace ๐ E'] (f : E โโแตข[๐] E') :
HasOrthogonalProjection (Submodule.map f.toLinearIsometry K)
Equations
• โฏ = โฏ
instance instHasOrthogonalProjectionTopSubmodule {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] :
Equations
• โฏ = โฏ
def orthogonalProjectionFn {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] (K : Submodule ๐ E) (v : E) :
E

The orthogonal projection onto a complete subspace, as an unbundled function. This definition is only intended for use in setting up the bundled version orthogonalProjection and should not be used once that is defined.

Equations
• = โฏ.choose
Instances For
theorem orthogonalProjectionFn_mem {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} (v : E) :

The unbundled orthogonal projection is in the given subspace. This lemma is only intended for use in setting up the bundled version and should not be used once that is defined.

theorem orthogonalProjectionFn_inner_eq_zero {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} (v : E) (w : E) :
w โ K โ โช, wโซ_๐ = 0

The characterization of the unbundled orthogonal projection. This lemma is only intended for use in setting up the bundled version and should not be used once that is defined.

theorem eq_orthogonalProjectionFn_of_mem_of_inner_eq_zero {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} {u : E} {v : E} (hvm : v โ K) (hvo : โ w โ K, โชu - v, wโซ_๐ = 0) :

The unbundled orthogonal projection is the unique point in K with the orthogonality property. This lemma is only intended for use in setting up the bundled version and should not be used once that is defined.

theorem orthogonalProjectionFn_norm_sq {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] (K : Submodule ๐ E) (v : E) :
=
def orthogonalProjection {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] (K : Submodule ๐ E) :
E โL[๐] โฅK

The orthogonal projection onto a complete subspace.

Equations
• = { toFun := fun (v : E) => โจ, โฏโฉ, map_add' := โฏ, map_smul' := โฏ }.mkContinuous 1 โฏ
Instances For
@[simp]
theorem orthogonalProjectionFn_eq {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} (v : E) :
= โ( v)
@[simp]
theorem orthogonalProjection_inner_eq_zero {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} (v : E) (w : E) :
w โ K โ โชv - โ( v), wโซ_๐ = 0

The characterization of the orthogonal projection.

@[simp]
theorem sub_orthogonalProjection_mem_orthogonal {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} (v : E) :
v - โ( v) โ Kแฎ

The difference of v from its orthogonal projection onto K is in Kแฎ.

theorem eq_orthogonalProjection_of_mem_of_inner_eq_zero {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} {u : E} {v : E} (hvm : v โ K) (hvo : โ w โ K, โชu - v, wโซ_๐ = 0) :
โ( u) = v

The orthogonal projection is the unique point in K with the orthogonality property.

theorem eq_orthogonalProjection_of_mem_orthogonal {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} {u : E} {v : E} (hv : v โ K) (hvo : u - v โ Kแฎ) :
โ( u) = v

A point in K with the orthogonality property (here characterized in terms of Kแฎ) must be the orthogonal projection.

theorem eq_orthogonalProjection_of_mem_orthogonal' {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} {u : E} {v : E} {z : E} (hv : v โ K) (hz : z โ Kแฎ) (hu : u = v + z) :
โ( u) = v

A point in K with the orthogonality property (here characterized in terms of Kแฎ) must be the orthogonal projection.

@[simp]
theorem orthogonalProjection_orthogonal_val {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} (u : E) :
โ() = u - โ( u)
theorem orthogonalProjection_orthogonal {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} (u : E) :
= โจu - โ( u), โฏโฉ
theorem orthogonalProjection_minimal {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {U : Submodule ๐ E} (y : E) :
โy - โ( y)โ = โจ (x : โฅU), โy - โxโ

The orthogonal projection of y on U minimizes the distance โy - xโ for x โ U.

theorem eq_orthogonalProjection_of_eq_submodule {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} {K' : Submodule ๐ E} (h : K = K') (u : E) :
โ( u) = โ(() u)

The orthogonal projections onto equal subspaces are coerced back to the same point in E.

@[simp]
theorem orthogonalProjection_mem_subspace_eq_self {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} (v : โฅK) :
โv = v

The orthogonal projection sends elements of K to themselves.

theorem orthogonalProjection_eq_self_iff {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} {v : E} :
โ( v) = v โ v โ K

A point equals its orthogonal projection if and only if it lies in the subspace.

@[simp]
theorem orthogonalProjection_eq_zero_iff {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} {v : E} :
@[simp]
theorem ker_orthogonalProjection {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} :
theorem LinearIsometry.map_orthogonalProjection {๐ : Type u_1} [RCLike ๐] {E : Type u_4} {E' : Type u_5} [] [InnerProductSpace ๐ E] [InnerProductSpace ๐ E'] (f : E โโแตข[๐] E') (p : Submodule ๐ E) [HasOrthogonalProjection (Submodule.map f.toLinearMap p)] (x : E) :
f โ( x) = โ((orthogonalProjection (Submodule.map f.toLinearMap p)) (f x))
theorem LinearIsometry.map_orthogonalProjection' {๐ : Type u_1} [RCLike ๐] {E : Type u_4} {E' : Type u_5} [] [InnerProductSpace ๐ E] [InnerProductSpace ๐ E'] (f : E โโแตข[๐] E') (p : Submodule ๐ E) [] (x : E) :
f โ( x) = โ(() (f x))
theorem orthogonalProjection_map_apply {๐ : Type u_1} [RCLike ๐] {E : Type u_4} {E' : Type u_5} [] [InnerProductSpace ๐ E] [InnerProductSpace ๐ E'] (f : E โโแตข[๐] E') (p : Submodule ๐ E) (x : E') :
โ((orthogonalProjection (Submodule.map (โf.toLinearEquiv) p)) x) = f โ( (f.symm x))

Orthogonal projection onto the Submodule.map of a subspace.

@[simp]
theorem orthogonalProjection_bot {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] :

The orthogonal projection onto the trivial submodule is the zero map.

theorem orthogonalProjection_norm_le {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] (K : Submodule ๐ E) :

The orthogonal projection has norm โค 1.

theorem smul_orthogonalProjection_singleton (๐ : Type u_1) {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {v : E} (w : E) :
โ( ^ 2) โข โ((orthogonalProjection (Submodule.span ๐ {v})) w) = โชv, wโซ_๐ โข v
theorem orthogonalProjection_singleton (๐ : Type u_1) {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {v : E} (w : E) :
โ((orthogonalProjection (Submodule.span ๐ {v})) w) = (โชv, wโซ_๐ / โ( ^ 2)) โข v

Formula for orthogonal projection onto a single vector.

theorem orthogonalProjection_unit_singleton (๐ : Type u_1) {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {v : E} (hv : = 1) (w : E) :
โ((orthogonalProjection (Submodule.span ๐ {v})) w) = โชv, wโซ_๐ โข v

Formula for orthogonal projection onto a single unit vector.

def reflectionLinearEquiv {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] (K : Submodule ๐ E) :
E โโ[๐] E

Auxiliary definition for reflection: the reflection as a linear equivalence.

Equations
Instances For
def reflection {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] (K : Submodule ๐ E) :

Reflection in a complete subspace of an inner product space. The word "reflection" is sometimes understood to mean specifically reflection in a codimension-one subspace, and sometimes more generally to cover operations such as reflection in a point. The definition here, of reflection in a subspace, is a more general sense of the word that includes both those common cases.

Equations
• = let __src := ; { toLinearEquiv := __src, norm_map' := โฏ }
Instances For
theorem reflection_apply {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} (p : E) :
() p = 2 โข โ( p) - p

The result of reflecting.

@[simp]
theorem reflection_symm {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} :
().symm =

Reflection is its own inverse.

@[simp]
theorem reflection_inv {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} :

Reflection is its own inverse.

@[simp]
theorem reflection_reflection {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] (K : Submodule ๐ E) (p : E) :
() (() p) = p

Reflecting twice in the same subspace.

theorem reflection_involutive {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] (K : Submodule ๐ E) :

Reflection is involutive.

@[simp]
theorem reflection_trans_reflection {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] (K : Submodule ๐ E) :
().trans () =

Reflection is involutive.

@[simp]
theorem reflection_mul_reflection {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] (K : Submodule ๐ E) :
= 1

Reflection is involutive.

theorem reflection_orthogonal_apply {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] (K : Submodule ๐ E) (v : E) :
() v = -() v
theorem reflection_orthogonal {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] (K : Submodule ๐ E) :
= ().trans ()
theorem reflection_singleton_apply {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] (u : E) (v : E) :
(reflection (Submodule.span ๐ {u})) v = 2 โข (โชu, vโซ_๐ / โ ^ 2) โข u - v
theorem reflection_eq_self_iff {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} (x : E) :
() x = x โ x โ K

A point is its own reflection if and only if it is in the subspace.

theorem reflection_mem_subspace_eq_self {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} {x : E} (hx : x โ K) :
() x = x
theorem reflection_map_apply {๐ : Type u_1} [RCLike ๐] {E : Type u_4} {E' : Type u_5} [] [InnerProductSpace ๐ E] [InnerProductSpace ๐ E'] (f : E โโแตข[๐] E') (K : Submodule ๐ E) (x : E') :
(reflection (Submodule.map (โf.toLinearEquiv) K)) x = f (() (f.symm x))

Reflection in the Submodule.map of a subspace.

theorem reflection_map {๐ : Type u_1} [RCLike ๐] {E : Type u_4} {E' : Type u_5} [] [InnerProductSpace ๐ E] [InnerProductSpace ๐ E'] (f : E โโแตข[๐] E') (K : Submodule ๐ E) :
reflection (Submodule.map (โf.toLinearEquiv) K) = f.symm.trans (().trans f)

Reflection in the Submodule.map of a subspace.

@[simp]
theorem reflection_bot {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] :

Reflection through the trivial subspace {0} is just negation.

theorem Submodule.sup_orthogonal_inf_of_completeSpace {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {Kโ : Submodule ๐ E} {Kโ : Submodule ๐ E} (h : Kโ โค Kโ) [] :
Kโ โ Kโแฎ โ Kโ = Kโ

If Kโ is complete and contained in Kโ, Kโ and Kโแฎ โ Kโ span Kโ.

theorem Submodule.sup_orthogonal_of_completeSpace {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} :

If K is complete, K and Kแฎ span the whole space.

theorem Submodule.exists_add_mem_mem_orthogonal {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] (K : Submodule ๐ E) (v : E) :
โ y โ K, โ z โ Kแฎ, v = y + z

If K is complete, any v in E can be expressed as a sum of elements of K and Kแฎ.

@[simp]
theorem Submodule.orthogonal_orthogonal {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] (K : Submodule ๐ E) :
= K

If K admits an orthogonal projection, then the orthogonal complement of its orthogonal complement is itself.

theorem Submodule.orthogonal_orthogonal_eq_closure {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] (K : Submodule ๐ E) [] :
= K.topologicalClosure

In a Hilbert space, the orthogonal complement of the orthogonal complement of a subspace K is the topological closure of K.

Note that the completeness assumption is necessary. Let E be the space โ โโ โ with inner space structure inherited from PiLp 2 (fun _ : โ โฆ โ). Let K be the subspace of sequences with the sum of all elements equal to zero. Then Kแฎ = โฅ, Kแฎแฎ = โค.

theorem Submodule.isCompl_orthogonal_of_completeSpace {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} :

If K admits an orthogonal projection, K and Kแฎ are complements of each other.

@[simp]
theorem Submodule.orthogonal_eq_bot_iff {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} :
theorem orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} {v : E} (hv : v โ Kแฎ) :
v = 0

The orthogonal projection onto K of an element of Kแฎ is zero.

theorem Submodule.IsOrtho.orthogonalProjection_comp_subtypeL {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {U : Submodule ๐ E} {V : Submodule ๐ E} (h : U โ V) :
.comp V.subtypeL = 0

The projection into U from an orthogonal submodule V is the zero map.

theorem orthogonalProjection_comp_subtypeL_eq_zero_iff {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {U : Submodule ๐ E} {V : Submodule ๐ E} :
.comp V.subtypeL = 0 โ U โ V

The projection into U from V is the zero map if and only if U and V are orthogonal.

theorem orthogonalProjection_eq_linear_proj {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} (x : E) :
x = (K.linearProjOfIsCompl Kแฎ โฏ) x
theorem orthogonalProjection_coe_linearMap_eq_linearProj {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} :
โ = K.linearProjOfIsCompl Kแฎ โฏ
theorem reflection_mem_subspace_orthogonalComplement_eq_neg {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} {v : E} (hv : v โ Kแฎ) :
() v = -v

The reflection in K of an element of Kแฎ is its negation.

theorem orthogonalProjection_mem_subspace_orthogonal_precomplement_eq_zero {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} {v : E} (hv : v โ K) :
= 0

The orthogonal projection onto Kแฎ of an element of K is zero.

theorem orthogonalProjection_orthogonalProjection_of_le {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {U : Submodule ๐ E} {V : Submodule ๐ E} (h : U โค V) (x : E) :
โ( x) = x

If U โค V, then projecting on V and then on U is the same as projecting on U.

theorem orthogonalProjection_tendsto_closure_iSup {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] [] {ฮน : Type u_4} [] (U : ฮน โ Submodule ๐ E) [โ (i : ฮน), CompleteSpace โฅ(U i)] (hU : ) (x : E) :
Filter.Tendsto (fun (i : ฮน) => โ((orthogonalProjection (U i)) x)) Filter.atTop (nhds โ((orthogonalProjection (โจ (i : ฮน), U i).topologicalClosure) x))

Given a monotone family U of complete submodules of E and a fixed x : E, the orthogonal projection of x on U i tends to the orthogonal projection of x on (โจ i, U i).topologicalClosure along atTop.

theorem orthogonalProjection_tendsto_self {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] [] {ฮน : Type u_4} [] (U : ฮน โ Submodule ๐ E) [โ (t : ฮน), CompleteSpace โฅ(U t)] (hU : ) (x : E) (hU' : โค โค (โจ (t : ฮน), U t).topologicalClosure) :
Filter.Tendsto (fun (t : ฮน) => โ((orthogonalProjection (U t)) x)) Filter.atTop (nhds x)

Given a monotone family U of complete submodules of E with dense span supremum, and a fixed x : E, the orthogonal projection of x on U i tends to x along at_top.

theorem Submodule.triorthogonal_eq_orthogonal {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} [] :

The orthogonal complement satisfies Kแฎแฎแฎ = Kแฎ.

theorem Submodule.topologicalClosure_eq_top_iff {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} [] :
K.topologicalClosure = โค โ

The closure of K is the full space iff Kแฎ is trivial.

theorem Dense.eq_zero_of_inner_left {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} {x : E} (hK : Dense โK) (h : โ (v : โฅK), โชx, โvโซ_๐ = 0) :
x = 0
theorem Dense.eq_zero_of_mem_orthogonal {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} {x : E} (hK : Dense โK) (h : x โ Kแฎ) :
x = 0
theorem Dense.eq_of_sub_mem_orthogonal {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} {x : E} {y : E} (hK : Dense โK) (h : x - y โ Kแฎ) :
x = y

If S is dense and x - y โ Kแฎ, then x = y.

theorem Dense.eq_of_inner_left {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} {x : E} {y : E} (hK : Dense โK) (h : โ (v : โฅK), โชx, โvโซ_๐ = โชy, โvโซ_๐) :
x = y
theorem Dense.eq_of_inner_right {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} {x : E} {y : E} (hK : Dense โK) (h : โ (v : โฅK), โชโv, xโซ_๐ = โชโv, yโซ_๐) :
x = y
theorem Dense.eq_zero_of_inner_right {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} {x : E} (hK : Dense โK) (h : โ (v : โฅK), โชโv, xโซ_๐ = 0) :
x = 0
theorem reflection_mem_subspace_orthogonal_precomplement_eq_neg {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {K : Submodule ๐ E} {v : E} (hv : v โ K) :
() v = -v

The reflection in Kแฎ of an element of K is its negation.

theorem orthogonalProjection_orthogonalComplement_singleton_eq_zero {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] (v : E) :

The orthogonal projection onto (๐ โ v)แฎ of v is zero.

theorem reflection_orthogonalComplement_singleton_eq_neg {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] (v : E) :
(reflection (Submodule.span ๐ {v})แฎ) v = -v

The reflection in (๐ โ v)แฎ of v is -v.

theorem reflection_sub {F : Type u_3} [] {v : F} {w : F} (h : ) :
theorem orthogonalProjection_add_orthogonalProjection_orthogonal {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] (K : Submodule ๐ E) (w : E) :
โ( w) + โ() = w

If the orthogonal projection to K is well-defined, then a vector splits as the sum of its orthogonal projections onto a complete submodule K and onto the orthogonal complement of K.

theorem norm_sq_eq_add_norm_sq_projection {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] (x : E) (S : Submodule ๐ E) :
^ 2 = ^ 2 +

The Pythagorean theorem, for an orthogonal projection.

theorem id_eq_sum_orthogonalProjection_self_orthogonalComplement {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] (K : Submodule ๐ E) :
= K.subtypeL.comp + Kแฎ.subtypeL.comp

In a complete space E, the projection maps onto a complete subspace K and its orthogonal complement sum to the identity.

@[simp]
theorem inner_orthogonalProjection_eq_of_mem_right {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] (K : Submodule ๐ E) (u : โฅK) (v : E) :
โช v, uโซ_๐ = โชv, โuโซ_๐
@[simp]
theorem inner_orthogonalProjection_eq_of_mem_left {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] (K : Submodule ๐ E) (u : โฅK) (v : E) :
โชu, vโซ_๐ = โชโu, vโซ_๐
theorem inner_orthogonalProjection_left_eq_right {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] (K : Submodule ๐ E) (u : E) (v : E) :
โชโ( u), vโซ_๐ = โชu, โ( v)โซ_๐

The orthogonal projection is self-adjoint.

theorem orthogonalProjection_isSymmetric {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] (K : Submodule ๐ E) :
(โ(K.subtypeL.comp )).IsSymmetric

The orthogonal projection is symmetric.

theorem Submodule.finrank_add_inf_finrank_orthogonal {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {Kโ : Submodule ๐ E} {Kโ : Submodule ๐ E} [FiniteDimensional ๐ โฅKโ] (h : Kโ โค Kโ) :
FiniteDimensional.finrank ๐ โฅKโ + FiniteDimensional.finrank ๐ โฅ(Kโแฎ โ Kโ) = FiniteDimensional.finrank ๐ โฅKโ

Given a finite-dimensional subspace Kโ, and a subspace Kโ contained in it, the dimensions of Kโ and the intersection of its orthogonal subspace with Kโ add to that of Kโ.

theorem Submodule.finrank_add_inf_finrank_orthogonal' {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {Kโ : Submodule ๐ E} {Kโ : Submodule ๐ E} [FiniteDimensional ๐ โฅKโ] (h : Kโ โค Kโ) {n : โ} (h_dim : FiniteDimensional.finrank ๐ โฅKโ + n = FiniteDimensional.finrank ๐ โฅKโ) :
FiniteDimensional.finrank ๐ โฅ(Kโแฎ โ Kโ) = n

Given a finite-dimensional subspace Kโ, and a subspace Kโ contained in it, the dimensions of Kโ and the intersection of its orthogonal subspace with Kโ add to that of Kโ.

theorem Submodule.finrank_add_finrank_orthogonal {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] [FiniteDimensional ๐ E] (K : Submodule ๐ E) :
FiniteDimensional.finrank ๐ โฅK + FiniteDimensional.finrank ๐ โฅKแฎ =

Given a finite-dimensional space E and subspace K, the dimensions of K and Kแฎ add to that of E.

theorem Submodule.finrank_add_finrank_orthogonal' {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] [FiniteDimensional ๐ E] {K : Submodule ๐ E} {n : โ} (h_dim : FiniteDimensional.finrank ๐ โฅK + n = ) :
FiniteDimensional.finrank ๐ โฅKแฎ = n

Given a finite-dimensional space E and subspace K, the dimensions of K and Kแฎ add to that of E.

theorem finrank_orthogonal_span_singleton {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {n : โ} [_i : Fact ( = n + 1)] {v : E} (hv : v โ  0) :
FiniteDimensional.finrank ๐ โฅ(Submodule.span ๐ {v})แฎ = n

In a finite-dimensional inner product space, the dimension of the orthogonal complement of the span of a nonzero vector is one less than the dimension of the space.

theorem LinearIsometryEquiv.reflections_generate_dim_aux {F : Type u_3} [] [] {n : โ} (ฯ : ) (hn : FiniteDimensional.finrank โ โฅ(LinearMap.ker ( - โ{ toLinearEquiv := ฯ.toLinearEquiv, continuous_toFun := โฏ, continuous_invFun := โฏ }))แฎ โค n) :
โ (l : List F), l.length โค n โง ฯ = (List.map (fun (v : F) => ) l).prod

An element ฯ of the orthogonal group of F can be factored as a product of reflections, and specifically at most as many reflections as the dimension of the complement of the fixed subspace of ฯ.

theorem LinearIsometryEquiv.reflections_generate_dim {F : Type u_3} [] [] (ฯ : ) :
โ (l : List F), l.length โค โง ฯ = (List.map (fun (v : F) => ) l).prod

The orthogonal group of F is generated by reflections; specifically each element ฯ of the orthogonal group is a product of at most as many reflections as the dimension of F.

Special case of the CartanโDieudonnรฉ theorem.

The orthogonal group of F is generated by reflections.

theorem OrthogonalFamily.isInternal_iff_of_isComplete {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {ฮน : Type u_4} [] {V : ฮน โ Submodule ๐ E} (hV : OrthogonalFamily ๐ (fun (i : ฮน) => โฅ(V i)) fun (i : ฮน) => (V i).subtypeโแตข) (hc : IsComplete โ(iSup V)) :

An orthogonal family of subspaces of E satisfies DirectSum.IsInternal (that is, they provide an internal direct sum decomposition of E) if and only if their span has trivial orthogonal complement.

theorem OrthogonalFamily.isInternal_iff {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {ฮน : Type u_4} [] [FiniteDimensional ๐ E] {V : ฮน โ Submodule ๐ E} (hV : OrthogonalFamily ๐ (fun (i : ฮน) => โฅ(V i)) fun (i : ฮน) => (V i).subtypeโแตข) :

An orthogonal family of subspaces of E satisfies DirectSum.IsInternal (that is, they provide an internal direct sum decomposition of E) if and only if their span has trivial orthogonal complement.

theorem OrthogonalFamily.sum_projection_of_mem_iSup {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {ฮน : Type u_4} [Fintype ฮน] {V : ฮน โ Submodule ๐ E} [โ (i : ฮน), CompleteSpace โฅ(V i)] (hV : OrthogonalFamily ๐ (fun (i : ฮน) => โฅ(V i)) fun (i : ฮน) => (V i).subtypeโแตข) (x : E) (hx : x โ iSup V) :
โ i : ฮน, โ((orthogonalProjection (V i)) x) = x

If x lies within an orthogonal family v, it can be expressed as a sum of projections.

theorem OrthogonalFamily.projection_directSum_coeAddHom {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {ฮน : Type u_4} [] {V : ฮน โ Submodule ๐ E} (hV : OrthogonalFamily ๐ (fun (i : ฮน) => โฅ(V i)) fun (i : ฮน) => (V i).subtypeโแตข) (x : DirectSum ฮน fun (i : ฮน) => โฅ(V i)) (i : ฮน) [CompleteSpace โฅ(V i)] :
(orthogonalProjection (V i)) () = x i

If a family of submodules is orthogonal, then the orthogonalProjection on a direct sum is just the coefficient of that direct sum.

@[reducible, inline]
abbrev OrthogonalFamily.decomposition {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {ฮน : Type u_4} [] [Fintype ฮน] {V : ฮน โ Submodule ๐ E} [โ (i : ฮน), CompleteSpace โฅ(V i)] (hV : OrthogonalFamily ๐ (fun (i : ฮน) => โฅ(V i)) fun (i : ฮน) => (V i).subtypeโแตข) (h : iSup V = โค) :

If a family of submodules is orthogonal and they span the whole space, then the orthogonal projection provides a means to decompose the space into its submodules.

The projection function is decompose V x i = orthogonalProjection (V i) x.

See note [reducible non-instances].

Equations
• hV.decomposition h = { decompose' := fun (x : E) => DFinsupp.equivFunOnFintype.symm fun (i : ฮน) => (orthogonalProjection (V i)) x, left_inv := โฏ, right_inv := โฏ }
Instances For
theorem maximal_orthonormal_iff_orthogonalComplement_eq_bot {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {v : Set E} (hv : Orthonormal ๐ Subtype.val) :
(โ u โ v, Orthonormal ๐ Subtype.val โ u = v) โ (Submodule.span ๐ v)แฎ = โฅ

An orthonormal set in an InnerProductSpace is maximal, if and only if the orthogonal complement of its span is empty.

theorem maximal_orthonormal_iff_basis_of_finiteDimensional {๐ : Type u_1} {E : Type u_2} [RCLike ๐] [InnerProductSpace ๐ E] {v : Set E} [FiniteDimensional ๐ E] (hv : Orthonormal ๐ Subtype.val) :
(โ u โ v, Orthonormal ๐ Subtype.val โ u = v) โ โ (b : Basis (โv) ๐ E), โb = Subtype.val

An orthonormal set in a finite-dimensional InnerProductSpace is maximal, if and only if it is a basis.