RE: matrix times a vector

*To*: mathgroup at smc.vnet.net*Subject*: [mg49022] RE: [mg49002] matrix times a vector*From*: "Wolf, Hartmut" <Hartmut.Wolf at t-systems.com>*Date*: Tue, 29 Jun 2004 04:49:50 -0400 (EDT)*Sender*: owner-wri-mathgroup at wolfram.com

>-----Original Message----- >From: David Salomon [mailto:david.salomon at csun.edu] To: mathgroup at smc.vnet.net >Sent: Monday, June 28, 2004 10:14 AM >To: mathgroup at smc.vnet.net >Subject: [mg49022] [mg49002] matrix times a vector > > >Question: > >The input {{a,b}, {c,d}}.{x,y} generates the output {a x+b y,c >x+d y}. > >How can I get the output x{a,b}+y{c,d} ? > >This is a special case of lists with two elements. How >can I extend this computation in an elegant way to lists >with N elements? > >with thanks, > > >|David Salomon >| [...] Move from Dot to Times: In[1]:= {{a, b}, {c, d}}.{x, y} Out[1]= {a x + b y, c x + d y} In[2]:= {{a, b}, {c, d}}{x, y} Out[2]= {{a x, b x}, {c y, d y}} -- Hartmut Wolf