# SubsectionThe Assignment

• Read Chapter 4 section 2 of Strang.
• Read the following and complete the exercises below.

# SubsectionLearning Goals

Before class, a student should be able to:

• Compute the projection of a vector onto a line.
• Find the projection matrix which computes the projections of vectors onto a given line.
• Draw the schematic picture of a projection: the line, the vector, the projected vector, and the difference.

Sometime after class, a student should be able to:

• Compute the projection of a vector onto a subspace.
• Find the projection matrix which computes the projections of vectors onto a given subspace.
• Explain the process for finding the equations which determine the projection matrix, and say why the transpose makes an appearance.

# SubsectionDiscussion: Orthogonal Projections

One good use of the geometry in $\mathbb{R}^n$ is the concept of orthogonal projection. The basic idea is to mimic the behavior of shadows under sunlight. Our everyday experience leads us to thinking about the projection of a vector onto a plane (the ground--its roughly a plane), but if you imagine holding out a pencil you can summon up the visual of projection onto a line, too.

The key concept is to use the basic condition of orthogonality ($u \cdot v = 0$) to figure things out.

Note that everything in this section is done by projecting onto subspaces! This is a bit of a restriction. In practice, this restriction can be removed by translating your whole problem to have a new origin.

# SubsectionSage and Orthogonal Projection

Sage has no built-in commands for orthogonal projections. But let us recall those parts of Sage that will be useful right now:

Sorry, that matrix isn't even square, so it can't be invertible. But this will be:

Finally, this makes sense:

This process should have some basic properties. Let's check them.

So $A^TA$ is square, symmetric, and invertible.

Also as expected.

# SubsectionExercises

Find the projection matrix which computes projections of vectors in $\mathbb{R}^2$ onto the line $3x+2y=0$. (Since it goes through zero, it is a subspace.)

Find the orthogonal projection of the vector $\left( 17,3 \right)$ onto this line.

Find the projection matrix which computes projections of vectors in $\mathbb{R}^3$ onto the line which is the intersection of the planes $x-2y+3z = 0$ and $y+2z=0$. (Again, that is a subspace.)

Find the orthogonal projection of the vector $\left(1,1,1\right)$ onto this line.

Find the projection matrix which computes projections of vectors in $\mathbb{R}^3$ onto the plane $-2x + y +3z = 0$.
Find the orthogonal projection of the vector $\left( 9,7,-5\right)$ onto this plane.
Find the projection matrix which computes projections of vectors in $\mathbb{R}^4$ onto the plane which is the intersectoin of $5x+y +w=0$ and $z+y+z+w=0$. (This subspace is the 2 dimensional plane where these two 3-dimensional hyperplanes meet.)
Find the orthogonal projection of the vector $\left(-3,1,-3,1\right)$ on this plane.