Dot product not equal to cosine angle?

Recently I am having the online courses “Essential Mathematics for Computational Design” on https://www.rhino3d.education/ from Rajaa Issa. The course is great for me as I barely remember anything from high school mathematics…

Now I just get stuck on the lesson “vector dot product operation” (lesson4 of chapter2)
according to what I understand from the lesson, the dot product of two vectors should be always equal to the cosine of the vectors’ angle.


(screenshot of the example in the lesson)

However, when I operated in the grasshopper, the result turns out differently.
Is there anything I did wrongly? Or did I not understand the concept? or is it a bug?
Bildschirmfoto 2021-02-16 um 23.05.17

Post your file please? P.S. Too late…

P.P.S. Per @davidcockey’s reply (below):

Not exactly. The dot product of two vectors equals the cosine of the angle between the vectors multiplied by the magnitudes of the vectors.

If both vectors are unit vectors (magnitude = 1) then the dot product of two unit vectors equals the cosine fo the angle between the vectors.

1 Like

Hi @aliang.xxj,

Review the attached and let us know if you have any questions.

test_vector_angle.gh (4.5 KB)

– Dale

Because they set unitize to True

1 Like

Hi David,

Thank you very much!
I finally get clear with it!!.

Thank you!