Re: Vector transpose!
- To: mathgroup at smc.vnet.net
- Subject: [mg84470] Re: Vector transpose!
- From: John Doty <jpd at whispertel.LoseTheH.net>
- Date: Wed, 26 Dec 2007 05:11:44 -0500 (EST)
- References: <fkqpqi$jkf$1@smc.vnet.net>
mark wrote: > Hi all, > > 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 > > Any ideas? > 1. Forget about transposing vectors. Mathematica uses the "tensor" convention in which (x.y) sums over the last index of x, first of y. So, if you write (r.M.r) you'll get what you want. or 2. Consistently make everything a matrix, so (r={{a},{b},{c},{cd}}). You can then use the convention where the transpose of a vector is meaningful. But then your scalars will come out as (single element) matrices too, which can be inconvenient. I'd go with (1). I also recommend not capitalizing the first letter of your symbols: that can get you into trouble sometimes. -- John Doty, Noqsi Aerospace, Ltd. http://www.noqsi.com/ -- Specialization is for robots.