Multiplication of matrices

• To: mathgroup at smc.vnet.net
• Subject: [mg102138] Multiplication of matrices
• From: "Qing" <Qing.Zhang.7 at uni.massey.ac.nz>
• Date: Thu, 30 Jul 2009 05:34:05 -0400 (EDT)

```Hi:

I have two 2x2 matrices , X and Y (x, y are the inverses resp.). I need to evaluate the following expression:

Simplify[Tr[
X.Y.x.Y.x.y.X.y.X.y.x.Y.x.Y.X.y.X.y.X.Y.x.Y.x.Y.X.y.X.y.x.Y.x.Y.x.y.X.y.X.\
y.x.Y.x.Y.X.y.X.y.X.Y.x.Y.x.y.X.y.X.y.x.Y.x.Y.x.y.X.y.X.Y.x.Y.x.Y.X.y.X.y]]

but for some reason, mathematica can't do it and I need to break it into the following form:

Clear[U1, U2, U3, U3, U4, U]
U1 = Simplify[X.Y.x.Y.x.y.X.y.X.y.x.Y.x.Y.X.y.X];
U2 = Simplify[y.X.Y.x.Y.x.Y.X.y.X.y.x.Y.x.Y.x.y.X.y];
U3 = Simplify[X.y.x.Y.x.Y.X.y.X.y.X.Y.x.Y.x.y.X.y.X.y.x];
U4 = Simplify[Y.x.Y.x.y.X.y.X.Y.x.Y.x.Y.X.y.X.y];
U = Simplify[U1.U2.U3.U4];
Simplify[Tr[U]]

I have hundreds of such expression to evaluate, it is time-consuming if I break every expression by hand. Is there anyone who knows how to write a function to do this sort of task?

Hopefully you understand my question.

Thanks a lot.

Qing

```

• Prev by Date: Re: Re: How can I "perturbate" a NDSolve
• Next by Date: More fun and games
• Previous by thread: Trouble controlling Rasterize -- it introduces unwanted borders
• Next by thread: Re: Multiplication of matrices