Re: Multiplication of matrices
- To: mathgroup at smc.vnet.net
- Subject: [mg102162] Re: [mg102138] Multiplication of matrices
- From: "Elton Kurt TeKolste" <tekolste at fastmail.us>
- Date: Fri, 31 Jul 2009 05:54:34 -0400 (EDT)
- References: <200907300934.FAA21751@smc.vnet.net>
Qing
I cannot reproduce your problem.
In[67]:= X = Table[Random[], {i, 1, 2}, {j, 1, 2}]
Out[67]= {{0.396285, 0.24559}, {0.536648, 0.487664}}
In[68]:= x = Inverse[X]
Out[68]= {{7.93479, -3.996}, {-8.73182, 6.44798}}
In[69]:= Y = Table[Random[], {i, 1, 2}, {j, 1, 2}]
Out[69]= {{0.775017, 0.185159}, {0.816709, 0.544945}}
In[71]:= y = Inverse[Y]
Out[71]= {{2.00997, -0.68294}, {-3.01235, 2.85857}}
In[72]:= 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]]
Out[72]= 23586.1
Kurt
On Thu, 30 Jul 2009 05:34 -0400, "Qing" <Qing.Zhang.7 at uni.massey.ac.nz>
wrote:
> 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
>
>
>
>
- References:
- Multiplication of matrices
- From: "Qing" <Qing.Zhang.7@uni.massey.ac.nz>
- Multiplication of matrices