
# 6: Orthogonality


Let us recall one last time the structure of this book:

1. Solve the matrix equation $$Ax=b$$.
2. Solve the matrix equation $$Ax=\lambda x\text{,}$$ where $$\lambda$$ is a number.
3. Approximately solve the matrix equation $$Ax=b$$.

We have now come to the third part.

##### Note $$\PageIndex{1}$$

Approximately solve the matrix equation $$Ax=b.$$

Finding approximate solutions of equations generally requires computing the closest vector on a subspace to a given vector. This becomes an orthogonality problem: one needs to know which vectors are perpendicular to the subspace.

Figure $$\PageIndex{1}$$

First we will define orthogonality and learn to find orthogonal complements of subspaces in Section 6.1 and Section 6.2. The core of this chapter is Section 6.3, in which we discuss the orthogonal projection of a vector onto a subspace; this is a method of calculating the closest vector on a subspace to a given vector. These calculations become easier in the presence of an orthogonal set, as we will see in Section 6.4. In Section 6.5 we will present the least-squares method of approximately solving systems of equations, and we will give applications to data modeling.

Example $$\PageIndex{1}$$

In data modeling, one often asks: “what line is my data supposed to lie on?” This can be solved using a simple application of the least-squares method.

Figure $$\PageIndex{2}$$

Example $$\PageIndex{2}$$

Gauss invented the method of least squares to find a best-fit ellipse: he correctly predicted the (elliptical) orbit of the asteroid Ceres as it passed behind the sun in 1801.

Figure $$\PageIndex{3}$$

• 6.1: Dot Products and Orthogonality
In this chapter, it will be necessary to find the closest point on a subspace to a given point. The closest point has the property that the difference between the two points is orthogonal, or perpendicular, to the subspace. For this reason, we need to develop notions of orthogonality, length, and distance.
• 6.2: Orthogonal Complements
It will be important to compute the set of all vectors that are orthogonal to a given set of vectors. It turns out that a vector is orthogonal to a set of vectors if and only if it is orthogonal to the span of those vectors, which is a subspace, so we restrict ourselves to the case of subspaces.
• 6.3: Orthogonal Projection
• 6.4: Orthogonal Sets
• 6.5: The Method of Least Squares

6: Orthogonality is shared under a GNU Free Documentation License 1.3 license and was authored, remixed, and/or curated by Dan Margalit & Joseph Rabinoff via source content that was edited to conform to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.