arXiv:cs/0503073v2 [cs.SC] 25 May 2005 ytm(niae ypie oriae eo) h e and new intro the excellent below), an coordinates for primed [6] on by (see based (indicated be coordinates to system of said change be a can spacetime under curved of mathematics laws The transformation Tensor 2.1 t topics algebra tensor the of review brief a Maxima. with spacetime begin curved us Let in Tensors 2 done. fu improved been and has new that involves work time the they that words, other since packages In tensor systems. LISP various between bilities metric. a enter nonresponsi and became example package tens manipulation display not tensor could component module manipulation tensor when indicial 1979-1982, to back p dating these survives, regarding authors scarce various is by Documentation 1970s. late the in eeoes n a eotie nsuc rojc oeform code object the or and source 1960s in the obtained in be Energy can of and Department wi developers, compute States most comprehensive United the first the License, world’s by Public the of GNU one the of for descendant stands (GPL Maxima GPL Introduction 1 si undot oee,ms fteepolm eesuperfi were problems these of most however, out, turned it As pack tensor the Maxima, GPL across came first author this When mani tensor has Maxima systems, algebra computer other Like TNO mlmnsasrc esralgebras. na tensor m identically abstract them the implements make with ATENSOR to compatible implemented fully were was implemented; that that also steps functionality i the new their found, the were on and packages based these them which in manipulating state opaque, as te symbols component-based the tensor implemented but CTENSOR, packages, DOE-MACSYMA, two from the packages manipulation tensor two P aiai noe-orecmue ler ytmbsdo based system algebra computer open-source an is Maxima GPL esrMnplto nGLMaxima GPL in Manipulation Tensor http://www.vttoth.com/ eray1 2008 1, February itrToth Viktor Abstract 1 r,adcudntcryotcvratdffrnito;the differentiation; covariant out carry not could and ors, e akg ntecmeca eso fMACSYMA, of version commercial the in package med cae’oiis u eetcleto femi message e-mail of collection select a but origins, ackages’ eees ocret uho h okivse nothe into invested work the of Much correct. to easy were uto. hnasic smd oanwcoordinate new a to made is switch a When duction.) ler ytm CS,DEMCYA developed DOE-MACSYMA, (CAS), systems algebra r hs akgswr cieymitie tM.I.T. at maintained actively were packages these a r mlmne ytetno ler akgsin packages algebra tensor the by implemented are hat etemmn n re oflo h documentation the follow to tried one moment the ve cinlt.Teproeo hsppri odocument to is paper this of purpose The nctionality. eddt aetepcae ul ucinlagain, functional fully packages the make to needed from dxpoete.Tepeetpprdsrbsthe describes paper present The properties. ndex l opnnso etrrlt oec te as other each to relate vector a of components old srmnplto;teohr TNO,treated ITENSOR, other, the manipulation; nsor h rnfrainpoete fvrosquantities various of properties transformation the ili aue n eutdfo io incompati- minor from resulted and nature, in cial uaincpblt.Ti aaiiywsdeveloped was capability This capability. pulation r estl.Atidpcae TNO,was ATENSOR, package, third A versatile. ore 90.I scretymitie y1 volunteer 18 by maintained currently is It 1970s. ewr nvrossae fdsear n of One disrepair. of states various in were se http://maxima.sourceforge.net/ O-ASM.GLMxm included Maxima GPL DOE-MACSYMA. n eyue pnsuc ies osrc)i the is construct) license source open used dely gswr ffcieynnfntoa.The non-functional. effectively were ages . s follows: 1 ′1 ′1 ′1 1 x′ ∂x ∂x ∂x x ∂x1 ∂x2 . . . ∂xn ∂x′2 ∂x′2 ∂x′2 2 ∂x1 ∂x2 . . . ∂xn 2 x′ = x (1) ...... . . . .. . . . ′n ′n ′n . n ∂x ∂x ∂x n 1 2 . . . n x′ ∂x ∂x ∂x x Ordinary vectors that transform according to (1) are said to be contravariant. Loosely speaking, contravariant means “just like a vector”, and covariant means “just like a coordinate”. (By way of a simple example, consider a coordinate system that measures distances in meters. When you switch from meters to centimeters, your unit of measure decreases by a factor of 100. The quantities you measure, the length of a vector for instance, increase in contrast: a vector that was previously measured to be 5 units, i.e., 5 meters long, is now 500 units, i.e., 500 centimeters long. The coordinate units behave as covariant quantities, while the vector itself behaves as a contravariant quantity.) We can express the transformation laws for contravariant and covariant quantities in a more compact form. Denoting the transformation matrix in (1) by A, we have:
x′ = A · x (2)
Now take another vectorial quantity, y, that is known to produce an invariant inner product with x:
x · y = c (3)
How would this product change if we were to switch from one coordinate system to another? Why, it’s supposed to be invariant, which means x′ · y′ = x · y = c (4)
We know how to express x′ as a function of x and the transformation matrix A. But the same transformation could not apply to y, because the result would not be the invariant quantity c:
(A · x) · (A · y) =6 x · y (5)
Then again, if you think about this a moment, the expression A · y doesn’t make much sense anyway. The vector x can be expressed in some coordinate system as a column vector. What do you multiply a column vector with in order to get a scalar? Why, a row vector of course. So y is a row vector. And how would you multiply a row vector on the left with the matrix A? Well, you could do so in principle, but the result is most certainly not another row vector. You can, on the other hand, multiply a row vector on the right with a matrix. And perhaps, instead of using A, 1 you might consider using A− , as in 1 (A · x) · y · A− = x · y (6) If this equation is satisfied for a quantity y, that quantity is said to be a covariant vector. A covariant vector maps a contravariant vector to the a scalar, namely the same scalar regardless of the coordinate system used. Many equations in physics and mathematics are matrix equations. For instance, we may have an equation in the form of v = T · u (7) When we change coordinate systems, we get:
v′ = A · v = A · T · u (8)
1 1 How would we express v′ as a function of u′? First, we multiply on the left by T− A− (remembering that matrix multiplication is not commutative but it is associative):
1 1 1 1 1 T− · A− · v′ = T− · A− · A · T · u = T− · T · u = u (9)
Next, we multiply on the left by A: 1 1 A · T− · A− · v′ = A · u = u′ (10)
2 Now that we managed to get u′ on the right hand side, all that’s left is to eliminate all factors of v′ on the left by 1 multiplying both sides with A · T · A− :
1 1 1 1 A · T · A− · A · T− · A− · v′ = A · T · A− · u′ (11)
Once again remembering that matrix multiplication associative, we can reduce this equation to:
1 v′ = A · T · A− · u′ (12)
What we have here is a transformation rule for the matrix T:
1 T′ = A · T · A− (13)
1 We call a quantity like T a valence- 1 tensor. It has 1 contravariant index, and 1 covariant index. Generally, a quantity that transforms as k l X′ = A · X · A− (14)
k is called a valence- l tensor. 1 Since the matrix A− appears in these equations, it is a good question how this matrix can be computed. Inverting 1 A the “hard way” would be an obvious method, but there is an easier way. Notice that A− expresses a vector transformation just as A does: 1 1 x = A− · A · x = A− · x′ (15) 1 From this equation, we can read off the components of A− directly:
∂xi Aij = j (16) ∂x′ 2.2 Coordinate independence Many tensor operations exist that result in values that are independent of the coordinate system in which the tensors are expressed. We have already seen one example: the product of a covariant and a contravariant vector. If we specify the coordinate system, this product can be expressed as:
n i x · y = x yi (17) i=1 X where n is the dimensionality of the vectors, and we use upper indices to distinguish contravariant vectors from covariant vectors that have lower indices. The important thing here is that this product does not depend on our choice of a coordinate system. The result will be the same in any coordinate system. This observation is the basis of the so-called abstract index notation: expressing tensor equations using indexed quantities without explicitly specifying the coordinate system. Another powerful notational convention is the Einstein summation convenction. Basically, it means dropping the summation sign in equations in which an index appears in both a contravariant and a covariant position; in these cases, the summation is implied, i.e., n i i x yi = x yi (18) i=1 X This operation, in which a repeated tensor index (often called a dummy index) disappears as an implied summation is carried out, is called tensor contraction.
2.3 The metric The distance between two points in a rectilinear coordinate system can be expressed using the theorem of Pythagoras:
2 ds2 = dxi (19) i X
3 When a generalized coordinate system is used in curved space, this formula obviously does not work. It does, however, apply so long as the quantities ds and dxi are infinitesimally small. How would the infinitesimal squared distance, ds, change under a change of coordinate systems? Here it is: i i 2 ∂x′ ∂x′ k l (ds′) = dx dx (20) ∂xk ∂xl l k i X X X By introducing the quantities ∂x i ∂x i g = ′ ′ (21) kl ∂xk ∂xl i X we can rewrite the formula as 2 k l ds = gkldx dx (22) Notice that ∂ ∂ g dxl = g dxmdxl = ds2 (23) kl ∂xk ml ∂xk 2 If we take the infinitesimal squared distance, ds , to be unity, multiplying by gkl accomplished a conversion from the infinitesimal quantity dxl to ∂/∂xk. This is called a lowering of the index. What we basically have here is a unique way, with the help of gkl, to associate contravariant and covariant quantities. Similarly, the inverse of the metric tensor, gkl, can be used the raise a tensor index. The inner product of the metric tensor with itself gives the Kronecker-delta (i.e., the identity matrix):
lm m gklg = δk (24)
0 The quantities gkl themselves transform as a valence- 2 covariant tensor, which justifies the notation. 2.4 Covariant differentiation In Euclidean space, when rectilinear coordinates are used, partial differentiation by a coordinate results in new tensorial quantities. For instance, partial differentiation of a scalar field by the coordinates defines the gradient of that field. Higher-order quantities can also be differentiated this way; we can, for instance, compute the gradient of 1 a vector field and obtain a valence- 1 tensor field. This is no longer true in curved space, where partial differentiation by a coordinate no longer necessarily produces a quantity that transforms as a tensor under a coordinate transformation. The question arises, then: is it possible to define a new type of a derivative operator, one that on the one hand has the same algebraic behavior (e.g., obeying the Leibnitz rule) as the ordinary derivative operator, but on the other hand, produces a quantity that behaves like a tensor under a change of coordinates? To answer this question, we first need to explore the concept of a parallel vector field. In flat space, a parallel vector field consists of identical vectors attached to each point in spacetime. In other words for a vector X ∂Xj dXj = dxk =0 (25) ∂xk k X How does this expression transform under a change of coordinates? We can answer this question by utilizing the ′ j ∂x j h identity X′ = h ∂xh X , to get: j 2 j P j ∂x′ h ∂ x′ h k dX′ = dX + X dx (26) ∂xh ∂xh∂xk h h k X X X With the help of the metric, it is possible to eliminate the second derivatives from this equation. First, we need to differentiate (21) with respect to xh and then cyclically permute the indices to obtain the following identities:
2 ′j ′j ′j 2 ′j ∂gkl ∂ x ∂x ∂x ∂ x ∂xh = j ∂xh∂xk ∂xl + ∂xk ∂xh∂xl
2 ′j ′j ′j 2 ′j ∂glh P ∂ x ∂x ∂x ∂ x ∂xk = j ∂xk∂xl ∂xh + ∂xl ∂xk∂xh
2 ′j ′j ′j 2 ′j ∂ghk P ∂ x ∂x ∂x ∂ x ∂xl = j ∂xl∂xh ∂xk + ∂xh ∂xl∂xk (27) P 4 Adding the first and second of these three equations, subtracting the third, and dividing the result by two, we obtain: 1 ∂g ∂g ∂g ∂2x j ∂x j Γ = kl + lh − hk = ′ ′ (28) hkl 2 ∂xh ∂xk ∂xl ∂xh∂xk ∂xl j X j l Now we multiply (26) by ∂x′ /∂x and sum over j to get
j ∂x′ j h h k dX′ = g dX + Γ X dx (29) ∂xl hl hkl j h h k X X X X Both sides of this equation should be zero for a parallel vector field. The right hand side can be made more meaningful if we multiply it by gjl (we’re also dropping the summation signs now, relying on the summation convention instead):
j jl h k dX + g ΓhklX dx =0 (30)
j jl In other words, for a parallel vector field, the quantities Γhk = g Γhkl express the difference by which the ordinary differential operator will fail. This suggests a definition for a differential operator in curved space:
∂Xj ∇ Xj = +Γ j Xh (31) k ∂xk hk For a covariant vector field, the same derivation yields ∂X ∇ X = j − Γ hX (32) k j ∂xk jk h
r And, for an arbitrary tensor of valence- s , we get
∂T j1...jr r s j1...jr i1...is jα j1...jα−1mjα+1...jr m j1...jr ∇kT = + Γmk T − Γi k T (33) i1...is ∂xk i1...is β i1...iβ−1miβ+1...is α=1 β X X=1 k The quantities Γijk and Γij are called the Christoffel-symbols of the first and second kind, respectively. The operator we just defined, ∇k, can justifiably called a differential operator for several reasons. First, as can be verified by direct computation, it obeys the Leibnitz rule: ∇k (X · Y) = (∇kX) · Y + X · (∇kY). Second, it can be shown that once the metric, gij , is given, the differential operator is uniquely defined, in that it is the only such i j operator that preserves the inner product of two vectors parallel transported along any curve, i.e., ∇kgij v w = 0. Note that a shorthand is often used to express the covariant derivative; for instance, instead of ∇kXij , we often write Xij;k.
2.5 The Lie-derivative The covariant derivative is tensorial in nature, but unfortunately, it depends on the metric. The ordinary derivative is not dependent on the metric, but it’s not tensorial: it depends on the choice of the coordinate system. So the question arises: is it possible to construct operators that are not dependent on the metric, but produce tensorial results that are not coordinate system dependent? There are, in fact, many such operators possible (see [7]), most notably among them the Lie-derivative:
i...k h i...k h...k i i...h k i...k h i...k h LV Hl...n = V ∂hHl...n − Hl...n ∂hV − . . . − Hl...n ∂hV + Hh...n∂lV + Hl...h ∂nV (34)
The geometric meaning of the Lie-derivative is directional differentiation: it tells you how a tensor field changes in the direction of the vector field V.
2.6 Commutators
The ordinary partial differential operator is known to commute: ∂i∂j X−∂j ∂iX = 0. Is this also true for the covariant derivative?
5 For a scalar field f, the commutator is ∂f ∂f (∇ ∇ − ∇ ∇ ) f = ∇ − ∇ = k l l k k ∂xl l ∂xk ∂2f ∂f ∂2f ∂f ∂f − Γ h − +Γ h = Γ h − Γ h (35) ∂xk∂xl lk ∂xh ∂xk∂xl kl ∂xh kl lk ∂xh