       Re: Multiplying a vector over multiple vectors

• To: mathgroup at smc.vnet.net
• Subject: [mg91179] Re: [mg91150] Multiplying a vector over multiple vectors
• From: Murray Eisenberg <murray at math.umass.edu>
• Date: Fri, 8 Aug 2008 07:16:23 -0400 (EDT)
• Organization: Mathematics & Statistics, Univ. of Mass./Amherst
• References: <200808070842.EAA02140@smc.vnet.net>

```   First /@ Outer[Times, {{1, 2}, {3, 4}, {5, 6}}, {{a, b}}, 1]
{{a,2 b},{3 a,4 b},{5 a,6 b}}

Donald DuBois wrote:
> How does one get a vector to distribute over
> a list of vectors  under multiplication?
>
> For example:
>
>  {{1,2}, {3,4}, {5,6}} times {a,b} should
> equal  (under this operation)
>
> {{a, 2b}, {3a, 4b}, {5a, 6b}}
>
> If {a,b} is duplicated three times one can
>
> MapThread[Times, {{{1, 2}, {3, 4}, {5, 6}}, {{a, b}, {a, b}, {a, b}}}]
>
> but duplicating {a,b} using Table is very slow
> when the vectors are large (consisting of thousands
> of elemets).
>
>
> Don
>

--
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305

```

• Prev by Date: Re: simple pattern match question
• Next by Date: Re: No preferences for OSX
• Previous by thread: Re: Multiplying a vector over multiple vectors
• Next by thread: Re: Multiplying a vector over multiple vectors