![]() | This article'slead section may be too long. Please read thelength guidelines and helpmove details into the article's body.(September 2024) |
Thevector projection (also known as thevector component orvector resolution) of avectora on (or onto) a nonzero vectorb is theorthogonal projection ofa onto astraight line parallel tob. The projection ofa ontob is often written as ora∥b.
The vector component or vector resolute ofaperpendicular tob, sometimes also called thevector rejection ofafromb (denoted ora⊥b),[1] is the orthogonal projection ofa onto theplane (or, in general,hyperplane) that isorthogonal tob. Since both and are vectors, and their sum is equal toa, the rejection ofa fromb is given by:
To simplify notation, this article defines andThus, the vector is parallel to the vector is orthogonal to and
The projection ofa ontob can be decomposed into a direction and a scalar magnitude by writing it aswhere is a scalar, called thescalar projection ofa ontob, andb̂ is theunit vector in the direction ofb. The scalar projection is defined as[2]where the operator⋅ denotes adot product, ‖a‖ is thelength ofa, andθ is theangle betweena andb.The scalar projection is equal in absolute value to the length of the vector projection, with a minus sign if the direction of the projection isopposite to the direction ofb, that is, if the angle between the vectors is more than 90 degrees.
The vector projection can be calculated using the dot product of and as:
This article uses the convention that vectors are denoted in a bold font (e.g.a1), and scalars are written in normal font (e.g.a1).
The dot product of vectorsa andb is written as, the norm ofa is written ‖a‖, the angle betweena andb is denotedθ.
The scalar projection ofa onb is a scalar equal towhereθ is the angle betweena andb.
A scalar projection can be used as ascale factor to compute the corresponding vector projection.
The vector projection ofa onb is a vector whose magnitude is the scalar projection ofa onb with the same direction asb. Namely, it is defined aswhere is the corresponding scalar projection, as defined above, and is theunit vector with the same direction asb:
By definition, the vector rejection ofa onb is:
Hence,
Whenθ is not known, the cosine ofθ can be computed in terms ofa andb, by the following property of thedot producta ⋅b
By the above-mentioned property of the dot product, the definition of the scalar projection becomes:[2]
In two dimensions, this becomes
Similarly, the definition of the vector projection ofa ontob becomes:[2]which is equivalent to eitheror[3]
In two dimensions, the scalar rejection is equivalent to the projection ofa onto, which is rotated 90° to the left. Hence,
Such a dot product is called the "perp dot product."
By definition,
Hence,
By using the Scalar rejection using the perp dot product this gives
The scalar projectiona onb is a scalar which has a negative sign if90 degrees <θ ≤180 degrees. It coincides with thelength‖c‖ of the vector projection if the angle is smaller than 90°. More exactly:
The vector projection ofa onb is a vectora1 which is either null or parallel tob. More exactly:
The vector rejection ofa onb is a vectora2 which is either null or orthogonal tob. More exactly:
The orthogonal projection can be represented by aprojection matrix. To project a vector onto the unit vectora = (ax, ay, az), it would need to be multiplied with this projection matrix:
The vector projection is an important operation in theGram–Schmidtorthonormalization ofvector spacebases. It is also used in theseparating axis theorem to detect whether two convex shapes intersect.
Since the notions of vectorlength andangle between vectors can be generalized to anyn-dimensionalinner product space, this is also true for the notions of orthogonal projection of a vector, projection of a vector onto another, and rejection of a vector from another.
In some cases, the inner product coincides with the dot product. Whenever they don't coincide, the inner product is used instead of the dot product in the formal definitions of projection and rejection. For a three-dimensionalinner product space, the notions of projection of a vector onto another and rejection of a vector from another can be generalized to the notions of projection of a vector onto aplane, and rejection of a vector from a plane.[4] The projection of a vector on a plane is itsorthogonal projection on that plane. The rejection of a vector from a plane is its orthogonal projection on a straight line which is orthogonal to that plane. Both are vectors. The first is parallel to the plane, the second is orthogonal.
For a given vector and plane, the sum of projection and rejection is equal to the original vector. Similarly, for inner product spaces with more than three dimensions, the notions of projection onto a vector and rejection from a vector can be generalized to the notions of projection onto ahyperplane, and rejection from ahyperplane. Ingeometric algebra, they can be further generalized to the notions ofprojection and rejection of a general multivector onto/from any invertiblek-blade.