InverseMetric - Maple Help

Tensor[InverseMetric] - find the inverse of a metric tensor

Calling Sequences

InverseMetric(g)

Parameters

g    - a metric tensor

Description

 • 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.

Examples

 > $\mathrm{with}\left(\mathrm{DifferentialGeometry}\right):$$\mathrm{with}\left(\mathrm{Tensor}\right):$

Example 1.

First create a manifold $M$ and define a metric tensor $g$ on the tangent space of $M$.

 > $\mathrm{DGsetup}\left(\left[x,y\right],M\right)$
 ${\mathrm{frame name: M}}$ (2.1)
 M > $g≔\mathrm{evalDG}\left(x\mathrm{dx}&t\mathrm{dx}-\mathrm{dy}&t\mathrm{dy}\right)$
 ${g}{≔}{x}{}{\mathrm{dx}}{}{\mathrm{dx}}{-}{\mathrm{dy}}{}{\mathrm{dy}}$ (2.2)

Calculate the inverse of $g$.

 M > $h≔\mathrm{InverseMetric}\left(g\right)$
 ${h}{≔}\frac{{1}}{{x}}{}{\mathrm{D_x}}{}{\mathrm{D_x}}{-}{\mathrm{D_y}}{}{\mathrm{D_y}}$ (2.3)

Check the result -- the contraction of $h$ with $g$ should be the type (1, 1) tensor whose components are the identity matrix.

 M > $\mathrm{ContractIndices}\left(g,h,\left[\left[1,1\right]\right]\right)$
 ${\mathrm{dx}}{}{\mathrm{D_x}}{+}{\mathrm{dy}}{}{\mathrm{D_y}}$ (2.4)

Example 2.

First create a rank 3 vector bundle $E\to M$ and define a metric $g$on the fibers.

 M > $\mathrm{DGsetup}\left(\left[x,y\right],\left[u,v,w\right],E\right)$
 ${\mathrm{frame name: E}}$ (2.5)
 E > $g≔\mathrm{evalDG}\left(\mathrm{du}&t\mathrm{du}-\mathrm{dv}&t\mathrm{dw}-\mathrm{dw}&t\mathrm{dv}\right)$
 ${g}{≔}{\mathrm{du}}{}{\mathrm{du}}{-}{\mathrm{dv}}{}{\mathrm{dw}}{-}{\mathrm{dw}}{}{\mathrm{dv}}$ (2.6)

Calculate the inverse of $g$.

 E > $\mathrm{InverseMetric}\left(g\right)$
 ${\mathrm{D_u}}{}{\mathrm{D_u}}{-}{\mathrm{D_v}}{}{\mathrm{D_w}}{-}{\mathrm{D_w}}{}{\mathrm{D_v}}$ (2.7)