help dot
dot Vector dot product.
C = dot(A,B) returns the scalar product of the vectors A and B.
A and B must be vectors of the same length. When A and B are both
column vectors, dot(A,B) is the same as A'*B.
dot(A,B), for N-D arrays A and B, returns the scalar product
along the first non-singleton dimension of A and B. A and B must
have the same size.
So what are A and B?
A = [1+i 1-i -1+i -1-i];
B = [3-4i 6-2i 1+2i 4+3i];
They are row vectors, complex row vectors. So MATLAB forms the result as:
dot(A,B)
ans =
1 - 5i
sum(conj(A).*B)
ans =
1 - 5i
That is, when A and B are both vectors, MATLAB treats them the same as if A and B were column vectors. It effectively thinks of them as both column vectors. Then it forms the result by conjugating A, takes an element-wise product, then sums those terms.