Mathematica 9 is now available
Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Re: Dot Product in Cylindrical Coordinates

  • To: mathgroup at
  • Subject: [mg69276] Re: Dot Product in Cylindrical Coordinates
  • From: Paul Abbott <paul at>
  • Date: Tue, 5 Sep 2006 05:30:40 -0400 (EDT)
  • Organization: The University of Western Australia
  • References: <edadqd$pgc$>
  • Sender: owner-wri-mathgroup at

In article <edadqd$pgc$1 at>,
 Sergio Miguel Terrazas Porras <sterraza at> wrote:

> When I calculate the dot product of vectors {1,Pi/4,0} and {2,0,1} in
> Cylindrical Coordinates Mathematica 5.1 returns the result Sqrt[2], when the
> result should be 2.

Notwithstanding several of the other responses, the result _is_ Sqrt[2]. 
When you write {1,Pi/4,0}, surely you mean

  {rho, phi, z} == {1, Pi/4, 0}

and _not_ that 

  {x, y, z} == {1, Pi/4, 0} ?

After loading


and selecting Cylindrical coordinates,


then in cartesian coordinates, this point is

  p1 = CoordinatesToCartesian[{1, Pi/4, 0}]

  {1/Sqrt[2], 1/Sqrt[2], 0}


  p2 = CoordinatesToCartesian[{2, 0, 1}]

  {2, 0, 1}

Hence the dot product of the coordinate vectors (relative to the origin 
{0,0,0}), computed in cartesian coordinates, is

  p1 . p2


This is the same result that you got, presumably using,

  DotProduct[ {1, Pi/4, 0}, {2, 0, 1} ]


Of course, if you really mean

  {x, y, z} == {1, Pi/4, 0}

then there is no need to load Calculus`VectorAnalysis`: the dot product 
is just

  {1, Pi/4, 0} . {2, 0, 1}


Note that Dot is _not_ modified when this package is loaded so 
Jean-Marc's response,

  {1, Pi/4, 0} . {2, 0, 1}

is bogus -- the first two lines have no effect on the third.

Modifying Andrzej's code, we have

 Simplify[(JacobianMatrix[] . p1) . (JacobianMatrix[] . p2)]



Paul Abbott                                      Phone:  61 8 6488 2734
School of Physics, M013                            Fax: +61 8 6488 1014
The University of Western Australia         (CRICOS Provider No 00126G)    

  • Prev by Date: Using FullSimplify to check hand algebra
  • Next by Date: Re: Re: Trigonometric simplification
  • Previous by thread: Re: Dot Product in Cylindrical Coordinates
  • Next by thread: RE: Re: Dot Product in Cylindrical Coordinates