MathGroup Archive 2009

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

Search the Archive

Re: Multiplication of matrices

  • To: mathgroup at smc.vnet.net
  • Subject: [mg102292] Re: Multiplication of matrices
  • From: O <kakabomba at gmail.com>
  • Date: Tue, 4 Aug 2009 04:28:44 -0400 (EDT)
  • References: <200907300934.FAA21751@smc.vnet.net> <h4uf0h$irr$1@smc.vnet.net>

On Jul 31, 2:54 am, "Elton Kurt TeKolste" <tekol... at fastmail.us>
wrote:
> 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.Zhan... 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 int=
o
> > 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

i think you are not simplifying expression. you calculate expression
and after that simplifying NUMBER.


  • Prev by Date: Re: Creating a Random Function to Select an Irrational
  • Next by Date: Re: Making a LOOP (DO)
  • Previous by thread: Re: Multiplication of matrices
  • Next by thread: Re: Re: Finding the Position of Elements in a