Mathematics visualization
If 0° ≤ θ ≤ 90°, as in this case, the scalar projection of a on b coincides with the length of the vector projection . Vector projection of a on b (a 1 ), and vector rejection of a from b (a 2 ). In mathematics , the scalar projection of a vector a {\displaystyle \mathbf {a} } on (or onto) a vector b , {\displaystyle \mathbf {b} ,} also known as the scalar resolute of a {\displaystyle \mathbf {a} } in the direction of b , {\displaystyle \mathbf {b} ,} is given by:
s = ‖ a ‖ cos θ = a ⋅ b ^ , {\displaystyle s=\left\|\mathbf {a} \right\|\cos \theta =\mathbf {a} \cdot \mathbf {\hat {b}} ,} where the operator ⋅ {\displaystyle \cdot } denotes a dot product , b ^ {\displaystyle {\hat {\mathbf {b} }}} is the unit vector in the direction of b , {\displaystyle \mathbf {b} ,} ‖ a ‖ {\displaystyle \left\|\mathbf {a} \right\|} is the length of a , {\displaystyle \mathbf {a} ,} and θ {\displaystyle \theta } is the angle between a {\displaystyle \mathbf {a} } and b {\displaystyle \mathbf {b} } .[ 1]
The term scalar component refers sometimes to scalar projection, as, in Cartesian coordinates , the components of a vector are the scalar projections in the directions of the coordinate axes .
The scalar projection is a scalar , equal to the length of the orthogonal projection of a {\displaystyle \mathbf {a} } on b {\displaystyle \mathbf {b} } , with a negative sign if the projection has an opposite direction with respect to b {\displaystyle \mathbf {b} } .
Multiplying the scalar projection of a {\displaystyle \mathbf {a} } on b {\displaystyle \mathbf {b} } by b ^ {\displaystyle \mathbf {\hat {b}} } converts it into the above-mentioned orthogonal projection, also called vector projection of a {\displaystyle \mathbf {a} } on b {\displaystyle \mathbf {b} } .
Definition based on angle θ [ edit ] If the angle θ {\displaystyle \theta } between a {\displaystyle \mathbf {a} } and b {\displaystyle \mathbf {b} } is known, the scalar projection of a {\displaystyle \mathbf {a} } on b {\displaystyle \mathbf {b} } can be computed using
s = ‖ a ‖ cos θ . {\displaystyle s=\left\|\mathbf {a} \right\|\cos \theta .} ( s = ‖ a 1 ‖ {\displaystyle s=\left\|\mathbf {a} _{1}\right\|} in the figure) The formula above can be inverted to obtain the angle , θ .
Definition in terms of a and b [ edit ] When θ {\displaystyle \theta } is not known, the cosine of θ {\displaystyle \theta } can be computed in terms of a {\displaystyle \mathbf {a} } and b , {\displaystyle \mathbf {b} ,} by the following property of the dot product a ⋅ b {\displaystyle \mathbf {a} \cdot \mathbf {b} } :
a ⋅ b ‖ a ‖ ‖ b ‖ = cos θ {\displaystyle {\frac {\mathbf {a} \cdot \mathbf {b} }{\left\|\mathbf {a} \right\|\left\|\mathbf {b} \right\|}}=\cos \theta } By this property, the definition of the scalar projection s {\displaystyle s} becomes:
s = ‖ a 1 ‖ = ‖ a ‖ cos θ = ‖ a ‖ a ⋅ b ‖ a ‖ ‖ b ‖ = a ⋅ b ‖ b ‖ {\displaystyle s=\left\|\mathbf {a} _{1}\right\|=\left\|\mathbf {a} \right\|\cos \theta =\left\|\mathbf {a} \right\|{\frac {\mathbf {a} \cdot \mathbf {b} }{\left\|\mathbf {a} \right\|\left\|\mathbf {b} \right\|}}={\frac {\mathbf {a} \cdot \mathbf {b} }{\left\|\mathbf {b} \right\|}}\,} The scalar projection has a negative sign if 90 ∘ < θ ≤ 180 ∘ {\displaystyle 90^{\circ }<\theta \leq 180^{\circ }} . It coincides with the length of the corresponding vector projection if the angle is smaller than 90°. More exactly, if the vector projection is denoted a 1 {\displaystyle \mathbf {a} _{1}} and its length ‖ a 1 ‖ {\displaystyle \left\|\mathbf {a} _{1}\right\|} :
s = ‖ a 1 ‖ {\displaystyle s=\left\|\mathbf {a} _{1}\right\|} if 0 ∘ ≤ θ ≤ 90 ∘ , {\displaystyle 0^{\circ }\leq \theta \leq 90^{\circ },} s = − ‖ a 1 ‖ {\displaystyle s=-\left\|\mathbf {a} _{1}\right\|} if 90 ∘ < θ ≤ 180 ∘ . {\displaystyle 90^{\circ }<\theta \leq 180^{\circ }.} ^ Strang, Gilbert (2016). Introduction to linear algebra (5th ed.). Wellesley: Cambridge press. ISBN 978-0-9802327-7-6 .