Vector projection

Revision as of 13:42, 8 May 2025 by 86.9.95.179 (talk) (Corrected formula for vector projection.)
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Template:Short description Template:For Template:Lead too long The vector projection (also known as the vector component or vector resolution) of a vector Template:Math on (or onto) a nonzero vector Template:Math is the orthogonal projection of Template:Math onto a straight line parallel to Template:Math. The projection of Template:Math onto Template:Math is often written as <math>\operatorname{proj}_\mathbf{b} \mathbf{a}</math> or Template:Math.

The vector component or vector resolute of Template:Math perpendicular to Template:Math, sometimes also called the vector rejection of Template:Math from Template:Math (denoted <math>\operatorname{oproj}_{\mathbf{b}} \mathbf{a}</math> or Template:Math),<ref>Template:Cite book</ref> is the orthogonal projection of Template:Math onto the plane (or, in general, hyperplane) that is orthogonal to Template:Math. Since both <math>\operatorname{proj}_{\mathbf{b}} \mathbf{a}</math> and <math>\operatorname{oproj}_{\mathbf{b}} \mathbf{a}</math> are vectors, and their sum is equal to Template:Math, the rejection of Template:Math from Template:Math is given by: <math display="block">\operatorname{oproj}_{\mathbf{b}} \mathbf{a} = \mathbf{a} - \operatorname{proj}_{\mathbf{b}} \mathbf{a}.</math>

File:Projection and rejection 2.svg
When Template:Math, Template:Math has an opposite direction with respect to Template:Math.

To simplify notation, this article defines <math>\mathbf{a}_1 := \operatorname{proj}_{\mathbf{b}} \mathbf{a}</math> and <math>\mathbf{a}_2 := \operatorname{oproj}_{\mathbf{b}} \mathbf{a}.</math> Thus, the vector <math>\mathbf{a}_1</math> is parallel to <math>\mathbf{b},</math> the vector <math>\mathbf{a}_2</math> is orthogonal to <math>\mathbf{b},</math> and <math>\mathbf{a} = \mathbf{a}_1 + \mathbf{a}_2.</math>

The projection of Template:Math onto Template:Math can be decomposed into a direction and a scalar magnitude by writing it as <math>\mathbf{a}_1 = a_1\mathbf{\hat b}</math> where <math>a_1</math> is a scalar, called the scalar projection of Template:Math onto Template:Math, and Template:Math is the unit vector in the direction of Template:Math. The scalar projection is defined as<ref name=":1">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> <math display="block">a_1 = \left\|\mathbf{a}\right\|\cos\theta = \mathbf{a}\cdot\mathbf{\hat b}</math> where the operator denotes a dot product, ‖a‖ is the length of Template:Math, and θ is the angle between Template:Math and Template:Math. 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 is opposite to the direction of Template:Math, that is, if the angle between the vectors is more than 90 degrees.

The vector projection can be calculated using the dot product of <math>\mathbf{a}</math> and <math>\mathbf{b}</math> as: <math display="block">\operatorname{proj}_{\mathbf{b}} \mathbf{a} = \left(\mathbf{a} \cdot \mathbf{\hat b}\right) \mathbf{\hat b} = \frac {\mathbf{a} \cdot \mathbf{b}} {\left\|\mathbf{b}\right\| } \frac {\mathbf{b}} {\left\|\mathbf{b}\right\|} = \frac {\mathbf{a} \cdot \mathbf{b}} {\left\|\mathbf{b}\right\|^2}{\mathbf{b}} = \frac {\mathbf{a} \cdot \mathbf{b}} {\mathbf{b} \cdot \mathbf{b}}{\mathbf{b}} ~ .</math>

NotationEdit

This article uses the convention that vectors are denoted in a bold font (e.g. Template:Math), and scalars are written in normal font (e.g. a1).

The dot product of vectors Template:Math and Template:Math is written as <math>\mathbf{a}\cdot\mathbf{b}</math>, the norm of Template:Math is written ‖a‖, the angle between Template:Math and Template:Math is denoted θ.

Definitions based on angle alphaEdit

Scalar projectionEdit

{{#invoke:Labelled list hatnote|labelledList|Main article|Main articles|Main page|Main pages}} The scalar projection of Template:Math on Template:Math is a scalar equal to <math display="block"> a_1 = \left\|\mathbf{a}\right\| \cos \theta , </math> where θ is the angle between Template:Math and Template:Math.

A scalar projection can be used as a scale factor to compute the corresponding vector projection.

Vector projectionEdit

The vector projection of Template:Math on Template:Math is a vector whose magnitude is the scalar projection of Template:Math on Template:Math with the same direction as Template:Math. Namely, it is defined as <math display="block">\mathbf{a}_1 = a_1 \mathbf{\hat b} = (\left\|\mathbf{a}\right\| \cos \theta) \mathbf{\hat b}</math> where <math>a_1</math> is the corresponding scalar projection, as defined above, and <math>\mathbf{\hat b}</math> is the unit vector with the same direction as Template:Math: <math display="block">\mathbf{\hat b} = \frac {\mathbf{b}} {\left\|\mathbf{b}\right\|}</math>

Vector rejectionEdit

By definition, the vector rejection of Template:Math on Template:Math is: <math display="block">\mathbf{a}_2 = \mathbf{a} - \mathbf{a}_1</math>

Hence, <math display="block">\mathbf{a}_2 = \mathbf{a} - \left(\left\|\mathbf{a}\right\| \cos \theta\right) \mathbf{\hat b}</math>

Definitions in terms of a and bEdit

When Template:Mvar is not known, the cosine of Template:Mvar can be computed in terms of Template:Math and Template:Math, by the following property of the dot product Template:Math <math display="block"> \mathbf{a} \cdot \mathbf{b} = \left\|\mathbf{a}\right\| \left\|\mathbf{b}\right\| \cos \theta</math>

Scalar projectionEdit

By the above-mentioned property of the dot product, the definition of the scalar projection becomes:<ref name=":1" />

In two dimensions, this becomes <math display="block">a_1 = \frac {\mathbf{a}_x \mathbf{b}_x + \mathbf{a}_y \mathbf{b}_y} {\left\|\mathbf{b}\right\|}.</math>

Vector projectionEdit

Similarly, the definition of the vector projection of Template:Math onto Template:Math becomes:<ref name=":1" /> <math display="block">\mathbf{a}_1 = a_1 \mathbf{\hat b} = \frac {\mathbf{a} \cdot \mathbf{b}} {\left\|\mathbf{b}\right\| } \frac {\mathbf{b}} {\left\|\mathbf{b}\right\|},</math> which is equivalent to either <math display="block">\mathbf{a}_1 = \left(\mathbf{a} \cdot \mathbf{\hat b}\right) \mathbf{\hat b},</math> or<ref>{{#invoke:citation/CS1|citation |CitationClass=web }} Template:Dead link </ref> <math display="block">\mathbf{a}_1 = \frac {\mathbf{a} \cdot \mathbf{b}} {\left\|\mathbf{b}\right\|^2}{\mathbf{b}} = \frac {\mathbf{a} \cdot \mathbf{b}} {\mathbf{b} \cdot \mathbf{b}}{\mathbf{b}} ~ .</math>

Scalar rejectionEdit

In two dimensions, the scalar rejection is equivalent to the projection of Template:Math onto <math>\mathbf{b}^\perp = \begin{pmatrix}-\mathbf{b}_y & \mathbf{b}_x\end{pmatrix}</math>, which is <math>\mathbf{b} = \begin{pmatrix}\mathbf{b}_x & \mathbf{b}_y\end{pmatrix}</math> rotated 90° to the left. Hence, <math display="block">a_2 = \left\|\mathbf{a}\right\| \sin \theta = \frac {\mathbf{a} \cdot \mathbf{b}^\perp} {\left\|\mathbf{b}\right\|} = \frac {\mathbf{a}_y \mathbf{b}_x - \mathbf{a}_x \mathbf{b}_y} {\left\|\mathbf{b}\right\| }.</math>

Such a dot product is called the "perp dot product."

Vector rejectionEdit

By definition, <math display="block">\mathbf{a}_2 = \mathbf{a} - \mathbf{a}_1 </math>

Hence, <math display="block">\mathbf{a}_2 = \mathbf{a} - \frac {\mathbf{a} \cdot \mathbf{b}} {\mathbf{b} \cdot \mathbf{b}}{\mathbf{b}}.</math>

By using the Scalar rejection using the perp dot product this gives

<math display="block">\mathbf{a}_2 = \frac{\mathbf{a}\cdot\mathbf{b}^\perp}{\mathbf{b}\cdot\mathbf{b}}\mathbf{b}^\perp</math>

PropertiesEdit

File:Dot Product.svg
If 0° ≤ θ ≤ 90°, as in this case, the scalar projection of Template:Math on Template:Math coincides with the length of the vector projection.

Scalar projectionEdit

{{#invoke:Labelled list hatnote|labelledList|Main article|Main articles|Main page|Main pages}} The scalar projection Template:Math on Template:Math is a scalar which has a negative sign if 90 degrees < θ180 degrees. It coincides with the length Template:Math of the vector projection if the angle is smaller than 90°. More exactly:

Vector projectionEdit

The vector projection of Template:Math on Template:Math is a vector Template:Math which is either null or parallel to Template:Math. More exactly:

Vector rejectionEdit

The vector rejection of Template:Math on Template:Math is a vector Template:Math which is either null or orthogonal to Template:Math. More exactly:

Matrix representationEdit

The orthogonal projection can be represented by a projection matrix. To project a vector onto the unit vector Template:Math, it would need to be multiplied with this projection matrix:

UsesEdit

The vector projection is an important operation in the Gram–Schmidt orthonormalization of vector space bases. It is also used in the separating axis theorem to detect whether two convex shapes intersect.

GeneralizationsEdit

Since the notions of vector length and angle between vectors can be generalized to any n-dimensional inner 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.

Vector projection on a planeEdit

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-dimensional inner 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 a plane, and rejection of a vector from a plane.<ref> M.J. Baker, 2012. Projection of a vector onto a plane. Published on www.euclideanspace.com.</ref> The projection of a vector on a plane is its orthogonal 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 a hyperplane, and rejection from a hyperplane. In geometric algebra, they can be further generalized to the notions of projection and rejection of a general multivector onto/from any invertible k-blade.

See alsoEdit

ReferencesEdit

Template:Reflist

External linksEdit

{{#invoke:Navbox|navbox}}