rStats.js v1.3.0
    Preparing search index...

    Function determinant

    • Determinant as modulus and sign. Equivalent to R's determinant().

      Computed from an LU decomposition; the log modulus is the sum of the logs of the absolute diagonal elements.

      Parameters

      • x: MatrixInput

        A square matrix (array of rows).

      • options: { logarithm?: boolean } = {}

        logarithm: return the natural logarithm of the modulus. Default: true.

      Returns Determinant

      The modulus and sign. See Determinant.

      determinant([[1, 2], [3, 4]]); // { modulus: 0.6931471805599453, sign: -1 }
      determinant([[1, 2], [3, 4]], { logarithm: false }); // { modulus: 2, sign: -1 }