0
|
6647 Views
|
4 Replies
|
1 Total Likes
View groups...
Share
GROUPS:

# Define my own unit vectors and their dot product?

Posted 4 years ago
 I am working my way through a book called The Geometry of Special Relativity and am at a stage where I want to define a time unit vector that has the property that its dot product with itself is -1. The dot product between space like unit vectors is still +1 and the for product between the time and space unit vectors is zero.
4 Replies
Sort By:
Posted 4 years ago
 Well,you could consider to introduce I = Sqrt[ -1 ] or your own dot dot[ x_ , y_ ]:= x. g .y and define at the beginning g={{ 1, 0, 0, 0 }, {0, 1, 0, 0 } , { 0, 0, 1, 0, }, {0, 0, 0, -1 }} (or its negative)
Posted 4 years ago
 Hello Hans,Many thanks for this. I tried it and it suits my needs perfectly.David
Posted 4 years ago
 One way: define a "wrapper" for special relativistic vectors, and define its behavior under the usual operations with upvalues. srv[x1_, y1_, z1_, t1_].srv[x2_, y2_, z2_, t2_] ^:= x1 x2 + y1 y2 + z1 z2 - t1 t2 Check that it has the right properties. Time unit vector: tu = srv[0, 0, 0, 1]; tu.tu (* -1 *) Space unit vector: xu = srv[1, 0, 0, 0] (* 1 *) 
Posted 4 years ago
 Hello John,Many thanks for this. I tried it and it suits my needs perfectly.David
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.