I don't understand the difference between the dot product of two vectors and the scalar projection of a vector onto another one.

To me it looks like they are both (geometrically) the length of the vector projection. I am wrong since their formulas are different, so can anyone explain why?

  • $\begingroup$ What do you mean by "the scalar projection"? Evidently, you don't use that phrase to mean the same thing as "the vector projection", so what do you mean by that term? $\endgroup$ Dec 12, 2014 at 5:16
  • 1
    $\begingroup$ @GerryMyerson: I apologize if this is not a universal term. In my grade 12 class, we defined the scalar projection as $\operatorname{comp}_{\vec{a}}\vec{b}:=\dfrac{\vec{a}\cdot \vec{b}}{||\vec{a}||}$ $\endgroup$ Dec 12, 2014 at 5:27
  • 1
    $\begingroup$ We also learned that the vector projection is $\operatorname{proj}_{\vec{a}}\vec{b}:=\operatorname{comp}_{\vec{a}}\vec{b}\cdot \dfrac{\vec{a}}{||\vec{a}||}$. That is, the vector projection is the scalar projection multiplied by a unit vector in the direction of $a$. $\endgroup$ Dec 12, 2014 at 5:30
  • $\begingroup$ Then the dot product doesn't give the length of the vector projection, since the former is $a\cdot b$ while the latter is $a\cdot b/\|a\|$. I don't see what there is to explain. $\endgroup$ Dec 12, 2014 at 5:34
  • 1
    $\begingroup$ Well, yes, the two formulas are identical if $\|a\|=1$. $\endgroup$ Dec 12, 2014 at 5:41

2 Answers 2



The component of a vector a that is in the same direction as of vector b (Hence projection is a vector) Length of the projection does not depend on the length(magnitude) of b. See the image below

enter image description here

Projection has two parts:

(i) The direction where you're projecting onto. That's the unit vector in direction of b, which is computed by dividing b by the length of b. That is $$\frac{b}{||b||}$$

(ii) The component of a in the direction of b. That is, the "shadow" or image of a when you project it onto b. This is computed by $$\frac{a⋅b}{||b||}$$ . because a⋅b=||a|| ||b|| cos(θ). Hence

||a||cos(θ)= $\frac{a⋅b}{||b||}$
and that gives you (as in the triangle figure), the length of a's projection on the direction of b

Putting it together, the projection of a onto b is a vector of length $$\frac{a⋅b}{||b||}$$

in the direction of $\frac{b}{||b||}$, i.e. $$\frac{a.b}{||b||} \frac{b}{||b||} $$

Dot Product

It's simply the projection of one vector onto the other multiplied by the magnitude of other vector. The dot product tells you what amount of one vector goes in the direction of another (Thus its a scalar ) and hence do not have any direction .

a.b= ||a|| ||b|| cos(θ). Alternatively if a=(x1,y1) and b=(x2,y2) (Position vectors) the dot product is x1.x2+y1.y2 .

  • 4
    $\begingroup$ This should be the accepted answer $\endgroup$ Feb 21, 2021 at 12:59

The output of a dot product is a real number. The output of a projection is a vector. If you look at the formulas, the scalar projection does not depend on the length of the vector you are projecting onto.

According to Wikipeda, the scalar projection does not depend on the length of the vector being projected on. If you double the length of the second vector in the dot product, the dot product doubles.

  • 1
    $\begingroup$ It seems to me from the wording of the question that OP is making some distinction between "scalar projection" and "vector projection", though I'm not sure what exactly the first one is supposed to be. $\endgroup$ Dec 12, 2014 at 5:17
  • 1
    $\begingroup$ @GerryMyerson: I found a Wikipedia page on scalar projection It is a vector in the direction of the second argument with the magnitude of the dot product between the first argument and the unit vector in the direction of the second argument. I have no clue why this would be of interest. $\endgroup$ Dec 12, 2014 at 5:21
  • $\begingroup$ Thanks. OP has just provided the definition his class is using, and it's a scalar, not a vector. $\endgroup$ Dec 12, 2014 at 5:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .