MathGroup Archive 1999

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

Search the Archive

Re: col-vector * row-vector = matrix, how ?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg18488] Re: col-vector * row-vector = matrix, how ?
  • From: Harald Giese <giese at dkrz.de>
  • Date: Wed, 7 Jul 1999 23:08:45 -0400
  • Organization: Institut fuer Meereskunde, Universitaet Hamburg
  • References: <7lumbd$leb@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Malte Lance wrote:
> 
> Need to know how to accomplish the following in Mathematica-3.0:
> 
> v1 := transpose(<a,b,c>)   /* column-vector */
> 
> v2 := <x,y,z>              /* row-vector */
> 
> ( ax ay az )
> ( bx by bz ) = v1 * v2 =: m /* 3x3-matrix */
> ( cx cy cz )
> 
> Does anyone know how to do this in Mathematica ?
> 



Hi Malte,

Here it comes:

v1 = {a, b, c}
v2 = {x, y, z}

v1v2 = Outer[Times, v1, v2]

Output for v1v2:
{{a x, a y, a z}, {b x, b y, b z}, {c x, c y, c z}}

Regards,
Harald

-- 
Harald Giese
Email: giese at dkrz.de
> NEUE TELEFON-NUMMER | NEW PHONE-NUMBER <
Phone: +49 (0)40 42838 5796; Fax: +49 (0)40 5605724
Institut fuer Meereskunde der Universitaet Hamburg
(Institute of Oceanography of the University of Hamburg)
Troplowitzstrasse 7, D-22529 Hamburg


  • Prev by Date: Re: Q: ReplaceAll with pattern in pattern
  • Next by Date: Re: col-vector * row-vector = matrix, how ?
  • Previous by thread: Re: col-vector * row-vector = matrix, how ?
  • Next by thread: Re: col-vector * row-vector = matrix, how ?