Distance/Point to affine subspace/Example

< Distance < Point to affine subspace

Let be a real affine space over the Euclidean vector space , let be a point, and let denote an affine subspace. In case , the distance of to equals . In general, we write

with a point and with a linear subspace . We determine the orthogonal complement of in . If is a basis of , and is a basis of , then there exists a unique representation

In this case,

is the dropped perpendicular foot of on , and the distance of to is

If the form an orthonormal basis of , then this equals .