# mathlibdocumentation

analysis.inner_product_space.projection

# The orthogonal projection #

THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.

Given a nonempty complete subspace K of an inner product space E, this file constructs orthogonal_projection K : E →L[𝕜] K, the orthogonal projection of E onto K. This map satisfies: for any point u in E, the point v = orthogonal_projection 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 • orthogonal_projection K u.

Basic API for orthogonal_projection and reflection is developed.

Next, the orthogonal projection is used to prove a series of more subtle lemmas about the the orthogonal complement of complete subspaces of E (the orthogonal complement itself was defined in analysis.inner_product_space.basic); the lemma submodule.sup_orthogonal_of_is_complete, 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_infi_of_complete_convex {F : Type u_3} {K : set F} (ne : K.nonempty) (h₁ : is_complete K) (h₂ : K) (u : F) :
(v : F) (H : 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_infi_iff_real_inner_le_zero {F : Type u_3} {K : set F} (h : K) {u v : F} (hv : v K) :
(u - v = (w : K), u - w) (w : F), w K has_inner.inner (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_infi_of_complete_subspace {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] (K : E) (h : is_complete K) (u : E) :
(v : E) (H : 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_infi_iff_real_inner_eq_zero {F : Type u_3} (K : F) {u v : F} (hv : v K) :
(u - v = (w : K), u - w) (w : F), w K has_inner.inner (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_infi_iff_inner_eq_zero that gives the same conclusion over any is_R_or_C field.

theorem norm_eq_infi_iff_inner_eq_zero {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] (K : E) {u v : E} (hv : v K) :
(u - v = (w : K), u - w) (w : E), w K has_inner.inner (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)

noncomputable def orthogonal_projection_fn {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] (K : 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 orthogonal_projection and should not be used once that is defined.

Equations
theorem orthogonal_projection_fn_mem {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {K : 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 orthogonal_projection_fn_inner_eq_zero {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {K : E} (v w : E) (H : 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_orthogonal_projection_fn_of_mem_of_inner_eq_zero {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {K : E} {u v : E} (hvm : v K) (hvo : (w : E), w K has_inner.inner (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 orthogonal_projection_fn_norm_sq {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] (K : E) (v : E) :
noncomputable def orthogonal_projection {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] (K : E)  :
E →L[𝕜] K

The orthogonal projection onto a complete subspace.

Equations
@[simp]
theorem orthogonal_projection_fn_eq {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {K : E} (v : E) :
= v)
@[simp]
theorem orthogonal_projection_inner_eq_zero {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {K : E} (v w : E) (H : w K) :
has_inner.inner (v - v)) w = 0

The characterization of the orthogonal projection.

@[simp]
theorem sub_orthogonal_projection_mem_orthogonal {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {K : E} (v : E) :
v - v) K

The difference of v from its orthogonal projection onto K is in Kᗮ.

theorem eq_orthogonal_projection_of_mem_of_inner_eq_zero {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {K : E} {u v : E} (hvm : v K) (hvo : (w : E), w K has_inner.inner (u - v) w = 0) :
u) = v

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

theorem orthogonal_projection_minimal {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {U : 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_orthogonal_projection_of_eq_submodule {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {K : E} {K' : E} [complete_space K'] (h : K = K') (u : E) :
u) = ( u)

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

@[simp]
theorem orthogonal_projection_mem_subspace_eq_self {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {K : E} (v : K) :
= v

The orthogonal projection sends elements of K to themselves.

theorem orthogonal_projection_eq_self_iff {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {K : E} {v : E} :
v) = v v K

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

theorem linear_isometry.map_orthogonal_projection {𝕜 : Type u_1} [is_R_or_C 𝕜] {E : Type u_2} {E' : Type u_3} [ E] [ E'] (f : E →ₗᵢ[𝕜] E') (p : E) (x : E) :
f x) = (f x))
theorem linear_isometry.map_orthogonal_projection' {𝕜 : Type u_1} [is_R_or_C 𝕜] {E : Type u_2} {E' : Type u_3} [ E] [ E'] (f : E →ₗᵢ[𝕜] E') (p : E) (x : E) :
f x) = ( (f x))
theorem orthogonal_projection_map_apply {𝕜 : Type u_1} [is_R_or_C 𝕜] {E : Type u_2} {E' : Type u_3} [ E] [ E'] (f : E ≃ₗᵢ[𝕜] E') (p : E) (x : E') :
( x) = f ((f.symm) x))

Orthogonal projection onto the submodule.map of a subspace.

@[simp]
theorem orthogonal_projection_bot {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] :

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

theorem orthogonal_projection_norm_le {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] (K : E)  :

The orthogonal projection has norm ≤ 1.

theorem smul_orthogonal_projection_singleton (𝕜 : Type u_1) {E : Type u_2} [is_R_or_C 𝕜] [ E] {v : E} (w : E) :
theorem orthogonal_projection_singleton (𝕜 : Type u_1) {E : Type u_2} [is_R_or_C 𝕜] [ E] {v : E} (w : E) :

Formula for orthogonal projection onto a single vector.

theorem orthogonal_projection_unit_singleton (𝕜 : Type u_1) {E : Type u_2} [is_R_or_C 𝕜] [ E] {v : E} (hv : v = 1) (w : E) :

Formula for orthogonal projection onto a single unit vector.

noncomputable def reflection_linear_equiv {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] (K : E)  :
E ≃ₗ[𝕜] E

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

Equations
noncomputable def reflection {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] (K : E)  :
E ≃ₗᵢ[𝕜] 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
theorem reflection_apply {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {K : E} (p : E) :
(reflection K) p = bit0 p) - p

The result of reflecting.

@[simp]
theorem reflection_symm {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {K : E}  :

Reflection is its own inverse.

@[simp]
theorem reflection_inv {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {K : E}  :

Reflection is its own inverse.

@[simp]
theorem reflection_reflection {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] (K : E) (p : E) :

Reflecting twice in the same subspace.

theorem reflection_involutive {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] (K : E)  :

Reflection is involutive.

@[simp]
theorem reflection_trans_reflection {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] (K : E)  :

Reflection is involutive.

@[simp]
theorem reflection_mul_reflection {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] (K : E)  :
= 1

Reflection is involutive.

theorem reflection_eq_self_iff {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {K : E} (x : E) :
(reflection K) 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} [is_R_or_C 𝕜] [ E] {K : E} {x : E} (hx : x K) :
theorem reflection_map_apply {𝕜 : Type u_1} [is_R_or_C 𝕜] {E : Type u_2} {E' : Type u_3} [ E] [ E'] (f : E ≃ₗᵢ[𝕜] E') (K : E) (x : E') :
(reflection K)) x = f ((reflection K) ((f.symm) x))

Reflection in the submodule.map of a subspace.

theorem reflection_map {𝕜 : Type u_1} [is_R_or_C 𝕜] {E : Type u_2} {E' : Type u_3} [ E] [ E'] (f : E ≃ₗᵢ[𝕜] E') (K : E)  :

Reflection in the submodule.map of a subspace.

@[simp]
theorem reflection_bot {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] :

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

theorem submodule.sup_orthogonal_inf_of_complete_space {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {K₁ K₂ : E} (h : K₁ K₂) [complete_space K₁] :
K₁ K₁ K₂ = K₂

If K₁ is complete and contained in K₂, K₁ and K₁ᗮ ⊓ K₂ span K₂.

theorem submodule.sup_orthogonal_of_complete_space {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {K : E}  :

If K is complete, K and Kᗮ span the whole space.

theorem submodule.exists_sum_mem_mem_orthogonal {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] (K : E) (v : E) :
(y : E) (H : y K) (z : E) (H : 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} [is_R_or_C 𝕜] [ E] (K : E)  :

If K is complete, then the orthogonal complement of its orthogonal complement is itself.

theorem submodule.orthogonal_orthogonal_eq_closure {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] (K : E)  :
theorem submodule.is_compl_orthogonal_of_complete_space {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {K : E}  :
K

If K is complete, K and Kᗮ are complements of each other.

@[simp]
theorem submodule.orthogonal_eq_bot_iff {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {K : E}  :
theorem eq_orthogonal_projection_of_mem_orthogonal {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {K : E} {u 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_orthogonal_projection_of_mem_orthogonal' {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {K : E} {u v 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.

theorem orthogonal_projection_mem_subspace_orthogonal_complement_eq_zero {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {K : E} {v : E} (hv : v K) :
= 0

The orthogonal projection onto K of an element of Kᗮ is zero.

theorem submodule.is_ortho.orthogonal_projection_comp_subtypeL {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {U V : E} (h : U V) :
= 0

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

theorem orthogonal_projection_comp_subtypeL_eq_zero_iff {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {U V : E}  :
= 0 U V

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

theorem orthogonal_projection_eq_linear_proj {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {K : E} (x : E) :
theorem orthogonal_projection_coe_linear_map_eq_linear_proj {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {K : E}  :
theorem reflection_mem_subspace_orthogonal_complement_eq_neg {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {K : E} {v : E} (hv : v K) :

The reflection in K of an element of Kᗮ is its negation.

theorem orthogonal_projection_mem_subspace_orthogonal_precomplement_eq_zero {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {K : E} {v : E} (hv : v K) :
= 0

The orthogonal projection onto Kᗮ of an element of K is zero.

theorem orthogonal_projection_orthogonal_projection_of_le {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {U V : E} (h : U V) (x : E) :
x) =

If U ≤ V, then projecting on V and then on U is the same as projecting on U.

theorem orthogonal_projection_tendsto_closure_supr {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {ι : Type u_3} (U : ι E) [ (i : ι), complete_space (U i)] (hU : monotone U) (x : E) :

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).topological_closure along at_top.

theorem orthogonal_projection_tendsto_self {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {ι : Type u_3} (U : ι E) [ (t : ι), complete_space (U t)] (hU : monotone U) (x : E) (hU' : ( (t : ι), U t).topological_closure) :

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} [is_R_or_C 𝕜] [ E] {K : E}  :

The orthogonal complement satisfies Kᗮᗮᗮ = Kᗮ.

theorem submodule.topological_closure_eq_top_iff {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {K : E}  :

The closure of K is the full space iff Kᗮ is trivial.

theorem dense.eq_of_sub_mem_orthogonal {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {K : E} {x 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_zero_of_mem_orthogonal {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {K : E} {x : E} (hK : dense K) (h : x K) :
x = 0
theorem dense.eq_of_inner_left {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {K : E} {x y : E} (hK : dense K) (h : (v : K), ) :
x = y
theorem dense.eq_zero_of_inner_left {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {K : E} {x : E} (hK : dense K) (h : (v : K), = 0) :
x = 0
theorem dense.eq_of_inner_right {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {K : E} {x y : E} (hK : dense K) (h : (v : K), ) :
x = y
theorem dense.eq_zero_of_inner_right {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {K : E} {x : E} (hK : dense K) (h : (v : K), = 0) :
x = 0
theorem reflection_mem_subspace_orthogonal_precomplement_eq_neg {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {K : E} {v : E} (hv : v K) :

The reflection in Kᗮ of an element of K is its negation.

theorem orthogonal_projection_orthogonal_complement_singleton_eq_zero {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] (v : E) :

The orthogonal projection onto (𝕜 ∙ v)ᗮ of v is zero.

theorem reflection_orthogonal_complement_singleton_eq_neg {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] (v : E) :
(reflection {v})) v = -v

The reflection in (𝕜 ∙ v)ᗮ of v is -v.

theorem reflection_sub {F : Type u_3} {v w : F} (h : v = w) :
(reflection (Span {v - w})) v = w
theorem eq_sum_orthogonal_projection_self_orthogonal_complement {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] (K : E) (w : E) :
w = w) + w)

In a complete space E, 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} [is_R_or_C 𝕜] [ E] (x : E) (S : E)  :
x ^ 2 = ^ 2 + ^ 2

The Pythagorean theorem, for an orthogonal projection.

theorem id_eq_sum_orthogonal_projection_self_orthogonal_complement {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] (K : E)  :

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

@[simp]
theorem inner_orthogonal_projection_eq_of_mem_right {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] (K : E) (u : K) (v : E) :
u =
@[simp]
theorem inner_orthogonal_projection_eq_of_mem_left {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] (K : E) (u : K) (v : E) :
v) =
theorem inner_orthogonal_projection_left_eq_right {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] (K : E) (u v : E) :
v = v)

theorem orthogonal_projection_is_symmetric {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] (K : E)  :

The orthogonal projection is symmetric.

theorem submodule.finrank_add_inf_finrank_orthogonal {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {K₁ K₂ : E} [ K₂] (h : K₁ K₂) :
+ (K₁ K₂) =

Given a finite-dimensional subspace K₂, and a subspace K₁ containined 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} [is_R_or_C 𝕜] [ E] {K₁ K₂ : E} [ K₂] (h : K₁ K₂) {n : } (h_dim : = ) :
(K₁ K₂) = n

Given a finite-dimensional subspace K₂, and a subspace K₁ containined 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} [is_R_or_C 𝕜] [ E] [ E] (K : E) :

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} [is_R_or_C 𝕜] [ E] [ E] {K : E} {n : } (h_dim : = ) :

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} [is_R_or_C 𝕜] [ E] {n : } [fact = n + 1)] {v : E} (hv : v 0) :
= 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 linear_isometry_equiv.reflections_generate_dim_aux {F : Type u_3} {n : } (φ : F ≃ₗᵢ[] F) (hn : n) :
(l : list F), l.length n φ = (list.map (λ (v : F), reflection (Span {v})) 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 linear_isometry_equiv.reflections_generate_dim {F : Type u_3} (φ : F ≃ₗᵢ[] F) :
(l : list F), l.length fdim F φ = (list.map (λ (v : F), reflection (Span {v})) 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 orthogonal_family.is_internal_iff_of_is_complete {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {ι : Type u_4} [decidable_eq ι] {V : ι E} (hV : (λ (i : ι), (V i)) (λ (i : ι), (V i).subtypeₗᵢ)) (hc : is_complete (supr V)) :

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

theorem orthogonal_family.is_internal_iff {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {ι : Type u_4} [decidable_eq ι] [ E] {V : ι E} (hV : (λ (i : ι), (V i)) (λ (i : ι), (V i).subtypeₗᵢ)) :

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

theorem orthogonal_family.sum_projection_of_mem_supr {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {ι : Type u_4} [fintype ι] {V : ι E} [ (i : ι), complete_space (V i)] (hV : (λ (i : ι), (V i)) (λ (i : ι), (V i).subtypeₗᵢ)) (x : E) (hx : x supr V) :
finset.univ.sum (λ (i : ι), ((orthogonal_projection (V i)) x)) = x

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

theorem orthogonal_family.projection_direct_sum_coe_add_hom {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {ι : Type u_4} [decidable_eq ι] {V : ι E} (hV : (λ (i : ι), (V i)) (λ (i : ι), (V i).subtypeₗᵢ)) (x : (λ (i : ι), (V i))) (i : ι) [complete_space (V i)] :

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

@[reducible]
noncomputable def orthogonal_family.decomposition {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {ι : Type u_4} [decidable_eq ι] [fintype ι] {V : ι E} [ (i : ι), complete_space (V i)] (hV : (λ (i : ι), (V i)) (λ (i : ι), (V i).subtypeₗᵢ)) (h : supr 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 = orthogonal_projection (V i) x.

Equations
theorem maximal_orthonormal_iff_orthogonal_complement_eq_bot {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {v : set E} (hv : coe) :
( (u : set E), u v u = v) v) =

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

theorem maximal_orthonormal_iff_basis_of_finite_dimensional {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [ E] {v : set E} [ E] (hv : coe) :
( (u : set E), u v u = v) (b : 𝕜 E),

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