tensor
invert
form the inverse of any second rank tensor_type
Calling Sequence
Parameters
Description
Examples
invert(T, detT)
T
-
second rank tensor the determinant of which is nonzero
detT
unassigned name as an output parameter (for holding the determinant of T, which is a by-product of this routine)
Important: The tensor package has been deprecated. Use the superseding commands DifferentialGeometry[Tensor][InverseMetric] and Physics[Inverse] instead.
This procedure computes the determinant of the second rank tensor T, and whenever the T determinant does not vanish, it constructs the inverse tensor of T.
In the case of a purely covariant or contravariant tensor T, the inverse T~ of T is defined in the usual way, corresponding to matrix algebra
Tij⁢Tjk=δki
Tij⁢Tjk=δik
where delta is the Kronecker delta.
In the case of a mixed tensor T, the inverse T~ of T is defined so that it satisfies
Tji⁢Tkj=δki
Thus, for the mixed case, T~ is the transpose of the matrix inverse of T. Define the inverse for the mixed case this way so that tensor[invert] can be used to compute inverses of the components of tetrads and frames. In the case of the natural basis, tensor[invert] is well suited for determining the contravariant metric tensor components from the covariant ones (and vice versa).
Indexing function: The invert routine preserves the use of the symmetric indexing function. That is, if the input tensor_type uses the symmetric indexing function for its component arrays, then the result also uses the symmetric indexing function.
Simplification: This routine uses the `tensor/invert/simp` routine for simplification purposes. The simplification routine is applied to each component of result after it is computed. By default, `tensor/invert/simp` is initialized to the `tensor/simp` routine. It is recommended that the `tensor/invert/simp` routine be customized to suit the needs of the particular problem.
This function is part of the tensor package, and so can be used in the form invert(..) only after performing the command with(tensor) or with(tensor, invert). The function can always be accessed in the long form tensor[invert](..).
with⁡tensor:
t≔array⁡1..3,1..3,x,y,y,y,0,0,0,0,x:
T≔create⁡−1,1,op⁡t
T≔table⁡compts=xyyy0000x,index_char=−1,1
Compute the inverse of the mixed tensor_type T. Note that the result is the transpose of the matrix inverse:
invT≔invert⁡T,detT
invT≔table⁡compts=01y01y−xy200−1x1x,index_char=1,−1
Define the covariant Kerr-Newman metric tensor:
g≔create⁡−1,−1,array⁡symmetric,1..4,1..4,3,4=e2−2⁢m⁢r⁢a⁢sin⁡θ2r2+a2⁢cos⁡θ2,3,3=sin⁡θ2⁢r2+a2+a2⁢sin⁡θ2r2+a2⁢cos⁡θ2⁢2⁢m⁢r−e2,1,1=r2+a2⁢cos⁡θ2r2+a2+e2−2⁢m⁢r,2,2=r2+a2⁢cos⁡θ2,2,3=0,2,4=0,4,4=2⁢m⁢r−e2r2+a2⁢cos⁡θ2−1,1,2=0,1,3=0,1,4=0
g≔table⁡compts=r2+a2⁢cos⁡θ2a2+e2−2⁢m⁢r+r20000r2+a2⁢cos⁡θ20000sin⁡θ2⁢r2+a2+a2⁢sin⁡θ2⁢−e2+2⁢m⁢rr2+a2⁢cos⁡θ2e2−2⁢m⁢r⁢a⁢sin⁡θ2r2+a2⁢cos⁡θ200e2−2⁢m⁢r⁢a⁢sin⁡θ2r2+a2⁢cos⁡θ2−e2+2⁢m⁢rr2+a2⁢cos⁡θ2−1,index_char=−1,−1
ginv≔invert⁡g,detg
ginv≔table⁡compts=a2+e2−2⁢m⁢r+r2r2+a2⁢cos⁡θ200001r2+a2⁢cos⁡θ20000a2⁢cos⁡θ2+e2−2⁢m⁢r+r2⁢csc⁡θ2a2+e2−2⁢m⁢r+r2⁢r2+a2⁢cos⁡θ2e2−2⁢m⁢r⁢ar2+a2⁢cos⁡θ2⁢a2+e2−2⁢m⁢r+r200e2−2⁢m⁢r⁢ar2+a2⁢cos⁡θ2⁢a2+e2−2⁢m⁢r+r2sin⁡θ2⁢a2⁢e2−2⁢sin⁡θ2⁢a2⁢m⁢r−a4⁢cos⁡θ2−a2⁢cos⁡θ2⁢r2−a2⁢r2−r4a2+e2−2⁢m⁢r+r2⁢r2+a2⁢cos⁡θ2,index_char=1,1
See Also
DifferentialGeometry[Tensor][InverseMetric]
Physics[Inverse]
tensor(deprecated)
tensor(deprecated)[simp]
Download Help Document