Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Re: matrix times a vector

  • To: mathgroup at
  • Subject: [mg49058] Re: matrix times a vector
  • From: Paul Abbott <paul at>
  • Date: Tue, 29 Jun 2004 04:50:52 -0400 (EDT)
  • Organization: The University of Western Australia
  • References: <cbokn1$4bl$>
  • Sender: owner-wri-mathgroup at

In article <cbokn1$4bl$1 at>,
 David Salomon <david.salomon at> wrote:

> 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}  ? 

By direct multiplication (note that . has been deleted):

  {{a,b}, {c,d}} {x,y}
> 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?

This works with n elements:

  {{a, b, c}, {c, d, e}, {e, f, g}, {f, g, h}} {x, y, t, u}


Paul Abbott                                   Phone: +61 8 9380 2734
School of Physics, M013                         Fax: +61 8 9380 1014
The University of Western Australia      (CRICOS Provider No 00126G)         
35 Stirling Highway
Crawley WA 6009                      mailto:paul at 

  • Prev by Date: Appropriate codec for playing Mathematica generated .wav files
  • Next by Date: Re: Pattern Matching
  • Previous by thread: RE: matrix times a vector
  • Next by thread: Re: matrix times a vector