Jump to content
  • Advertisement
Sign in to follow this  
Morpheus011

vector projections

This topic is 4570 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm reviewing my linear algebra and have come across something that I don't fully understand. I know that we can find the projection of a vector P onto a vector Q by the following: proj_q P = (P.Q)/||Q|| (eq 1.0) This tells us the length of P projected onto Q. What I'm not fully grasping is why we then multiply this by Q normalized, or Q/||Q|| giving: proj_q P = ((P.Q)/||Q||^2) * Q (eq 1.1) The book I have says this gives us the vector of the desired length (eq 1.0) that is parallel to the vector Q. I'm just not sure why multiplying the projected vector by the normalized vector Q will give us a parallel vector. I'm guessing there's some geometric proof for this, but I can't seem to find it. Any help is greatly appreciated, thanks :)

Share this post


Link to post
Share on other sites
Advertisement
Consider - the projection of P on Q is the component of P in the same direction as Q. Therefore, the projection of P on Q is parallel to Q and is therefore a*Q for some value A. If we make Q normalized, then a = the length of the projection.

In other words - Q/||Q|| is a vector with length 1 in the same direction as Q. We desire a vector of length (P dot Q)/||Q|| in the same direction as Q. So therefore, (P dot Q)/||Q||^2 * Q fits the bill.

Share this post


Link to post
Share on other sites
beautiful, I wasn't really taking into account the fact that a normalized vector inherently contains the directional data of the vector. Thanks a lot for clearing that up for me, it makes a lot more sense now! :)

Share this post


Link to post
Share on other sites
The general form for a projection into a subspace is P = A(ATA)-1ATb, where A is your subspace basis and b is your point in Rm. As you can see, for vector projections (A is 3x1), it simplifies to A(A.b/A.A). What's probably the most interesting thing about this form of the projection is that you can use it to solve the least-squares minimization problem. This is because the projected point is the closest point on the subspace to the original point.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!