On Dec 30, 1:50 pm, Rob Beezer <goo...@beezer.cotse.net> wrote:
> I'd like to improve the current state of the linear algebra code over
> CDF (and by extension, over RDF).  The purpose would be to make Sage
> more usable for teaching various topics involving matrices with
> complex entries and orthogonal vectors (thus introducing square
> roots).  You can actually do quite a bit of this over the rationals,
> where (to my surprise) the square roots get approximated by rationals,
> and the accumulated errors are quite small.  But it makes more sense
> to me to actually work over CDF and liberally employ the .zero_at()
> method when showing students how to interpret the results.
>
> In any event, the goal would be to work up to things like QR
> decompositions, unitary matrices, orthogonal projections, etc.  A lot
> of this is present, but not always documented well.  I have not done a
> comprehensive survey yet, but for example, everything about QR
> decomposition talks about (and doctests) real matrices, even though
> the calls to NumPy are doing the right thing with complex entries and
> returning Q as unitary (not just orthogonal).  But there needs to be
> some prerequiste gaps filled for students to study these objects, the
> algorithms, etc (such as there is not yet a function to take the
> conjugate of a vector).
>
> The inner product especially has me stumped.  The following does not
> seem to be what we want at all:
>
> sage: v = vector(CDF, [I, I])
> sage: v.inner_product(v)
> -2.0
>
> I'd like to have the "usual" version with a conjugate of one of the
> vectors prior to the dot product (the sesquilinear form).  I can't see
> that setting a custom inner product matrix can make this happen, but
> maybe I'm missing something.  Should the inner product be over-ridden
> for vector spaces over the complex numbers?  Or, I hate to ask, should
> there be something new, like .complex_inner_product(),
> or .sesquilinear_inner_product()?  (Just kidding about that last
> one.)  Or maybe this inner product is lurking somewhere and I'm not
> noticing it.

I'd call this one a Hermitian inner product.
Well, I do not see anything wrong with sesquilinear either (especially
if this is done consistently, i.e.
for any given field automorphism).

Dima


>
> I know Jason Grout has done a lot of work to integrate this with
> NumPy.  I'm trolling for anything else folks can send me that might
> help: advice, informative Trac tickets, potential pitfalls, secret
> desires.  Thanks!
>
> Rob

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to