docstr: The Cartan matrix for G_2
  
  The Cartan matrix matrix for a Lie algebra is
  generated by assigning an ordering to the simple
  roots, (alpha[1], ...., alpha[l]).  Then the ijth
  entry of the Cartan matrix is (<alpha[i],alpha[j]>).
  
  Examples
  ========
  
  >>> from sympy.liealgebras.cartan_type import CartanType
  >>> c = CartanType("G2")
  >>> c.cartan_matrix()
  Matrix([
      [ 2, -1],
      [-3,  2]])
code: def cartan_matrix(self):
      """The Cartan matrix for G_2
  
      The Cartan matrix matrix for a Lie algebra is
      generated by assigning an ordering to the simple
      roots, (alpha[1], ...., alpha[l]).  Then the ijth
      entry of the Cartan matrix is (<alpha[i],alpha[j]>).
  
      Examples
      ========
  
      >>> from sympy.liealgebras.cartan_type import CartanType
      >>> c = CartanType("G2")
      >>> c.cartan_matrix()
      Matrix([
          [ 2, -1],
          [-3,  2]])
  
      """
  
      m = Matrix(2, 2, [2, -1, -3, 2])
      return m
  
file_path: sympy/sympy/liealgebras/type_g.py
imports: from .cartan_type import Standard_Cartan
  from sympy.core.backend import Matrix
label_desc: Use image node_id 6 for calling the TypeG obj's underlying member method code with example usage: obj.cartan_matrix() and returns: m