Suppose we want to compute . Let and .
So . In expanding , how do we get ? Because by linearity this is equaled to . But shouldn't is be ? Because then we eventually get:
.
I'll have to make a few assumptions in order to answer this question.
1. I assume that the vectors are supposed to form an orthonormal basis for the Hilbert space.
2. I assume that you are using the physicists' convention that the inner product is linear in the second variable and conjugate-linear in the first variable (mathematicians always use the opposite convention: linear on the left and conjugate-linear on the right).
Under those assumptions,