Re: Row vs. Column Vectors (or Matrices)
- To: mathgroup at smc.vnet.net
- Subject: [mg33936] Re: Row vs. Column Vectors (or Matrices)
- From: adam.smith at hillsdale.edu (Adam Smith)
- Date: Tue, 23 Apr 2002 07:14:46 -0400 (EDT)
- References: <aa05ug$25i$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
See if the following is what you want In[1]:= vector1 = {a,b,c} Out[1]= {a,b,c} In[2]:= vector2 = {c,d,e} Out[2]= {c,d,e} In[3]:= Outer[Times,vector1,vector2] Out[3]= {{a*c, a*d, a*e}, {b*c, b*d, b*e}, {c^2, c*d, c*e}} In[4]:= MatrixForm[Outer[Times,vector1,vector2]] Note that MatrixForm is such a so-called wrapper that essentially just changes the way things display on the screen. It is not necessary to put the 2nd vector in a 1-column format due to the construction of the Outer[] function. John Resler <John-Resler at kscable.com> wrote in message news:<aa05ug$25i$1 at smc.vnet.net>... > Hi, > I'm new to Mathematica and am doing a little linear algebra. I am > aware of the MatrixForm[m] > function but I know of no way to create a row vector eg. [ 1.0 2.0 3.0 > ] * [ 1.0 > > 2.0 > > 3.0]. > > Can someone point me in the right direction? Thanks ahead of time. > > -John