MathGroup Archive 1996

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

Search the Archive

Re: Help: Column/Row Vector

  • To: mathgroup at
  • Subject: [mg4290] Re: Help: Column/Row Vector
  • From: Harald Berndt <haraldb at>
  • Date: Sat, 29 Jun 1996 03:55:22 -0400
  • Organization: University of California Forest Products Lab
  • Sender: owner-wri-mathgroup at

khinast at wrote:
> Hi,
> I have two vectors x=(x1,x2) and y = (y1,y1). How can I persuade Mathematica
> that e.g. x is a column vector and y is a row vector, which is kind of
> important for their multiplication .

No, not really. Not in Mathematica, anyway. You just need to make sure 
you use the right vector "product:" inner, outer, and (for lack of a 
better word) direct. The latter is just an element-by-element 

{x1, x2} {y1, y2}
{x1 y1, x2 y2}

The inner product is the usual scalar product or dot product of the 
two vectors, regardless of order/orientation:

{x1, x2}.{y1, y2}
x1 y1 + x2 y2
{y1, y2}.{x1, x2}
x1 y1 + x2 y2

The outer, or tensor, product is the dyad of the two vectors, and 
here, the order matters:

Outer[ Times, {x1, x2}, {y1, y2} ]
{{x1 y1, x1 y2}, {x2 y1, x2 y2}}
Outer[ Times, {y1, y2}, {x1, x2} ]
{{x1 y1, x2 y1}, {x1 y2, x2 y2}}

> I've studied the help page for hours, with no result. So could
> someone please help me. My email address is:
> khinast at
> Joh.

I hope that helps a bit.
Harald Berndt                          University of California
Research Specialist                  Forest Products Laboratory
Phone: 510-215-4224                            FAX:510-215-4299


  • Prev by Date: Re: Abs and variables
  • Next by Date: Re: MMA graphics as *.gif files
  • Previous by thread: Re: Help: Column/Row Vector
  • Next by thread: Wireframes