Help with Dot Product

When using the :Dot command its finding the Orange side in the picture right? meaning the projection of A unto B which is 16 of B?

On google it says to multiply the Orange Side with the Green Side, it gives me a huge number/length of 607, showned below by the dark blue side/length in the picture.

How can I use this length for it to tell how two Vectors compare to each other?

1 Like

Wikipedia has a decent article on it. The dot product or scalar product comes from multi-variable calculus, and is related to the Law of Cosines. The way that you are doing it is incorrect. The dot product works on vectors only such that

{\displaystyle \mathbf {\color {red}a} \cdot \mathbf {\color {blue}b} =\sum {i=1}^{n}{\color {red}a}{i}{\color {blue}b}{i}={\color {red}a}{1}{\color {blue}b}{1}+{\color {red}a}{2}{\color {blue}b}{2}+\cdots +{\color {red}a}{n}{\color {blue}b}_{n}}

where the vector is <a1, b1>, <a2, b2>, etc… So consider two vectors <2, 4> and <5, 7>. Using the above formula, we end up with

2x4 + 5x7 = 8 + 35 = 43

So the scalar product of the two vectors is 43.

The other product (cross product, vector product) returns a vector that is orthogonal to the two given vectors. It’s useful for projecting into 3D space from a surface.

1 Like

I used this formula(Geometric) for my Dot Product:
I seen many others use it with 3D vectors
formula

1 Like

What do you need the dot product for? If you gave more context it would be easier to help.

1 Like

To see if they are pointing in the same direction, I wanted to try it without using both of their lookVector.
What else can I use the dot product for?

1 Like

is this a correct analogy for how the DotProduct Result works?:

  1. |B|(Green Side) in the picture is positive.

  2. if the Projection(Yellow Side) were to be negative, then it would be facing the opposite direction/side of |B|(Green Side)

  3. Since a positive times a negative equals a negative?

1 Like

Try calling .Unit on both vectors before calling the dot product.

A.Unit:Dot(B.Unit) (or, equivalently, A:Dot(B) / (A.Magnitude * B.Magnitude) )

That will give you a number from -1 to 1, where -1 means “pointing in opposite directions” and 1 means “pointing in the same direction”

1 Like