Message Boards Message Boards

0
|
7065 Views
|
4 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Define my own unit vectors and their dot product?

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.

POSTED BY: David Mackay
4 Replies

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 BY: Hans Dolhaine

Hello Hans,

Many thanks for this. I tried it and it suits my needs perfectly.

David

POSTED BY: David Mackay

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 BY: John Doty

Hello John,

Many thanks for this. I tried it and it suits my needs perfectly.

David

POSTED BY: David Mackay
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract