Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 19

Vector Decomposition: Parallel and Orthogonal Components

Recommended resources

Hello! Let's continue our journey into the geometric side of linear algebra.

In our last lesson, we mastered the technique of computing the orthogonal projection of a vector onto a subspace. We established that this projection, , is the vector within the subspace that lies closest to the original vector, . We also saw that the "error" vector, , is orthogonal to the subspace.

Today, we will formalize this relationship. Our learning outcome is to decompose a vector into components parallel and orthogonal to a subspace. This isn't a new calculation but a new perspective: we will see that any vector can be perfectly and uniquely broken down into these two orthogonal pieces. This concept, known as the Orthogonal Decomposition Theorem, is the theoretical bedrock for the method of least squares, which is central to fitting models to data in machine learning.

1. The Orthogonal Decomposition Theorem

The core idea is that any vector can be seen as the sum of two distinct parts relative to a subspace : a part that lies inside and a part that is orthogonal to .

Let's begin with a formal statement of this powerful idea.

Orthogonal Projection

This resource from Georgia Tech's interactive linear algebra textbook provides a concise statement of the Orthogonal Decomposition Theorem.

Read the first part of this section, from the beginning down to the definition of 'orthogonal decomposition'. Pay close attention to the theorem statement and the definition. This tells us that any vector can be uniquely written as a sum of a vector within a subspace and a vector in its orthogonal complement.

To put it in our own terms, for any vector and any subspace , we can write:

where:

  • is the component of parallel to . This is simply the orthogonal projection of onto , which we'll denote as .
  • is the component of orthogonal to . This is the "leftover" part, calculated as . This vector lies in the orthogonal complement, .

This decomposition should feel intuitive. It's like resolving a force vector in physics into its horizontal and vertical components. Here, we're resolving a vector into components "in the subspace" and "perpendicular to the subspace".

Orthogonal Decomposition of a Vector
This diagram illustrates the orthogonal decomposition of a vector \(\mathbf{x}\) with respect to a line (a 1D subspace) spanned by vector \(\mathbf{w}\). The vector \(\mathbf{x}\) is the sum of its parallel component, \(\mathbf{x}_{||}\) (the projection onto the line), and its orthogonal component, \(\mathbf{x}_{\perp}\). Because the components are orthogonal, they obey the Pythagorean theorem: \(||\mathbf{x}||^2 = ||\mathbf{x}_{||}||^2 + ||\mathbf{x}_{\perp}||^2\).

2. A Deeper Look at the Decomposition

Let's watch a video that provides an excellent visual and conceptual walkthrough of the Orthogonal Decomposition Theorem. This will help solidify why this decomposition always works and is unique.

Orthogonal Decomposition Theorem Part II

Dr. Trefor Bazett gives a clear explanation of the theorem, starting with a simple geometric example.

Watch from the beginning to 10:34. He will: State the theorem. Give a clear 3D example of projecting onto the xy-plane. Show how the parallel component (\hat{y}) is constructed from an orthogonal basis. Demonstrate why the remaining part (z = y - \hat{y}) must be orthogonal to the subspace.

The video confirms our procedure:

  1. We define the parallel component as the projection onto .
  2. We define the orthogonal component as the difference, .
  3. The crucial step is verifying that this is, in fact, orthogonal to every vector in . The video provides an intuitive proof of this for the case where we have an orthogonal basis.

3. The Computational Recipe

Now, let's turn this theory into a concrete, repeatable process. The method follows directly from our discussion.

To decompose a vector into components parallel and orthogonal to a subspace :

  1. Find the parallel component, .
    This is the orthogonal projection . You already know how to do this from our last lesson:

    • Find a basis for . Let the matrix have these basis vectors as its columns.
    • Solve the normal equations for the coefficient vector .
    • The parallel component is .
    • (Shortcut): If your basis for is orthogonal, , the calculation is much simpler:
  2. Find the orthogonal component, .
    This is simply the vector that's left over:

  3. Verify (Optional but Recommended).
    Confirm that your decomposition is correct by checking that is truly orthogonal to . You can do this by computing the dot product of with each of the basis vectors of . The result should be zero for all of them.


4. A Worked Example

The best way to understand this process is to do it. The following reading guides you through a concrete example.

6.3 Orthogonal bases and projections

This text provides a hands-on activity that walks you through the exact process of decomposing a vector. It formalizes the steps we've just discussed.

Focus on 'Activity 6.3.4' and work through part (b). It asks you to: Find the projection \hat{\mathbf{b}} onto a subspace W (this is \mathbf{b}_{||}). Find a vector \mathbf{b}^\perp such that \mathbf{b} = \hat{\mathbf{b}} + \mathbf{b}^\perp (this is \mathbf{b}_{\perp}). After the activity, read 'Proposition 6.3.18', which formally states the result of your work.

Test your understanding!

Let's take the example from our previous lesson. Let be the plane in spanned by and . Let .

Decompose into , where is in and is in .

Show answer
  1. Find the parallel component :
    From the last lesson, we already computed the projection of onto .

  2. Find the orthogonal component :
    We subtract the parallel component from the original vector.

  3. Verify:
    Let's check that is orthogonal to the basis vectors of .


    Since is orthogonal to the basis vectors, it is orthogonal to the entire subspace .

The final decomposition is:

Where the first vector is in and the second is in .


Conclusion

Today, we formalized the concept of orthogonal decomposition, a cornerstone of linear algebra with profound implications.

Key Takeaways:

  • Orthogonal Decomposition Theorem: Any vector can be uniquely written as the sum of a vector in a subspace and a vector in its orthogonal complement .
  • The parallel component, , is the orthogonal projection of onto . It is the "best approximation" of within .
  • The orthogonal component, , is the "error" or "remainder" vector, calculated as .
  • The decomposition process is straightforward: first compute the projection, then subtract to find the remainder.

Preview of the Next Lesson:

In our next lesson, we will see why this decomposition is so important. We will discuss orthogonal matrices and operators, which are transformations that preserve lengths and angles. These special operators are fundamental in quantum mechanics, where they represent the evolution of quantum states, and in computer graphics and robotics, where they represent pure rotations. We will explore how their matrix representations (orthogonal and unitary matrices) have incredibly useful properties.