[sage-devel] Re: inner product of complex vectors

2012-09-12 Thread John H Palmieri
On Wednesday, September 12, 2012 6:30:12 PM UTC-7, jason wrote: > > On 9/12/12 7:47 PM, Rob Beezer wrote: > > > > > > On Wednesday, September 12, 2012 10:04:54 AM UTC-7, jason wrote: > > > > I'm curious: is there a good reason why the product of two complex > > vectors does not conj

[sage-devel] Re: inner product of complex vectors

2012-09-12 Thread Jason Grout
On 9/12/12 7:47 PM, Rob Beezer wrote: On Wednesday, September 12, 2012 10:04:54 AM UTC-7, jason wrote: I'm curious: is there a good reason why the product of two complex vectors does not conjugate the first vector (which would yield the standard inner product for complex vectors).

[sage-devel] Re: inner product of complex vectors

2012-09-12 Thread Rob Beezer
On Wednesday, September 12, 2012 10:04:54 AM UTC-7, jason wrote: > > I'm curious: is there a good reason why the product of two complex > vectors does not conjugate the first vector (which would yield the > standard inner product for complex vectors). > > I think because I lost the argument th

[sage-devel] Re: inner product of complex vectors

2012-09-12 Thread Jason Grout
On 9/12/12 5:09 PM, Benjamin Jones wrote: On Wed, Sep 12, 2012 at 2:04 PM, Jason Grout wrote: Fair enough. That's convincing to me. I wish there was a nice notation in Sage for v.inner_product(w) that wasn't so cumbersome and wordy, then! Thanks, Jason I have wished for the same thing

[sage-devel] Re: inner product of complex vectors

2012-09-12 Thread Jason Grout
On 9/12/12 12:23 PM, William Stein wrote: There is a completely different method called "inner_product": sage: v.inner_product(v) Then maybe this is a bug? sage: v=vector(CDF,[2+I,5]) sage: v.inner_product(v) 28.0 + 4.0*I sage: v.column().H*v.column() [30.0] Thanks, Jason -- You recei

Re: [sage-devel] Re: inner product of complex vectors

2012-09-12 Thread Benjamin Jones
On Wed, Sep 12, 2012 at 2:04 PM, Jason Grout wrote: > > Fair enough. That's convincing to me. I wish there was a nice notation in > Sage for v.inner_product(w) that wasn't so cumbersome and wordy, then! > > > Thanks, > > Jason > I have wished for the same thing on occasion. One idea would be to

[sage-devel] Re: inner product of complex vectors

2012-09-12 Thread Jason Grout
On 9/12/12 12:23 PM, William Stein wrote: To me (who prob. implemented this) the asterisk in v*v means "dot product". If you look at the code, you'll see it starts: if have_same_parent(left, right): return (left)._dot_product_(right) There is a completely different method called "inner

Re: [sage-devel] Re: inner product of complex vectors

2012-09-12 Thread William Stein
On Wed, Sep 12, 2012 at 10:18 AM, Jason Grout wrote: > On 9/12/12 12:11 PM, Dima Pasechnik wrote: >> >> >> >> On Thursday, 13 September 2012 01:04:54 UTC+8, jason wrote: >> >> I'm curious: is there a good reason why the product of two complex >> vectors does not conjugate the first vector

[sage-devel] Re: inner product of complex vectors

2012-09-12 Thread kcrisman
On Wednesday, September 12, 2012 1:18:32 PM UTC-4, jason wrote: > > On 9/12/12 12:11 PM, Dima Pasechnik wrote: > > > > > > On Thursday, 13 September 2012 01:04:54 UTC+8, jason wrote: > > > > I'm curious: is there a good reason why the product of two complex > > vectors does not conj

[sage-devel] Re: inner product of complex vectors

2012-09-12 Thread Volker Braun
I prefer this: Hermitian: \bar{v} * w Bilinear: v * w over Hermitian: v * w Bilinear: ??? though tastes are different ;-) On Wednesday, September 12, 2012 6:18:32 PM UTC+1, jason wrote: > > On 9/12/12 12:11 PM, Dima Pasechnik wrote: > > > > > > On Thursday, 13 September 2012 01:0

[sage-devel] Re: inner product of complex vectors

2012-09-12 Thread Jason Grout
On 9/12/12 12:11 PM, Dima Pasechnik wrote: On Thursday, 13 September 2012 01:04:54 UTC+8, jason wrote: I'm curious: is there a good reason why the product of two complex vectors does not conjugate the first vector (which would yield the standard inner product for complex vectors).

[sage-devel] Re: inner product of complex vectors

2012-09-12 Thread Dima Pasechnik
On Thursday, 13 September 2012 01:04:54 UTC+8, jason wrote: > > I'm curious: is there a good reason why the product of two complex > vectors does not conjugate the first vector (which would yield the > standard inner product for complex vectors). > > Note: > > sage: v=vector(CDF,[2+I,5]) > s

[sage-devel] Re: inner product of complex vectors

2012-09-12 Thread Jason Grout
On 9/12/12 12:04 PM, Jason Grout wrote: I'm curious: is there a good reason why the product of two complex vectors does not conjugate the first vector (which would yield the standard inner product for complex vectors). Note: sage: v=vector(CDF,[2+I,5]) sage: v (2.0 + 1.0*I, 5.0) sage: v*v 28.0

[sage-devel] Re: inner product of complex vectors

2008-01-10 Thread John Cremona
That all sounds very sensible to me. Why don't you make a trac with most of your previous email in it? I'll be busy with other matters but am happy to have more ideas bounced off me. John On 10/01/2008, David Kohel <[EMAIL PROTECTED]> wrote: > > Dear John (et > al.), > > I think the inner produ

[sage-devel] Re: inner product of complex vectors

2008-01-10 Thread David Kohel
Dear John (et al.), I think the inner product should be the same irrespective of the field. The inner product as dot product is relevant to the study of quadratic forms, conics, and orthogonal groups. For instance finding a rational point on the conic x^2 + y^2 + z^2 = 0 over CC is equivalent t

[sage-devel] Re: inner product of complex vectors

2008-01-10 Thread Fabio Tonti
I don't have an answer to Brandon's remark, but John, should this be in Trac? On Jan 6, 2008 8:59 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I realize this is a bit naive (and not completely related to the OP) > but as it currently stands the CC used in sage is essentially a > subfiel

[sage-devel] Re: inner product of complex vectors

2008-01-06 Thread [EMAIL PROTECTED]
I realize this is a bit naive (and not completely related to the OP) but as it currently stands the CC used in sage is essentially a subfield of QQ(i). It may be better to implement RR and CC using exact precision (though admittedly this will come at a cost in performance) and allow the real fiel

[sage-devel] Re: inner product of complex vectors

2008-01-06 Thread John Cremona
You are right about the correct inner product definition for complex vectors. In your first example Sage seems not to be doing any conjugation. RR is real numbers (to some precision) while QQ is rational numbers (which are exact). If you want complex numbers with real and imaginary parts in QQ