MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: symbolic matrix manipulation

  • To: mathgroup at
  • Subject: [mg96196] Re: symbolic matrix manipulation
  • From: "Steve Luttrell" <steve at>
  • Date: Mon, 9 Feb 2009 05:33:26 -0500 (EST)
  • References: <gm99t7$70$>

For this sort of operator manipulation it is best to avoid using any of the 
Mathematica's prior knowledge of matrix/vector manipulations, and to instead 
define all your own functions. So, if you write an operator product in the 
form opprod[op1,op2,...], then you can reorder a-operators to the right of 
b-operators by defining the following rule:

opprod[u___, a, b, v___] := opprod[u, b, a, v] + opprod[u, v];

As required, this simplifies

opprod[a, b, b, a]


2 opprod[b, a] + opprod[b, b, a, a]

Here is another example:


4 opprod[b,a]+14 opprod[b,b,a,a]+8 

You can do lots more using this opprod[] approach. For instance, assuming 
that your a- and b-operators are corresponding annihilation and creation 
operators, then you could define


("vacuum" means "ground state", which is annihilated by the a-operator)


opprod[a, a, b, b]


2 + 4 opprod[b, a] + opprod[b, b, a, a]


opprod[a, a, b, b, vacuum]


2 opprod[vacuum]

Stephen Luttrell
West Malvern, UK

<ashwin.tulapurkar at> wrote in message 
news:gm99t7$70$1 at
> Hi,
> I am trying to simplify the following matrix expression:
> a.b.b.a with the rule: replace a.b by (b.a+1). So I expect the final
> output to be
> a.b.b.a --> (b.a+1).b.a --> b.a.b.a+b.a --> b.(b.a+1).a+b.a -->
> b.b.a.a + 2 b.a
> Can you tell me how to do this?
> Thanks.
> -Ashwin

  • Prev by Date: Re: How to simplify?
  • Next by Date: Re: FindFit & NIntegrate
  • Previous by thread: Re: symbolic matrix manipulation
  • Next by thread: Wolfram Workbench - how to open a project?