Function inv

  • Compute the (multiplicative) inverse of a matrix.

    Parameters

    • matrix: number[][]

      Matrix to be inverted.

    Returns number[][]

    The multiplicative inverse.

    Throws

    An error if the matrix is not square or not invertible.