5

I want to get the Norm of a vector which involves sines and cosines (So I really need to replace it by the Pythagorean theorem). Since I know that all my results are going to be real and positive I don't care about the Abs before squaring the terms.

How can I get $$ \sqrt{ r_x ^ 2 + r_y ^ 2 + r_z ^ 2 }$$

Instead of: $$ \sqrt{ |r_x| ^ 2 + |r_y| ^ 2 + |r_z| ^ 2 }$$

Joshua Salazar
  • 733
  • 4
  • 12

1 Answers1

8

That expression is the square root of the dot product of the vector by itself:

Sqrt[vec.vec]

where vec is your vector.

C. E.
  • 70,533
  • 6
  • 140
  • 264