Dear Alex,

On Mar 9, 12:21 pm, alex <[email protected]> wrote:
> . do not work.
> I have tried
> A.AI
> A . AI

This does not work because A and AI live in Sage, and in Sage the dot
does not mean multiplication.

A.AI means "look for an attribute named AI of the object A". Since A
has no attribute of that name, I thought you'd get an attribute error.
I am very surprised by the following:
  sage: A.AI
  AI

Can anyone explain this?

> maxima("A.AI")

This does not work, because A and AI live in Sage, not in Maxima.
There are underlying Maxima objects for A and AI, though. They have a
name that is automatically chosen; in my session, it is
  sage: A.name()
  'sage0'
  sage: AI.name()
  'sage1'

The Maxima objects corresponding to A and AI are obtainable under
these names:
  sage: print maxima.eval('sage0')
  matrix([a,b],[c,d])

Hence, for multiplying A and AI using Maxima's dot operator, you could
do:
  sage: M = maxima(A.name()+'.'+AI.name())
  sage: M
  matrix([a*d/(a*d-b*c)-b*c/(a*d-b*c),0],[0,a*d/(a*d-b*c)-b*c/(a*d-
b*c)])

This is the correct result, since a*d/(a*d-b*c)-b*c/(a*d-b*c)
simplifies to 1.

What I wrote above is based on how Sage interfaces work in general.
Since I don't know about Maxima, I can not tell you how to ask Maxima
to simplify the coefficients of M.

Cheers,
     Simon

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to