Re: Tensor cross vector
- To: mathgroup at smc.vnet.net
- Subject: [mg115467] Re: Tensor cross vector
- From: solid-state <phmech at gmail.com>
- Date: Tue, 11 Jan 2011 19:23:05 -0500 (EST)
- References: <ig97pu$1ro$1@smc.vnet.net> <igbndm$hd9$1@smc.vnet.net>
On Jan 9, 10:17 am, Peter Breitfeld <ph... at t-online.de> wrote: > solid-state wrote: > > Hi, everybody! > > > Could anybody please help me on how to find a tensor-vector cross > > product? The "Cross" function seems to work only with vectors. Thanks. > > Do you intend something like this: > > tensorCross[u_?VectorQ,m_?MatrixQ]:= > Transpose[Table[Cross[u,Transpose[m][[k]]],{k,Length[u]}]] > > tensorCross[m_?MatrixQ,u_?VectorQ]:= > Table[Cross[m[[k]],u],{k,Length[u]}] > > (ten = Array[Subscript[a, ##] &, {3, 3}]) //MatrixForm > vek = Array[Subscript[x, #] &, {3}] > > tensorCross[vek, ten] // MatrixForm > > tensorCross[ten, vek] // MatrixForm > > -- > _________________________________________________________________ > Peter Breitfeld, Bad Saulgau, Germany --http://www.pBreitfeld.de Oh, yeah, thank you very much, Peter! That is exactly what I meant. I first did it in two steps: by breaking (manually) my matrix into rows, then finding a cross product of them with my vector (with the help of the standard "Cross" function) and then using Mathematica's "Join" function to form the resulting matrix. But I was looking for such a way of doing this, that would work without my manual intervention, so in this way you helped me a lot!