MathGroup Archive 2009

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

Search the Archive

Re: symbolic matrix manipulation


Hi,

Unprotect[Dot]
Dot[\[DoubleStruckOne], a_] := a
Dot[0, a_] := 0
Dot[a, b] := \[DoubleStruckOne] + b.a
Dot[q_Plus, r_] := Dot[#, r] & /@ q
Dot[q_, r_Plus] := Dot[q, #] & /@ r
Protect[Dot]

and

a.b.b.a

gives

2 b.a + b.b.a.a

Regards
   Jens


ashwin.tulapurkar at gmail.com wrote:
> 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: a simple question about EulerEquations
  • Next by Date: HDF5 broken in v7?
  • Previous by thread: Re: symbolic matrix manipulation
  • Next by thread: Re: symbolic matrix manipulation