Re: How to mutiply a 3x1 and 1x3 vector

• To: mathgroup at smc.vnet.net
• Subject: [mg3092] Re: How to mutiply a 3x1 and 1x3 vector
• From: wagner at bullwinkle.cs.Colorado.EDU (Dave Wagner)
• Date: Wed, 31 Jan 1996 03:04:03 -0500
• Organization: University of Colorado, Boulder
• Sender: owner-wri-mathgroup at wri.com

```In article <4ekes6\$6gj at dragonfly.wri.com>,
Stephen Nichols <snichols at onramp.net> wrote:
>
>Hi,
>
>I have another question that I thought would be simple to to in Mathematica.
>I have two vectors A={1,2,3} and B={3,4,5}.  How do I multiple them together
>to get a 3x3 matrix.  A . B gives me a scalar result.  Mma seems to always
>treat the first one as a row vector and the second as a column vector.  I
>need it to do the opposite.  Treat the first as a column vector and the second
>as a row vector.  Any ideas?

Express your column vector as a 3x1 matrix, and your row vector as
a 1x3 matrix:

In[1]:=
{{1},{2},{3}}.{{3,4,5}}
Out[1]=
{{3, 4, 5}, {6, 8, 10}, {9, 12, 15}}

Dave Wagner
Principia Consulting
(303) 786-8371
dbwagner at princon.com
http://www.princon.com/princon

==== [MESSAGE SEPARATOR] ====

```

• Prev by Date: Re: How to mutiply a 3x1 and 1x3 vector
• Next by Date: Re: How to mutiply a 3x1 and 1x3 vector
• Previous by thread: Re: How to mutiply a 3x1 and 1x3 vector
• Next by thread: Re: How to mutiply a 3x1 and 1x3 vector