class_docstr: Class for invariant metrics on Matrix Lie groups.
  
  This class supports both left and right invariant metrics
  which exist on Lie groups.
  
  Parameters
  ----------
  space : LieGroup
      Group to equip with the invariant metric.
  metric_mat_at_identity : array-like, shape=[dim, dim]
      Matrix that defines the metric at identity.
      Optional, defaults to identity matrix if None.
  left : bool
      Whether to use a left or right invariant metric.
      Optional, default: True.
  
  References
  ----------
  .. [Milnor]    Milnor, John. “Curvatures of Left Invariant Metrics on Lie
                 Groups.” Advances in Mathematics 21, no. 3, 1976:
                 293–329. https://doi.org/10.1016/S0001-8708(76)80002-3.
  .. [Kolev]     Kolev, Boris. “Lie Groups and Mechanics: An Introduction.”
                 Journal of Nonlinear Mathematical Physics 11, no. 4, 2004:
                  480–98. https://doi.org/10.2991/jnmp.2004.11.4.5.
  .. [Gallier]   Gallier, Jean, and Jocelyn Quaintance. Differential Geometry
                 and Lie Groups: A Computational Perspective.
                 Geonger International Publishing, 2020.
                 https://doi.org/10.1007/978-3-030-46040-2.
class_docstr_tok: ["Class","for","invariant","metrics","on","Matrix","Lie","groups",".","This","class","supports","both","left","and","right","invariant","metrics","which","exist","on","Lie","groups",".","Parameters","--","--","--","--","--","space",":","LieGroup","Group","to","equip","with","the","invariant","metric",".","metric_mat_at_identity",":","array-like",",","shape=","[","dim",",","dim","]","Matrix","that","defines","the","metric","at","identity",".","Optional",",","defaults","to","identity","matrix","if","None",".","left",":","bool","Whether","to","use","a","left","or","right","invariant","metric",".","Optional",",","default",":","True",".","References","--","--","--","--","--","..","[","Milnor","]","Milnor",",","John",".","\u201c","Curvatures","of","Left","Invariant","Metrics","on","Lie","Groups.","\u201d","Advances","in","Mathematics","21",",","no",".","3",",","1976",":","293\u2013329",".","https",":","\/\/doi.org\/10.1016\/S0001-8708","(","76",")","80002-3",".","..","[","Kolev","]","Kolev",",","Boris",".","\u201c","Lie","Groups","and","Mechanics",":","An","Introduction.","\u201d","Journal","of","Nonlinear","Mathematical","Physics","11",",","no",".","4",",","2004",":","480\u201398",".","https",":","\/\/doi.org\/10.2991\/jnmp.2004.11.4.5",".","..","[","Gallier","]","Gallier",",","Jean",",","and","Jocelyn","Quaintance",".","Differential","Geometry","and","Lie","Groups",":","A","Computational","Perspective",".","Geonger","International","Publishing",",","2020.","https",":","\/\/doi.org\/10.1007\/978-3-030-46040-2","."]
docstr: Compute the geodesic ODE associated with the invariant metric.
  
  This is a reduced geodesic equation written entirely in the Lie
  algebra. It is known as Euler-Poincare equation [Kolev]_.
  
  .. math::
      \dot{\gamma}(t) = (dL_{\gamma(t)}) X(t)
      \dot{X}(t) = ad^*_{X(t)}X(t)
  
  Parameters
  ----------
  state : array-like, shape=[..., dim]
      Tangent vector at the position.
  _time : array-like, shape=[..., dim]
      Point on the manifold, the position at which to compute the
      geodesic ODE.
  
  Returns
  -------
  geodesic_ode : array-like, shape=[..., dim]
      Value of the vector field to be integrated at position.
  
  References
  ----------
  .. [Kolev] Kolev, Boris. “Lie Groups and Mechanics: An Introduction.”
      Journal of Nonlinear Mathematical Physics 11, no. 4, 2004:
      480–98. https://doi.org/10.2991/jnmp.2004.11.4.5.
code: def geodesic_equation(self, state, _time):
      r"""Compute the geodesic ODE associated with the invariant metric.
  
      This is a reduced geodesic equation written entirely in the Lie
      algebra. It is known as Euler-Poincare equation [Kolev]_.
  
      .. math::
          \dot{\gamma}(t) = (dL_{\gamma(t)}) X(t)
          \dot{X}(t) = ad^*_{X(t)}X(t)
  
      Parameters
      ----------
      state : array-like, shape=[..., dim]
          Tangent vector at the position.
      _time : array-like, shape=[..., dim]
          Point on the manifold, the position at which to compute the
          geodesic ODE.
  
      Returns
      -------
      geodesic_ode : array-like, shape=[..., dim]
          Value of the vector field to be integrated at position.
  
      References
      ----------
      .. [Kolev] Kolev, Boris. “Lie Groups and Mechanics: An Introduction.”
          Journal of Nonlinear Mathematical Physics 11, no. 4, 2004:
          480–98. https://doi.org/10.2991/jnmp.2004.11.4.5.
      """
      sign = 1.0 if self.left else -1.0
      basis = self.normal_basis(self._space.lie_algebra.basis)
  
      point, vector = state
      velocity = self._space.tangent_translation_map(
          point, left=self.left
      )(vector)
      coefficients = gs.array(
          [
              self.structure_constant(vector, basis_vector, vector)
              for basis_vector in basis
          ]
      )
      acceleration = gs.einsum("i...,ijk->...jk", coefficients, basis)
      return gs.stack([velocity, sign * acceleration])
  
imports: import geomstats.backend
  from geomstats.geometry.matrices import Matrices
  from geomstats.geometry.riemannian_metric import RiemannianMetric
  from geomstats.integrator import integrate
  from geomstats.numerics.geodesic import ExpODESolver, LogShootingSolver
  from geomstats.numerics.ivp import GSIVPIntegrator
  from geomstats.vectorization import repeat_out
label_desc: Use image node_id 21 for calling the _InvariantMetricMatrix obj's underlying member method code with example usage: obj.geodesic_equation(state, _time) and returns: gs