# Complex Inner Product and Orthogonalization

Orthogonalize[{E^x, E^(w^1*x), E^(w^2*x), E^(w^3*x)},
Integrate[#1 *Conjugate[#2], {x, -Pi, Pi}] &]


I am trying to orthogonalize the first 4 expression using my own custom inner product which is the integral of F(x)[G(x)]* from -pi to pi. I want the second argument of the product (G(x)) to be the complex conjugate but I cannot figure out how to do that. Any tips?

• At a minimum try E^x instead of e^x. Feb 3 '19 at 2:47
• Thanks for the heads up. I changed it but it still seems to error out due to the integration. Feb 3 '19 at 2:58
• Next step. What is the value of w? Is it a complex number? Also, what is the error message? Feb 3 '19 at 8:27
• I changed some things and it is no longer erroring but instead giving me a long answer. Should Mathematica be displaying Conjugate[i] instead of -i? Feb 3 '19 at 17:40
• Try replacing i with I if you want $\sqrt{-1}$. Feb 3 '19 at 17:42

I think the inner-product function needs to be linear in the second argument, meaning you need to reverse the order of the parameters in your inner-product function. If you set w=a+I*b and reverse your inner-product function:

F = Integrate[ComplexExpand[Conjugate[#1]]*#2, {x, -Pi, Pi}] &


then this simplified example works:

S = Orthogonalize[{E^x, E^(w^1*x)}, F]


Test:

F[S[[1]], S[[1]]]
(* 1 *)
F[S[[1]], S[[2]]]
(* 0 *)


With your four terms it should work too, but will take a long time.

Keep in mind that the manual on Orthogonalize says that "The $$e_i$$ can be any expressions for which $$f$$ always yields real results." Your example does not satisfy this condition (some of the overlap integrals are complex-valued); what I wrote above about linearity in the second argument may or may not work properly.

• There is an example u = Orthogonalize[RandomComplex[1 + I, {4, 4}]] in the help. Feb 3 '19 at 18:49
• Look in en.wikipedia.org/wiki/Inner_product_space concerning linearity in the second argument. This property is not required. Feb 3 '19 at 18:56
• Seem to work, thanks! Feb 3 '19 at 19:03
• @user64494 you're correct about the mathematical definitions (wiki link); however this is not how it's implemented in Mathematica. When I define F = Integrate[#1*ComplexExpand[Conjugate[#2]], {x, -Pi, Pi}] & to make the inner-product function linear in the first argument, as initially proposed, then the result is incorrect in the sense that F[S[[1]], S[[2]]] does not give zero. Feb 3 '19 at 19:36
• Upgrade your math. BTW, Maple produces answer to the original question with $w=(-1)^{\frac 1 4}$ in approximately 400 seconds. Feb 3 '19 at 19:47