# How to calculate complex dot products

1. Apr 16, 2012

### BOYLANATOR

let y1=(1,0,i,0) and y2=(0,i,1,0)

what is (y1.y2)/(y1.y1)?

I make it i/(1+i2) = i/0 which seems incorrect.

My notes seem to give the answer as -i/2 and I don't understand how this was calculated.

Any help is appreciated. Thanks

2. Apr 16, 2012

### rustynail

hmm.. I get (i/0) as well.

(1*0 + 0*i + i*1 + 0²) / (1² + 0² + i² + 0² ) =

(0 + 0 + i + 0 ) / (1 + 0 -1 +0) =

(y1*y2)/(y1²)= i/0

Does anyone get a different answer?

3. Apr 16, 2012

### BOYLANATOR

I suspect the answer is to do with the fact that

<z1,z2>=<(z2)*,z1> where (z2)* is the Hermitian conjugate of z2, but even if this is the case i'm not sure how to carry out the calculation.

4. Apr 16, 2012

### sachav

It seems to work with y1 = (i,0,i,0), you probably didn't copy it correctly.

5. Apr 16, 2012

### DonAntonio

The usual (euclidean) complex dot product in $\mathbb C^n$ is defined as the sum of the

products of the first vector's coordinates times the conjugate of second vector's coordinates.

In your case, $y_1\cdot y_1 = 1\cdot 1 + 0 + i\cdot (-i) +0=2$ , and this is what must appear in the denominator.

DonAntonio

6. Apr 16, 2012

### BOYLANATOR

Thank you DonAntonio
I must have missed this definition. When you apply it to the numerator as well, you get the correct answer -i.
Thanks

7. Apr 16, 2012

### DonAntonio

No. It is either $y_1\cdot y_2 = i\,\,or\,\,y_2\cdot y_1=-i$. Check this.

DonAntonio

8. Apr 16, 2012

### BOYLANATOR

Yes it was y[2].y[1] = -i . From the Gram-Schmidt Process although I changed the notation slightly.
Thanks