Re: Help: Column/Row Vector
- To: mathgroup at smc.vnet.net
- Subject: [mg4274] Re: Help: Column/Row Vector
- From: ianc (Ian Collier)
- Date: Sat, 29 Jun 1996 03:52:32 -0400
- Organization: Wolfram Research, Inc.
- Sender: owner-wri-mathgroup at wolfram.com
In article <4q5k2d$bsb at dragonfly.wolfram.com>, khinast at nld.chee.uh.edu 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 . > I've studied the help page for hours, with no result. So could > someone please help me. My email address is: > > khinast at nld.chee.uh.edu > > > Joh. You need to represent them as two dimensional matrices. I believe the following will do what you want: In[8]:= x ={{x1},{x2}} Out[8]= {{x1}, {x2}} In[9]:= MatrixForm[ x] Out[9]//MatrixForm= x1 x2 In[10]:= y = {{y1,y2}} Out[10]= {{y1, y2}} In[11]:= MatrixForm[y] Out[11]//MatrixForm= y1 y2 In[12]:= x.y Out[12]= {{x1 y1, x1 y2}, {x2 y1, x2 y2}} I hope this helps. ----------------------------------------------------------- Ian Collier Wolfram Research, Inc. ----------------------------------------------------------- tel:(217)-398-0700 fax:(217)-398-0747 ianc at wolfram.com Wolfram Research Home Page: http://www.wolfram.com/ ----------------------------------------------------------- ==== [MESSAGE SEPARATOR] ====