# 6: Orthogonality

- Page ID
- 70211

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

- Solve the matrix equation \(Ax=b\).
- Solve the matrix equation \(Ax=\lambda x\text{,}\) where \(\lambda\) is a number.
- Approximately solve the matrix equation \(Ax=b\).

We have now come to the third part.

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.