Tensor[InverseMetric] - find the inverse of a metric tensor
Calling Sequences
InverseMetric(g)
Parameters
g - a metric tensor
Description
Examples
A metric tensor g is a symmetric, non-degenerate, rank 2 covariant tensor. The inverse of a metric tensor is a symmetric, non-degenerate, rank 2 contravariant tensor g. The components of h are given by the inverse of the matrix defined by the components of g.
InverseMetric(g) calculates the inverse of the metric tensor g.
This command is part of the DifferentialGeometry:-Tensor package, and so can be used in the form InverseMetric(...) only after executing the command with(DifferentialGeometry) and with(Tensor) in that order. It can always be used in the long form DifferentialGeometry:-Tensor:-InverseMetric.
with⁡DifferentialGeometry:with⁡Tensor:
Example 1.
First create a manifold M and define a metric tensor g on the tangent space of M.
DGsetup⁡x,y,M
frame name: M
g≔evalDG⁡x⁢dx&tdx−dy&tdy
g≔x⁢dx⁢dx−dy⁢dy
Calculate the inverse of g.
h≔InverseMetric⁡g
h≔1x⁢D_x⁢D_x−D_y⁢D_y
Check the result -- the contraction of h with g should be the type (1, 1) tensor whose components are the identity matrix.
ContractIndices⁡g,h,1,1
dx⁢D_x+dy⁢D_y
Example 2.
First create a rank 3 vector bundle E→M and define a metric gon the fibers.
DGsetup⁡x,y,u,v,w,E
frame name: E
g≔evalDG⁡du&tdu−dv&tdw−dw&tdv
g≔du⁢du−dv⁢dw−dw⁢dv
InverseMetric⁡g
D_u⁢D_u−D_v⁢D_w−D_w⁢D_v
See Also
DifferentialGeometry
Tensor
ContractIndices
RaiseLowerIndices
Physics[g_]
Download Help Document