MathGroup Archive 2010

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

Search the Archive

Re: Row or column?


Sam,

Mathematica considers the first level of a list as rows, the second,
nested, levels are the columns etc. So, for display purposes {{a, b}}
would show as a row, but if you want to use it for matrix/vector
multiplication you only need {a,b}, as Mathematica does not
differentiate between row or column vectors.

Cheers -- Sjoerd

On Sep 26, 8:44 am, Sam Takoy <sam.ta... at yahoo.com> wrote:
> Hi,
>
> How come
>
> {a, b} // MatrixForm
> {{a}, { b}} // MatrixForm
>
> produce identical outputs: columns?
>
> I would think that the first "matrix" is 1x2 and the second is 2x1.
>
> Alternatively, how do I produce a 1x2 matrix?
>
> Many thanks in advance,
>
> Sam



  • Prev by Date: Mathematica calculates RSquared wrongly?
  • Next by Date: RootSearch issue
  • Previous by thread: Re: Row or column?
  • Next by thread: Re: Row or column?