Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2007

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

Search the Archive

Re: Vector transpose!

  • To: mathgroup at
  • Subject: [mg84474] Re: Vector transpose!
  • From: Bill Rowe <readnewsciv at>
  • Date: Wed, 26 Dec 2007 05:13:51 -0500 (EST)

On 12/25/07 at 6:29 AM, markmgg at (mark) wrote:

>How to take the transpose of a column vector. In other words, I have
>a vector of 4 elements ( r={a,b,c,cd} ) and a 4x4 matrix M. I need
>to do apply this operation: Transpose[r].M.r

Here are a couple of ways after creating some data:

m = Table[RandomReal[], {4}, {4}];
r = RandomReal[1, 4];

In[15]:= {r}.m.r

Out[15]= {3.99232}


In[16]:= g = List /@ r;

Out[17]= {{3.99232}}

Note, while the computed value is the same for both, these are
not truly equivalent as the first outputs a 1 element long
vector and the second outputs a 1x1 matrix
To reply via email subtract one hundred and four

  • Prev by Date: Re: Vector transpose!
  • Next by Date: Re: Vector transpose!
  • Previous by thread: Re: Vector transpose!
  • Next by thread: Re: Vector transpose!