## Dot and Cross products for Complex Numbers

### Dot and Cross products for Complex Numbers

Anyone can point me to good documentation using the "Dot" (.) and "Cross"
(x) products with complex numbers? Using

?Dot

and

?Cross

is extremely limited in content and examples.

Thanks
Herman

Hi,

I am trying to find the angle between two vectors. This
is going to be between -pi and pi and positive for counterclockwise
angles.
Using dot product I seem to get the correct results but I can't
interpret
the result for the cross product. Can someone help?
I attach a snippet and some explanation below.
--------------------------------------------------------------------
v1 = [0.0023 -0.0439];
v2 = [1 0];
v1_3D = [v1 0];
v2_3D = [v2 0];

CP = cross(v2_3D, v1_3D); % order matters: rotate v2 to v1

sign = 1;
if CP(3) < 0 % clockwise acute angle
sign = -1;
end

angleDot = sign*acos( dot(v1,v2)/(norm(v1)*norm(v2)) )
angleCross = sign*acos( norm(CP)/(norm(v1_3D)*norm(v2_3D)) )

--------------------------------------------------------------------

Now: acos(dot(v1,v2)/(norm(v1)*norm(v2))) -> 1.5185 which seems to be
the correct angle (without the sign)

However,
acos( norm(CP)/(norm(v1_3D)*norm(v2_3D)) ) -> 0.0523, that appear to
be
pi/2 - 1.5185.

Does anyone know why this happens? I expected them to give the same
result.

thanks
michalis