MathGroup Archive 2002

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

Search the Archive

Re: Row vs. Column Vectors (or Matrices)


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


  • Prev by Date: Re: Why No Solution Using Solve?
  • Next by Date: Re: Explicit Conjugate: a feature or a bug?
  • Previous by thread: Re: Row vs. Column Vectors (or Matrices)
  • Next by thread: RE: Row vs. Column Vectors (or Matrices)