Hubbry Logo
search
logo
2060729

Vector projection

logo
Community Hub0 Subscribers
Read side by side
from Wikipedia

The vector projection (also known as the vector component or vector resolution) of a vector a on (or onto) a nonzero vector b is the orthogonal projection of a onto a straight line parallel to b. The projection of a onto b is often written as or ab.

The vector component or vector resolute of a perpendicular to b, sometimes also called the vector rejection of a from b (denoted or ab),[1] is the orthogonal projection of a onto the plane (or, in general, hyperplane) that is orthogonal to b. Since both and are vectors, and their sum is equal to a, the rejection of a from b is given by:

Projection of a on b (a1), and rejection of a from b (a2)
When 90° < θ ≤ 180°, a1 has an opposite direction with respect to b.

To simplify notation, this article defines and Thus, the vector is parallel to the vector is orthogonal to and

The projection of a onto b can be decomposed into a direction and a scalar magnitude by writing it as where is a scalar, called the scalar projection of a onto b, and is the unit vector in the direction of b. The scalar projection is defined as[2] where the operator denotes a dot product, ‖a‖ is the length of a, and θ is the angle between a and b. 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 b, 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:

Notation

[edit]

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 vectors a and b is written as , the norm of a is written ‖a‖, the angle between a and b is denoted θ.

Definitions based on angle alpha

[edit]

Scalar projection

[edit]

The scalar projection of a on b is a scalar equal to where θ is the angle between a and b.

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

Vector projection

[edit]

The vector projection of a on b is a vector whose magnitude is the scalar projection of a on b with the same direction as b. Namely, it is defined as where is the corresponding scalar projection, as defined above, and is the unit vector with the same direction as b:

Vector rejection

[edit]

By definition, the vector rejection of a on b is:

Hence,

Definitions in terms of a and b

[edit]

When θ is not known, the cosine of θ can be computed in terms of a and b, by the following property of the dot product ab

Scalar projection

[edit]

By the above-mentioned property of the dot product, the definition of the scalar projection becomes:[2]

In two dimensions, this becomes

Vector projection

[edit]

Similarly, the definition of the vector projection of a onto b becomes:[2] which is equivalent to either or[3]

Scalar rejection

[edit]

In two dimensions, the scalar rejection is equivalent to the projection of a onto , which is rotated 90° to the left. Hence,

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

Vector rejection

[edit]

By definition,

Hence,

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

Properties

[edit]
If 0° ≤ θ ≤ 90°, as in this case, the scalar projection of a on b coincides with the length of the vector projection.

Scalar projection

[edit]

The scalar projection a on b is a scalar which has a negative sign if 90 degrees < θ180 degrees. It coincides with the length c of the vector projection if the angle is smaller than 90°. More exactly:

  • a1 = ‖a1 if 0° ≤ θ ≤ 90°,
  • a1 = −‖a1 if 90° < θ ≤ 180°.

Vector projection

[edit]

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

  • a1 = 0 if θ = 90°,
  • a1 and b have the same direction if 0° ≤ θ < 90°,
  • a1 and b have opposite directions if 90° < θ ≤ 180°.

Vector rejection

[edit]

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

  • a2 = 0 if θ = 0° or θ = 180°,
  • a2 is orthogonal to b if 0 < θ < 180°,

Matrix representation

[edit]

The orthogonal projection can be represented by a projection matrix. To project a vector onto the unit vector a = (ax, ay, az), it would need to be multiplied with this projection matrix:

Uses

[edit]

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.

Generalizations

[edit]

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 plane

[edit]

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.[4] 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 also

[edit]

References

[edit]
[edit]
Revisions and contributorsEdit on WikipediaRead on Wikipedia
from Grokipedia
In linear algebra and vector geometry, the vector projection of a vector u\vec{u} onto a nonzero vector v\vec{v} is the vector projvu\operatorname{proj}_{\vec{v}} \vec{u} that lies along the line spanned by v\vec{v} and represents the "shadow" or orthogonal component of u\vec{u} in the direction of v\vec{v}, formally defined as projvu=(uvv2)v\operatorname{proj}_{\vec{v}} \vec{u} = \left( \frac{\vec{u} \cdot \vec{v}}{\|\vec{v}\|^2} \right) \vec{v}, where \cdot denotes the dot product and \|\cdot\| the Euclidean norm.[1] The scalar projection, or component, is the signed magnitude of this vector, given by compvu=uvv\operatorname{comp}_{\vec{v}} \vec{u} = \frac{\vec{u} \cdot \vec{v}}{\|\vec{v}\|}, which measures how far u\vec{u} extends in the direction of the unit vector v^=v/v\hat{v} = \vec{v}/\|\vec{v}\|.[2] This concept underpins the geometric interpretation of the dot product, uv=uvcosθ\vec{u} \cdot \vec{v} = \|\vec{u}\| \|\vec{v}\| \cos \theta, where θ\theta is the angle between u\vec{u} and v\vec{v}, and is essential for orthogonal decomposition: any vector u\vec{u} can be uniquely decomposed as u=projvu+(uprojvu)\vec{u} = \operatorname{proj}_{\vec{v}} \vec{u} + (\vec{u} - \operatorname{proj}_{\vec{v}} \vec{u}), with the remainder perpendicular to v\vec{v}.[3] In higher dimensions, projections extend to subspaces, where the projection onto a subspace VV is the point in VV closest to u\vec{u} in the Euclidean metric, minimizing the distance up\|\vec{u} - \mathbf{p}\| for pV\mathbf{p} \in V.[4] Vector projections have broad applications across disciplines; in physics, they compute the effective component of a force along a path, such as the work W=FΔr=ΔrcompΔrFW = \mathbf{F} \cdot \Delta \mathbf{r} = \|\Delta \mathbf{r}\| \cdot \operatorname{comp}_{\Delta \mathbf{r}} \mathbf{F}, which quantifies energy transfer in mechanics.[5] In engineering and computer graphics, projections model light direction for shading algorithms, simulate shadows by projecting object geometries onto surfaces, and facilitate perspective transformations in rendering pipelines.[6] Additionally, in data analysis and machine learning, orthogonal projections onto principal components reduce dimensionality while preserving variance, forming the basis of techniques like principal component analysis (PCA).[7]

Fundamentals

Notation

In the study of vector projections within Euclidean space Rn\mathbb{R}^n, vectors are conventionally represented using boldface lowercase letters, such as a\mathbf{a} and b\mathbf{b}, or with arrows overhead, such as a\vec{a} and b\vec{b}, to distinguish them from scalars.[8] The dot product of two vectors a\mathbf{a} and b\mathbf{b} is denoted either as ab\mathbf{a} \cdot \mathbf{b} or using the inner product notation a,b\langle \mathbf{a}, \mathbf{b} \rangle, which yields a scalar value representing their directional alignment.[9][10] The Euclidean norm (or magnitude) of a vector a\mathbf{a} is expressed as a=aa\|\mathbf{a}\| = \sqrt{\mathbf{a} \cdot \mathbf{a}}, providing the length in the vector space.[3] Specific to projections, the vector projection of a\mathbf{a} onto a nonzero vector b\mathbf{b} is symbolized as \projba\proj_{\mathbf{b}} \mathbf{a}, while the scalar projection—the signed length of this projection—is given by abb\frac{\mathbf{a} \cdot \mathbf{b}}{\|\mathbf{b}\|}; the absolute value of the latter denotes the unsigned magnitude./02%3A_Vectors_In_Two_Dimensions/2.06%3A_The_Vector_Projection_of_One_Vector_onto_Another)[11] Additionally, the unit vector in the direction of b\mathbf{b} is denoted b^=bb\hat{\mathbf{b}} = \frac{\mathbf{b}}{\|\mathbf{b}\|}, normalizing b\mathbf{b} to unit length for projection computations.[3]/10%3A_Inner_Product_Spaces/10.03%3A_Projections)

Scalar projection

The scalar projection of a vector a\mathbf{a} onto another vector b\mathbf{b} measures the signed extent to which a\mathbf{a} extends in the direction of b\mathbf{b}, indicating how much of a\mathbf{a} aligns with b\mathbf{b}'s direction. This value is positive if the angle between a\mathbf{a} and b\mathbf{b} is acute (less than 90 degrees) and negative if obtuse (greater than 90 degrees), reflecting the directional alignment or opposition.[12][2] The signed scalar projection, often denoted as scalba\operatorname{scal}_{\mathbf{b}} \mathbf{a} or compba\operatorname{comp}_{\mathbf{b}} \mathbf{a}, is given by the formula
scalba=abb \operatorname{scal}_{\mathbf{b}} \mathbf{a} = \frac{\mathbf{a} \cdot \mathbf{b}}{\|\mathbf{b}\|}
where ab\mathbf{a} \cdot \mathbf{b} is the dot product of a\mathbf{a} and b\mathbf{b}, and b\|\mathbf{b}\| is the magnitude (norm) of b\mathbf{b}. This expression yields a scalar value representing the length of the component of a\mathbf{a} parallel to b\mathbf{b}, adjusted for sign based on the angle between them.[12][13] Geometrically, the scalar projection corresponds to the signed length of the shadow cast by a\mathbf{a} onto the line passing through the origin in the direction of b\mathbf{b}, akin to measuring the displacement along that line with directionality preserved. If a\mathbf{a} points in the same general direction as b\mathbf{b}, the projection is positive and equals the length of the orthogonal projection vector; otherwise, it is negative.[2]/02:_Applications_of_Trigonometry/2.09:_The_Dot_Product_and_Projection) For example, consider the vectors a=(3,4)\mathbf{a} = (3, 4) and b=(1,0)\mathbf{b} = (1, 0) in two dimensions. The dot product ab=31+40=3\mathbf{a} \cdot \mathbf{b} = 3 \cdot 1 + 4 \cdot 0 = 3, and b=1\|\mathbf{b}\| = 1, so the scalar projection is 3/1=33 / 1 = 3. This positive value indicates that a\mathbf{a} extends 3 units along the direction of b\mathbf{b} (the positive x-axis).[12] This scalar projection is equivalently expressed as scalba=acosθ\operatorname{scal}_{\mathbf{b}} \mathbf{a} = \|\mathbf{a}\| \cos \theta, where θ\theta is the angle between a\mathbf{a} and b\mathbf{b}, highlighting its dependence on the magnitude of a\mathbf{a} and the cosine of their angular separation.[13]/02:_Applications_of_Trigonometry/2.09:_The_Dot_Product_and_Projection)

Vector projection

In vector geometry, the vector projection of a vector a\mathbf{a} onto a nonzero vector b\mathbf{b}, denoted \projba\proj_{\mathbf{b}} \mathbf{a}, is the unique vector lying along the line spanned by b\mathbf{b} that minimizes the Euclidean distance to a\mathbf{a}.[14] This projection represents the "shadow" of a\mathbf{a} cast onto the direction of b\mathbf{b}, capturing the component of a\mathbf{a} that is parallel to b\mathbf{b}.[3] As an orthogonal projection onto the one-dimensional subspace spanned by b\mathbf{b}, it ensures \projba\proj_{\mathbf{b}} \mathbf{a} is the closest point in that subspace to a\mathbf{a}.[15] The vector projection is given by the formula
\projba=(abb2)b, \proj_{\mathbf{b}} \mathbf{a} = \left( \frac{\mathbf{a} \cdot \mathbf{b}}{\|\mathbf{b}\|^2} \right) \mathbf{b},
which scales b\mathbf{b} by the ratio of the dot product to the squared magnitude of b\mathbf{b}.[3] Equivalently, it can be expressed as \projba=(\scalba)bb\proj_{\mathbf{b}} \mathbf{a} = (\scal_{\mathbf{b}} \mathbf{a}) \cdot \frac{\mathbf{b}}{\|\mathbf{b}\|}, where the scalar projection \scalba\scal_{\mathbf{b}} \mathbf{a} provides the signed length of the coefficient along the unit vector in the direction of b\mathbf{b}.[16] The scalar projection thus acts as the multiplier that aligns the projection with the direction and magnitude of b\mathbf{b}. A fundamental property of the vector projection is that the difference a\projba\mathbf{a} - \proj_{\mathbf{b}} \mathbf{a} is orthogonal to b\mathbf{b}, satisfying (a\projba)b=0(\mathbf{a} - \proj_{\mathbf{b}} \mathbf{a}) \cdot \mathbf{b} = 0.[17] This orthogonality confirms that \projba\proj_{\mathbf{b}} \mathbf{a} fully accounts for the parallel component of a\mathbf{a} relative to b\mathbf{b}. For example, in three-dimensional space, consider a=(1,2,3)\mathbf{a} = (1, 2, 3) and b=(0,1,0)\mathbf{b} = (0, 1, 0). The dot product ab=2\mathbf{a} \cdot \mathbf{b} = 2 and b2=1\|\mathbf{b}\|^2 = 1, so \projba=2(0,1,0)=(0,2,0)\proj_{\mathbf{b}} \mathbf{a} = 2 \cdot (0, 1, 0) = (0, 2, 0).[3]

Vector rejection

The vector rejection of a vector a\mathbf{a} onto a nonzero vector b\mathbf{b}, denoted rejba\operatorname{rej}_{\mathbf{b}} \mathbf{a}, is the component of a\mathbf{a} orthogonal to b\mathbf{b}, representing the portion of a\mathbf{a} that lies in the direction perpendicular to b\mathbf{b}.[18] This vector is computed using the formula
rejba=aprojba, \operatorname{rej}_{\mathbf{b}} \mathbf{a} = \mathbf{a} - \operatorname{proj}_{\mathbf{b}} \mathbf{a},
where projba\operatorname{proj}_{\mathbf{b}} \mathbf{a} is the vector projection of a\mathbf{a} onto b\mathbf{b}.[18] Geometrically, rejba\operatorname{rej}_{\mathbf{b}} \mathbf{a} connects the tip of projba\operatorname{proj}_{\mathbf{b}} \mathbf{a} to the tip of a\mathbf{a} and is perpendicular to b\mathbf{b}, completing the orthogonal decomposition a=projba+rejba\mathbf{a} = \operatorname{proj}_{\mathbf{b}} \mathbf{a} + \operatorname{rej}_{\mathbf{b}} \mathbf{a}.[18] For instance, with a=(3,4)\mathbf{a} = (3, 4) and b=(1,0)\mathbf{b} = (1, 0), the projection is (3,0)(3, 0), so the rejection is (0,4)(0, 4).[18] The magnitude of the rejection satisfies rejba=asinθ\|\operatorname{rej}_{\mathbf{b}} \mathbf{a}\| = \|\mathbf{a}\| \sin \theta, where θ\theta is the angle between a\mathbf{a} and b\mathbf{b}.[19]

Definitions

Geometric definition

The geometric interpretation of vector projection relies on the angle between two vectors in Euclidean space, providing an intuitive foundation for understanding how one vector "casts a shadow" onto the direction of another. Consider two nonzero vectors a\mathbf{a} and b\mathbf{b} in Rn\mathbb{R}^n. The angle α\alpha between them satisfies 0απ0 \leq \alpha \leq \pi and is defined such that cosα=abab\cos \alpha = \frac{\mathbf{a} \cdot \mathbf{b}}{\|\mathbf{a}\| \|\mathbf{b}\|}, where the dot product captures the cosine of this angle based on their directional alignment.[20] This trigonometric relation roots the projection in classical geometry, analogous to the shadow cast by an object under directional light, where the length of the shadow along a line represents the aligned component./02%3A_Vectors_In_Two_Dimensions/2.06%3A_The_Vector_Projection_of_One_Vector_onto_Another) The scalar projection of a\mathbf{a} onto b\mathbf{b} measures the signed magnitude of this aligned component, given by acosα\|\mathbf{a}\| \cos \alpha. This value is positive if α<π/2\alpha < \pi/2 (acute angle, indicating alignment), negative if α>π/2\alpha > \pi/2 (obtuse angle, indicating opposition), and zero if α=π/2\alpha = \pi/2 (perpendicular)./02%3A_Applications_of_Trigonometry/2.09%3A_The_Dot_Product_and_Projection) The vector projection extends this to a full vector in the direction of b\mathbf{b}, expressed as projba=(acosα)b^\operatorname{proj}_{\mathbf{b}} \mathbf{a} = (\|\mathbf{a}\| \cos \alpha) \hat{\mathbf{b}}, where b^=b/b\hat{\mathbf{b}} = \mathbf{b} / \|\mathbf{b}\| is the unit vector along b\mathbf{b}. This projection vector lies along the line spanned by b\mathbf{b} and is the closest point on that line to a\mathbf{a}./02%3A_Vectors_In_Two_Dimensions/2.06%3A_The_Vector_Projection_of_One_Vector_onto_Another) Complementing the projection, the vector rejection (or perpendicular component) of a\mathbf{a} onto b\mathbf{b} captures the remainder, with magnitude asinα\|\mathbf{a}\| \sin \alpha orthogonal to b\mathbf{b}. The vector rejection is rejba=aprojba\operatorname{re j}_{\mathbf{b}} \mathbf{a} = \mathbf{a} - \operatorname{proj}_{\mathbf{b}} \mathbf{a}./03%3A_Inner-product_spaces/3.04%3A_Projections) These concepts trace their formal development to late 19th-century advancements in vector methods by J. Willard Gibbs and Oliver Heaviside, building on earlier geometric ideas like shadows in perspective projection.[21] This geometric framework assumes an Euclidean space equipped with an inner product, which defines angles and lengths; without it, such as in general normed spaces lacking an angle metric, projections via angles are not well-defined.[22] The algebraic equivalents using the dot product provide computational tools but preserve this underlying trigonometric intuition./Appendix_A%3A_Linear_Algebra/A.5%3A_Inner_Product_and_Projections)

Algebraic definition

In an inner product space equipped with an inner product ,\langle \cdot, \cdot \rangle, such as the dot product in Euclidean space, the algebraic definition of vector projection formalizes the concept without relying on coordinate systems or explicit geometric angles./Appendix_A:_Linear_Algebra/A.5:_Inner_Product_and_Projections) The scalar projection of a vector a\mathbf{a} onto a nonzero vector b\mathbf{b} is the scalar quantity abb\frac{\mathbf{a} \cdot \mathbf{b}}{\|\mathbf{b}\|}, which algebraically captures the signed length of the component of a\mathbf{a} along the direction of b\mathbf{b}, though it derives from the inner product relation to the cosine of the angle between them in the geometric interpretation./Vector_Calculus/1:_Vector_Basics/1.5:_The_Dot_and_Cross_Product)[23] The vector projection, denoted projba\operatorname{proj}_{\mathbf{b}} \mathbf{a}, is the vector lying along b\mathbf{b} that best approximates a\mathbf{a} in the least-squares sense:
projba=(abbb)b. \operatorname{proj}_{\mathbf{b}} \mathbf{a} = \left( \frac{\mathbf{a} \cdot \mathbf{b}}{\mathbf{b} \cdot \mathbf{b}} \right) \mathbf{b}.
/Vector_Calculus/1:_Vector_Basics/1.5:_The_Dot_and_Cross_Product)
This formula emerges as the unique solution to the optimization problem of minimizing the squared distance atb2\|\mathbf{a} - t \mathbf{b}\|^2 over all scalars tRt \in \mathbb{R}, where expanding the norm yields a22t(ab)+t2b2\|\mathbf{a}\|^2 - 2t (\mathbf{a} \cdot \mathbf{b}) + t^2 \|\mathbf{b}\|^2 and setting the derivative with respect to tt to zero gives t=abbbt = \frac{\mathbf{a} \cdot \mathbf{b}}{\mathbf{b} \cdot \mathbf{b}}.[24] Equivalently, the derivation follows from the orthogonality principle: the error vector (or rejection) aprojba\mathbf{a} - \operatorname{proj}_{\mathbf{b}} \mathbf{a} must be perpendicular to b\mathbf{b}, so (atb)b=0(\mathbf{a} - t \mathbf{b}) \cdot \mathbf{b} = 0, which rearranges to ab=t(bb)\mathbf{a} \cdot \mathbf{b} = t (\mathbf{b} \cdot \mathbf{b}) and thus t=abbbt = \frac{\mathbf{a} \cdot \mathbf{b}}{\mathbf{b} \cdot \mathbf{b}}.[24][25] The vector rejection is then explicitly a(abbb)b\mathbf{a} - \left( \frac{\mathbf{a} \cdot \mathbf{b}}{\mathbf{b} \cdot \mathbf{b}} \right) \mathbf{b}, representing the component of a\mathbf{a} orthogonal to $\mathbf{b})./Vector_Calculus/1:_Vector_Basics/1.5:_The_Dot_and_Cross_Product) This framework is coordinate-free, relying solely on the inner product, and extends seamlessly to any finite-dimensional inner product space, enabling computations in arbitrary dimensions without reference to angles or visual geometry.[26]

Properties

Scalar projection properties

The scalar projection of a vector a\mathbf{a} onto a nonzero vector b\mathbf{b}, denoted scalba\text{scal}_{\mathbf{b}} \mathbf{a}, exhibits linearity in a\mathbf{a}. Specifically, for scalars cc and dd, and vectors a\mathbf{a} and e\mathbf{e},
scalb(ca+de)=cscalba+dscalbe, \text{scal}_{\mathbf{b}} (c \mathbf{a} + d \mathbf{e}) = c \, \text{scal}_{\mathbf{b}} \mathbf{a} + d \, \text{scal}_{\mathbf{b}} \mathbf{e},
which follows from the bilinearity of the dot product underlying the definition scalba=abb\text{scal}_{\mathbf{b}} \mathbf{a} = \frac{\mathbf{a} \cdot \mathbf{b}}{\|\mathbf{b}\|}.[24] This property ensures that scalar projections respect vector addition and scaling in the projected vector. The sign of the scalar projection reflects the relative orientation of a\mathbf{a} and b\mathbf{b}: it is positive if the angle θ\theta between them satisfies 0θ<900^\circ \leq \theta < 90^\circ, zero if θ=90\theta = 90^\circ (indicating perpendicularity), and negative if 90<θ18090^\circ < \theta \leq 180^\circ. This behavior arises because scalba=acosθ\text{scal}_{\mathbf{b}} \mathbf{a} = \|\mathbf{a}\| \cos \theta, where cosθ\cos \theta determines the sign.[17] By the Cauchy-Schwarz inequality, abab|\mathbf{a} \cdot \mathbf{b}| \leq \|\mathbf{a}\| \|\mathbf{b}\|, the magnitude of the scalar projection satisfies
scalbaa, |\text{scal}_{\mathbf{b}} \mathbf{a}| \leq \|\mathbf{a}\|,
with equality if and only if a\mathbf{a} is a scalar multiple of b\mathbf{b} (i.e., parallel).[27] Scaling the direction vector b\mathbf{b} affects the scalar projection in a direction-dependent manner: for k>0k > 0, scalkba=scalba\text{scal}_{k \mathbf{b}} \mathbf{a} = \text{scal}_{\mathbf{b}} \mathbf{a}, preserving the value since the unit vector in the direction of kbk \mathbf{b} matches that of b\mathbf{b}; for k<0k < 0, scalkba=scalba\text{scal}_{k \mathbf{b}} \mathbf{a} = -\text{scal}_{\mathbf{b}} \mathbf{a}, reversing the sign due to the opposite direction.[13] In physics, the scalar projection scalFd\text{scal}_{\mathbf{F}} \mathbf{d} of the displacement d\mathbf{d} onto the force F\mathbf{F} represents the effective distance traveled in the force's direction, such that the work done is FscalFd\|\mathbf{F}\| \cdot \text{scal}_{\mathbf{F}} \mathbf{d}.[28]

Vector projection properties

The vector projection \projba\proj_{\mathbf{b}} \mathbf{a} of a vector a\mathbf{a} onto a nonzero vector b\mathbf{b} in an inner product space exhibits key properties as an orthogonal projection operator onto the one-dimensional subspace spanned by b\mathbf{b}. These properties arise from the geometric and algebraic definitions of the projection and are fundamental in linear algebra.[15] One central property is orthogonality: the projected vector \projba\proj_{\mathbf{b}} \mathbf{a} is orthogonal to the rejection vector a\projba\mathbf{a} - \proj_{\mathbf{b}} \mathbf{a}, satisfying
\projba(a\projba)=0. \proj_{\mathbf{b}} \mathbf{a} \cdot (\mathbf{a} - \proj_{\mathbf{b}} \mathbf{a}) = 0.
This ensures that the rejection lies in the orthogonal complement of the span of b\mathbf{b}.[15][3] The projection operator is idempotent, meaning
\projb(\projba)=\projba, \proj_{\mathbf{b}} (\proj_{\mathbf{b}} \mathbf{a}) = \proj_{\mathbf{b}} \mathbf{a},
since \projba\proj_{\mathbf{b}} \mathbf{a} already belongs to the subspace spanned by b\mathbf{b}, and further projection onto the same subspace leaves it unchanged. This idempotence characterizes orthogonal projections in general.[29][30] Linearity holds for the projection operator: for scalars cc and dd, and vectors a\mathbf{a} and c\mathbf{c},
\projb(ca+dc)=c\projba+d\projbc. \proj_{\mathbf{b}} (c \mathbf{a} + d \mathbf{c}) = c \proj_{\mathbf{b}} \mathbf{a} + d \proj_{\mathbf{b}} \mathbf{c}.
This follows from the linearity of the inner product and scalar multiplication in the projection formula.[15] The operator is also symmetric (self-adjoint) with respect to the inner product, so
\projbac=a\projbc \proj_{\mathbf{b}} \mathbf{a} \cdot \mathbf{c} = \mathbf{a} \cdot \proj_{\mathbf{b}} \mathbf{c}
for any vectors a\mathbf{a} and c\mathbf{c}. In matrix terms, the corresponding projection matrix is symmetric.[29][30] A key decomposition property states that any vector a\mathbf{a} can be uniquely expressed as
a=\projba+\rejba, \mathbf{a} = \proj_{\mathbf{b}} \mathbf{a} + \rej_{\mathbf{b}} \mathbf{a},
where \rejba=a\projba\rej_{\mathbf{b}} \mathbf{a} = \mathbf{a} - \proj_{\mathbf{b}} \mathbf{a} is the rejection, and the two components are orthogonal. This orthogonal direct sum decomposition underlies many applications of projections.[3][15] If b=0\mathbf{b} = \mathbf{0}, the vector projection is undefined, as the formula involves division by b2=0\|\mathbf{b}\|^2 = 0; in such cases, the subspace is trivial, and projections are conventionally not defined or taken as the zero vector in limiting contexts.[31]/Vector_Calculus/12:_Vectors_in_Three_Dimensions/12.03:_The_Dot_Product)

Vector rejection properties

The vector rejection of a\mathbf{a} onto b\mathbf{b}, denoted rejba\operatorname{rej}_{\mathbf{b}} \mathbf{a}, is the component of a\mathbf{a} orthogonal to b\mathbf{b}, obtained as aprojba\mathbf{a} - \operatorname{proj}_{\mathbf{b}} \mathbf{a}. This vector plays a crucial role in the orthogonal decomposition a=projba+rejba\mathbf{a} = \operatorname{proj}_{\mathbf{b}} \mathbf{a} + \operatorname{rej}_{\mathbf{b}} \mathbf{a}, where the two components are mutually perpendicular.[32] By construction, the rejection vector is orthogonal to b\mathbf{b}, satisfying rejbab=0\operatorname{rej}_{\mathbf{b}} \mathbf{a} \cdot \mathbf{b} = 0. This orthogonality ensures that the rejection lies in the hyperplane perpendicular to b\mathbf{b}.[32] The rejection operator is linear, meaning rejb(ca+dc)=crejba+drejbc\operatorname{rej}_{\mathbf{b}} (c \mathbf{a} + d \mathbf{c}) = c \operatorname{rej}_{\mathbf{b}} \mathbf{a} + d \operatorname{rej}_{\mathbf{b}} \mathbf{c} for scalars c,dc, d and vectors a,c\mathbf{a}, \mathbf{c}. This follows from the linearity of the projection operator, as rejection is its complement.[33] The magnitude of the rejection vector relates to that of a\mathbf{a} via the Pythagorean theorem applied to the orthogonal decomposition:
rejba2=a2(scalba)2, \|\operatorname{rej}_{\mathbf{b}} \mathbf{a}\|^2 = \|\mathbf{a}\|^2 - (\operatorname{scal}_{\mathbf{b}} \mathbf{a})^2,
where scalba\operatorname{scal}_{\mathbf{b}} \mathbf{a} is the scalar projection. This identity holds because a2=projba2+rejba2\|\mathbf{a}\|^2 = \|\operatorname{proj}_{\mathbf{b}} \mathbf{a}\|^2 + \|\operatorname{rej}_{\mathbf{b}} \mathbf{a}\|^2.[32] Like the projection operator, the rejection operator is idempotent, meaning rejb(rejba)=rejba\operatorname{rej}_{\mathbf{b}} (\operatorname{rej}_{\mathbf{b}} \mathbf{a}) = \operatorname{rej}_{\mathbf{b}} \mathbf{a}, since the rejection already lies in the orthogonal complement of the span of b\mathbf{b}, and further rejection leaves it unchanged.[33] The rejection direction is invariant under rotations in the plane spanned by a\mathbf{a} and b\mathbf{b}, as it always points perpendicular to b\mathbf{b}, rotating with the orientation of a\mathbf{a} relative to b\mathbf{b}. This geometric property underscores its role in decomposing vectors in 2D subspaces.[33] Finally, the complementarity property holds: projb(rejba)=0\operatorname{proj}_{\mathbf{b}} (\operatorname{rej}_{\mathbf{b}} \mathbf{a}) = \mathbf{0}, confirming that the rejection has no component parallel to b\mathbf{b}. This complements the decomposition, with the projection of the rejection being zero.[32]

Representations

Matrix representation

The orthogonal projection of a vector onto the line spanned by a nonzero vector b\mathbf{b} can be represented using the projection matrix Pb=bbTbTbP_{\mathbf{b}} = \frac{\mathbf{b} \mathbf{b}^T}{\mathbf{b}^T \mathbf{b}}, where T^T denotes the transpose operation.[4] This matrix acts on any vector a\mathbf{a} to yield the projected vector via projba=Pba\operatorname{proj}_{\mathbf{b}} \mathbf{a} = P_{\mathbf{b}} \mathbf{a}.[4] In matrix terms, PbP_{\mathbf{b}} satisfies the properties Pb2=PbP_{\mathbf{b}}^2 = P_{\mathbf{b}} (idempotence, ensuring repeated projections remain unchanged) and PbT=PbP_{\mathbf{b}}^T = P_{\mathbf{b}} (symmetry).[4] When b\mathbf{b} is a unit vector (satisfying bTb=1\mathbf{b}^T \mathbf{b} = 1), the formula simplifies to Pb=bbTP_{\mathbf{b}} = \mathbf{b} \mathbf{b}^T.[4] For instance, in R2\mathbb{R}^2 with b=(10)\mathbf{b} = \begin{pmatrix} 1 \\ 0 \end{pmatrix} (a unit vector along the x-axis), the projection matrix is
Pb=(1000), P_{\mathbf{b}} = \begin{pmatrix} 1 & 0 \\ 0 & 0 \end{pmatrix},
which projects any vector onto the x-axis by retaining its first component and setting the second to zero.[4]
This matrix form is computationally advantageous for projecting multiple vectors onto the same line, as it enables efficient repeated applications through standard matrix-vector multiplication rather than scalar computations for each vector individually.[34]

Coordinate representations

In Cartesian coordinates, the vector projection of a=(a1,,an)\mathbf{a} = (a_1, \dots, a_n) onto a nonzero vector b=(b1,,bn)\mathbf{b} = (b_1, \dots, b_n) in Rn\mathbb{R}^n is expressed as
projba=(i=1naibii=1nbi2)b. \operatorname{proj}_{\mathbf{b}} \mathbf{a} = \left( \frac{\sum_{i=1}^n a_i b_i}{\sum_{i=1}^n b_i^2} \right) \mathbf{b}.
This formula computes the projection using the dot product ab=i=1naibi\mathbf{a} \cdot \mathbf{b} = \sum_{i=1}^n a_i b_i in the numerator and the squared magnitude b2=i=1nbi2\|\mathbf{b}\|^2 = \sum_{i=1}^n b_i^2 in the denominator, yielding the scalar multiple of b\mathbf{b}.[3][35] In two dimensions, consider a=(x1,y1)\mathbf{a} = (x_1, y_1) and b=(x2,y2)\mathbf{b} = (x_2, y_2) with b0\mathbf{b} \neq \mathbf{0}. The projection is
projba=(x1x2+y1y2x22+y22)(x2,y2). \operatorname{proj}_{\mathbf{b}} \mathbf{a} = \left( \frac{x_1 x_2 + y_1 y_2}{x_2^2 + y_2^2} \right) (x_2, y_2).
For a numerical example, let a=(3,4)\mathbf{a} = (3, 4) and b=(1,2)\mathbf{b} = (1, 2). The dot product is 31+42=113 \cdot 1 + 4 \cdot 2 = 11, and b2=12+22=5\|\mathbf{b}\|^2 = 1^2 + 2^2 = 5, so the scalar is 11/5=2.211/5 = 2.2. Thus, projba=2.2(1,2)=(2.2,4.4)\operatorname{proj}_{\mathbf{b}} \mathbf{a} = 2.2 \cdot (1, 2) = (2.2, 4.4).[3] In three dimensions, for a=(ax,ay,az)\mathbf{a} = (a_x, a_y, a_z) and b=(bx,by,bz)\mathbf{b} = (b_x, b_y, b_z) with b0\mathbf{b} \neq \mathbf{0}, the formula extends component-wise:
projba=(axbx+ayby+azbzbx2+by2+bz2)(bx,by,bz). \operatorname{proj}_{\mathbf{b}} \mathbf{a} = \left( \frac{a_x b_x + a_y b_y + a_z b_z}{b_x^2 + b_y^2 + b_z^2} \right) (b_x, b_y, b_z).
A simple case is projection onto the x-axis, where b=(1,0,0)\mathbf{b} = (1, 0, 0). Here, ab=ax\mathbf{a} \cdot \mathbf{b} = a_x and b2=1\|\mathbf{b}\|^2 = 1, so projba=(ax,0,0)\operatorname{proj}_{\mathbf{b}} \mathbf{a} = (a_x, 0, 0). For example, with a=(2,1,3)\mathbf{a} = (2, -1, 3), the projection is (2,0,0)(2, 0, 0).[3][35] The vector rejection, or the component of a\mathbf{a} orthogonal to b\mathbf{b}, has coordinates aprojba\mathbf{a} - \operatorname{proj}_{\mathbf{b}} \mathbf{a}, computed by subtracting the projection's components from a\mathbf{a}'s: (aicbi)(a_i - c b_i) for each ii, where c=(aibi)/(bi2)c = (\sum a_i b_i)/(\sum b_i^2). Using the earlier 2D example, the rejection is (3,4)(2.2,4.4)=(0.8,0.4)(3, 4) - (2.2, 4.4) = (0.8, -0.4).[3] This coordinate representation facilitates numerical computation, as it depends solely on finite sums of component products rather than angles or inverse trigonometric functions, making it efficient for direct evaluation in programming or calculators.[35] If b=0\mathbf{b} = \mathbf{0}, the denominator bi2=0\sum b_i^2 = 0, rendering the projection undefined, as no direction exists for projection.[3]

Applications

Physics and engineering

In physics, vector projection is fundamental for resolving forces into components along specific directions, enabling the analysis of their effects in constrained systems such as friction or structural supports. The parallel component of a force F\mathbf{F} along a unit direction vector d\mathbf{d} is given by F=(Fd)d\mathbf{F}_\parallel = (\mathbf{F} \cdot \mathbf{d}) \mathbf{d}, which isolates the portion contributing to motion or stress in that direction.[36] This resolution technique, rooted in the parallelogram law, allows physicists to decompose arbitrary forces into orthogonal components for equilibrium calculations, as seen in problems involving inclined planes or tension in cables.[36] Vector projections also play a key role in calculating work done by a force, where the scalar projection quantifies the effective component along the displacement path. The work WW performed by a constant force F\mathbf{F} over a displacement Δr\Delta \mathbf{r} is W=FΔr=ΔrscalΔrFW = \mathbf{F} \cdot \Delta \mathbf{r} = \|\Delta \mathbf{r}\| \cdot \text{scal}_{\Delta \mathbf{r}} \mathbf{F}, with the scalar projection scalΔrF=Fcosθ\text{scal}_{\Delta \mathbf{r}} \mathbf{F} = \|\mathbf{F}\| \cos \theta, where θ\theta is the angle between the vectors.[13] For instance, in moving a particle from the origin to (1,1,1) under a known force, the work equals the scalar projection of F\mathbf{F} onto 1,1,1\langle 1,1,1 \rangle times the displacement magnitude, highlighting how only the aligned force component contributes to energy transfer.[13] In collision dynamics, projections of velocity vectors onto the line of impact determine relative speeds and momentum transfer, facilitating the application of conservation laws. For two colliding objects with velocities u\mathbf{u} and v\mathbf{v}, projections of the velocities onto the line of impact (the contact normal direction) yield the components along the interaction axis, used to compute post-collision velocities in elastic or inelastic scenarios while the orthogonal component remains unchanged.[37] This decomposition, often via dot products, simplifies two-dimensional analyses by isolating the interaction direction, as in billiard ball collisions where mass ratios are inferred from projected speeds.[37] Engineering applications, such as beam stress analysis, rely on projecting loads onto principal axes to assess bending moments and shear forces. In structural design, an applied load vector is decomposed into axial and transverse components relative to the beam's orientation, with the parallel projection determining compressive or tensile stresses along the length.[38] For example, in cantilever beams under oblique forces, this projection isolates contributions to deflection and failure risk, guiding material selection and safety factors in civil and mechanical engineering.[38] A practical illustration appears in projectile motion, where the initial velocity v0\mathbf{v}_0 is projected onto the horizontal plane to find the range, while the vertical rejection determines maximum height. The horizontal component is v0x=v0cos[θ](/page/Theta)v_{0x} = v_0 \cos [\theta](/page/Theta), where θ\theta is the launch angle, yielding constant motion unaffected by gravity, whereas the vertical component v0y=v0sin[θ](/page/Theta)v_{0y} = v_0 \sin [\theta](/page/Theta) governs the parabolic trajectory under acceleration gg. These applications trace back to Newtonian mechanics in the 17th and 18th centuries, where force resolution via geometric projections underpinned the second law and equilibrium principles, though formal vector notation emerged later.[36] Isaac Newton's use of the parallelogram of forces in Philosophiæ Naturalis Principia Mathematica (1687) effectively employed projections to analyze composite motions, laying the groundwork for modern dynamics without explicit vector algebra.[39]

Geometry and computer graphics

In computer graphics, vector projection provides a geometric foundation for rendering realistic scenes by mapping three-dimensional positions onto two-dimensional surfaces or planes, enabling effects such as shadows and lighting that mimic real-world optics.[40] This process involves decomposing a vector, such as the direction from a light source to an object, into components parallel and perpendicular to a target surface normal, which determines visibility and illumination intensity.[41] By leveraging orthogonal projections, graphics algorithms efficiently compute how light interacts with geometry without simulating every photon path.[42] Shadow casting relies on vector projection to simulate how objects block light onto receiving planes, such as floors or walls, by projecting the occluder's vertices onto the plane using the light's direction vector.[43] This technique, introduced in early shadow mapping methods, involves rejecting the component of the object-to-light vector along the plane's normal to flatten the shadow silhouette accurately.[44] For planar shadows, the projection ensures that dynamic objects cast correct distortions based on light position, avoiding artifacts in real-time rendering. In lighting models, vector projection computes diffuse reflection by finding the scalar projection of the incident light vector onto the surface normal, which quantifies how directly light strikes the material.[45] The Lambertian diffuse term, a cornerstone of shading since its formulation in the 18th century and adapted to graphics, uses this dot product to scale illumination intensity, where the cosine of the angle between light and normal determines brightness.[46] This projection-based approach integrates seamlessly into vertex and fragment shaders, contributing to photorealistic surface appearance without full ray simulation.[41] Ray tracing employs vector projection to detect intersections by projecting ray directions onto surface parameters, particularly for planes or quadrics, where the parallel component yields the hit point along the ray.[47] In this recursive rendering paradigm, projecting secondary rays—such as reflections or refractions—onto tangent spaces at intersection points allows for accurate computation of light bounces and global illumination effects.[48] This method, formalized in Whitted's 1980 algorithm, ensures precise geometric queries in complex scenes.[49] Vector projection facilitates texture mapping by projecting 2D texture coordinates onto 3D model surfaces via perspective-correct interpolation, aligning image details with geometric distortions in camera views.[42] In projective texture mapping, the light or camera's view matrix projects environmental textures onto arbitrary surfaces, enhancing realism in applications like environment mapping.[50] For camera projections, it transforms world coordinates into screen space, using the view frustum to clip and perspective-divide vectors for correct depth cueing.[51] A simple 2D example illustrates shadow casting from a point light: consider a light at position $ \mathbf{L} $ casting the shadow of an occluder point $ \mathbf{P} $ onto a wall line defined by normal $ \mathbf{N} $ and point $ \mathbf{Q} $; the shadow position $ \mathbf{S} $ is found by computing the intersection of the ray from L\mathbf{L} through P\mathbf{P} with the wall line, producing a linear elongation based on distance.[52] For real-time performance on GPUs, vector projections are encoded as matrix multiplications, where a 4x4 projection matrix represents the linear transformation of vertex vectors in parallel across shader cores, enabling high-frame-rate rendering in modern pipelines.[40] This matrix form, optimized in hardware like NVIDIA's CUDA, processes thousands of projections per frame with minimal latency, as demonstrated in shadow volume and mapping implementations.[53] Plane projections serve as a special case here, simplifying computations for flat receivers.[54]

Statistics and machine learning

In statistics, orthogonal vector projection provides a geometric interpretation of linear regression, where the goal is to find the best linear approximation to the data by projecting the vector of observed responses onto the subspace spanned by the predictor variables, thereby minimizing the sum of squared errors through the least squares criterion.[55] This projection ensures that the residuals are orthogonal to the fitted subspace, a property that underpins the unbiasedness and efficiency of ordinary least squares estimators under standard assumptions.[56] A key tool in this framework is the hat matrix, defined as $ H = X (X^T X)^{-1} X^T $, where $ X $ is the design matrix; this matrix performs the orthogonal projection of the response vector $ y $ onto the column space of $ X $, yielding the vector of fitted values $ \hat{y} = H y $.[57] The diagonal elements of $ H $, known as leverage scores, quantify the influence of each observation on its own fitted value, with values between 0 and 1 indicating how much the prediction relies on that point.[58] Principal component analysis (PCA) extends this concept to unsupervised dimensionality reduction by identifying orthogonal directions, or principal components, that maximize the variance of the projected data points.[59] Formally, PCA computes the orthogonal projection of the centered data onto a lower-dimensional subspace spanned by the leading eigenvectors of the covariance matrix, prioritizing components that capture the most variance to enable data compression while retaining essential structure.[60] For example, consider a bivariate dataset in 2D space representing two correlated variables, such as height and weight measurements; projecting the points orthogonally onto the first principal axis (the line of maximum variance) reduces the data to 1D while quantifying the linear correlation through the proportion of total variance explained by that projection, often exceeding 80% for strongly correlated features.[61] In machine learning, vector projections facilitate feature engineering by linearly transforming input data into more suitable representations, such as projecting high-dimensional features into lower-dimensional embeddings that preserve semantic similarities for tasks like classification or clustering.[62] This is common in neural networks, where fully connected layers apply linear projections followed by nonlinear activations to evolve feature spaces across layers, enhancing model expressiveness without excessive parameter growth.[63] In the context of 2020s AI advancements, transformer architectures rely on linear projections to map input embeddings into query, key, and value vectors, enabling the scaled dot-product attention mechanism to compute weighted combinations of sequence elements based on their projected similarities.

Generalizations

Projection onto planes

The orthogonal projection of a vector v\vec{v} onto a plane in three-dimensional space is obtained by subtracting the projection of v\vec{v} onto the plane's normal vector n\vec{n} from v\vec{v} itself, yielding \proj\planev=v\projnv\proj_{\plane} \vec{v} = \vec{v} - \proj_{\vec{n}} \vec{v}.[64] Here, the vector projection onto the normal is \projnv=vnn2n\proj_{\vec{n}} \vec{v} = \frac{\vec{v} \cdot \vec{n}}{\|\vec{n}\|^2} \vec{n}, which isolates the component perpendicular to the plane.[64] For a unit normal vector n^\hat{n} (where n^=1\|\hat{n}\| = 1), this simplifies to \proj\planev=v(vn^)n^\proj_{\plane} \vec{v} = \vec{v} - (\vec{v} \cdot \hat{n}) \hat{n}, or in matrix form, \proj\planev=(In^n^T)v\proj_{\plane} \vec{v} = (I - \hat{n} \hat{n}^T) \vec{v}, where II is the identity matrix and n^n^T\hat{n} \hat{n}^T is the outer product.[64] Geometrically, this projection represents the "shadow" of v\vec{v} cast onto the plane by light rays perpendicular to the plane, ensuring the result lies within the plane and the vector from the projected point to the original is orthogonal to every vector in the plane.[65] For instance, consider projecting the vector v=(x,y,z)\vec{v} = (x, y, z) onto the xyxy-plane, which has normal n=(0,0,1)\vec{n} = (0, 0, 1). The result is \proj\planev=(x,y,0)\proj_{\plane} \vec{v} = (x, y, 0), discarding the zz-component.[64] Key properties include idempotence: applying the projection twice returns the same vector, as (In^n^T)2=In^n^T(I - \hat{n} \hat{n}^T)^2 = I - \hat{n} \hat{n}^T.[64] Additionally, the projected vector is orthogonal to the normal, satisfying n^\proj\planev=0\hat{n} \cdot \proj_{\plane} \vec{v} = 0, while the rejection v\proj\planev\vec{v} - \proj_{\plane} \vec{v} is parallel to n^\hat{n}.[64] In geometry, this projection determines the foot of the perpendicular from a point to the plane, enabling calculations of altitudes, such as the height from a vertex to the base plane in a 3D triangular pyramid. In terrain mapping, orthogonal projections of elevation vectors onto horizontal planes facilitate the creation of 2D contour maps from digital elevation models, preserving spatial relationships for visualization and analysis.

Projection onto subspaces

The orthogonal projection of a vector a\mathbf{a} onto a subspace S=\span{u1,,uk}S = \span\{\mathbf{u}_1, \dots, \mathbf{u}_k\} of an inner product space is the unique vector pS\mathbf{p} \in S that minimizes the Euclidean distance ap\|\mathbf{a} - \mathbf{p}\|, with the error ap\mathbf{a} - \mathbf{p} orthogonal to every vector in SS.[26] This p\mathbf{p} satisfies ap,v=0\langle \mathbf{a} - \mathbf{p}, \mathbf{v} \rangle = 0 for all vS\mathbf{v} \in S.[15] If {q1,,qk}\{\mathbf{q}_1, \dots, \mathbf{q}_k\} forms an orthonormal basis for SS, the projection is given by
p=\projSa=i=1ka,qiqi=QQTa, \mathbf{p} = \proj_S \mathbf{a} = \sum_{i=1}^k \langle \mathbf{a}, \mathbf{q}_i \rangle \mathbf{q}_i = Q Q^T \mathbf{a},
where QQ is the matrix with columns q1,,qk\mathbf{q}_1, \dots, \mathbf{q}_k.[15] To compute this from a general basis {u1,,uk}\{\mathbf{u}_1, \dots, \mathbf{u}_k\}, apply the Gram-Schmidt process to orthogonalize and normalize the basis vectors, yielding the orthonormal set {qi}\{\mathbf{q}_i\}.[66]
For a non-orthonormal basis, let AA be the matrix with columns u1,,uk\mathbf{u}_1, \dots, \mathbf{u}_k; then the projection is
p=A(ATA)1ATa, \mathbf{p} = A (A^T A)^{-1} A^T \mathbf{a},
assuming AA has full column rank so ATAA^T A is invertible.[29] This formula directly solves the normal equations AT(Ax^a)=0A^T (A \hat{\mathbf{x}} - \mathbf{a}) = \mathbf{0} for the coefficients x^\hat{\mathbf{x}} such that p=Ax^\mathbf{p} = A \hat{\mathbf{x}}.[29]
As an example in R3\mathbb{R}^3, consider the subspace SS spanned by u1=(110)\mathbf{u}_1 = \begin{pmatrix} 1 \\ 1 \\ 0 \end{pmatrix} and u2=(101)\mathbf{u}_2 = \begin{pmatrix} 1 \\ 0 \\ 1 \end{pmatrix}, and project a=(123)\mathbf{a} = \begin{pmatrix} 1 \\ 2 \\ 3 \end{pmatrix}. Form A=(111001)A = \begin{pmatrix} 1 & 1 \\ 1 & 0 \\ 0 & 1 \end{pmatrix}; then ATA=(2112)A^T A = \begin{pmatrix} 2 & 1 \\ 1 & 2 \end{pmatrix}, with inverse 13(2112)\frac{1}{3} \begin{pmatrix} 2 & -1 \\ -1 & 2 \end{pmatrix}. The projection is p=A(ATA)1ATa=(7/32/35/3)\mathbf{p} = A (A^T A)^{-1} A^T \mathbf{a} = \begin{pmatrix} 7/3 \\ 2/3 \\ 5/3 \end{pmatrix}. The projection operator PP defined by \projSa=Pa\proj_S \mathbf{a} = P \mathbf{a} is idempotent, satisfying P2=PP^2 = P, since projecting onto SS twice yields the same result in SS.[15] It is also self-adjoint, with PT=PP^T = P, ensuring the error is orthogonal to SS.[15] The dimension of the image of PP equals dimS=k\dim S = k.[15] This generalizes the line projection as the case k=1k=1.[26]

Projections in inner product spaces

In inner product spaces, the concept of orthogonal projection extends naturally beyond finite-dimensional Euclidean spaces to abstract settings, including infinite-dimensional Hilbert spaces. A Hilbert space HH is a complete inner product space equipped with an inner product ,\langle \cdot, \cdot \rangle. For a nonzero vector uHu \in H and any fHf \in H, the orthogonal projection of ff onto the span of uu is defined as
\projuf=(f,uu,u)u. \proj_u f = \left( \frac{\langle f, u \rangle}{\langle u, u \rangle} \right) u.
This formula minimizes the distance f\projuf\|f - \proj_u f\| in the norm induced by the inner product, ensuring orthogonality: f\projuf,u=0\langle f - \proj_u f, u \rangle = 0. The projection decomposes HH into the direct sum of the one-dimensional subspace spanned by uu and its orthogonal complement u={vHv,u=0}u^\perp = \{ v \in H \mid \langle v, u \rangle = 0 \}, so H=\span{u}uH = \span\{u\} \oplus u^\perp. Every element fHf \in H can thus be uniquely written as f=\projuf+(f\projuf)f = \proj_u f + (f - \proj_u f), where the second component lies in uu^\perp. This decomposition holds due to the completeness of Hilbert spaces, which guarantees the existence and uniqueness of such projections.[67] A concrete example arises in the Hilbert space L2[a,b]L^2[a, b] of square-integrable functions on an interval [a,b][a, b], with inner product f,g=abf(x)g(x)dx\langle f, g \rangle = \int_a^b f(x) g(x) \, dx. The orthogonal projection onto the subspace of constant functions (spanned by the constant function 1) is the mean value of the function: for fL2[a,b]f \in L^2[a, b],
\proj1f(x)=1baabf(t)dt, \proj_1 f(x) = \frac{1}{b - a} \int_a^b f(t) \, dt,
which is constant and represents the best approximation in the L2L^2 norm. This projection isolates the average behavior of ff, with the error orthogonal to all constants.[68] Key properties of these projections mirror those in Euclidean spaces but are established via the inner product. The projection operator Pu:H\span{u}P_u: H \to \span\{u\} defined by Puf=\projufP_u f = \proj_u f is linear, bounded (with Pu=1\|P_u\| = 1 if u=1\|u\| = 1), self-adjoint (Puf,g=f,Pug\langle P_u f, g \rangle = \langle f, P_u g \rangle), and idempotent (Pu2=PuP_u^2 = P_u), confirming its status as an orthogonal projection. Idempotence follows directly from the formula, as applying PuP_u twice yields the same scalar multiple of uu.[67] For broader applicability, projections extend to closed subspaces MHM \subset H using the Riesz representation theorem, which identifies bounded linear functionals on HH with inner products. For any closed subspace MM, there exists a unique orthogonal projection PM:HMP_M: H \to M such that H=MMH = M \oplus M^\perp and fPMf\|f - P_M f\| is minimized for each fHf \in H. This operator is again linear, bounded, self-adjoint, and idempotent, enabling projections in infinite-dimensional settings like function spaces.[69] In infinite-dimensional Hilbert spaces, these projections find critical applications in quantum computing, where state spaces are modeled as such structures and projections facilitate measurement and error correction operations. Recent analyses highlight their role in describing quantum system evolutions and algorithmic efficiencies.[70]

References

User Avatar
No comments yet.