Function matrixDeterminant

  • This function calculates the determinant of a matrix. The operation is trivial for 2x2 matrices but becomes recursive from 3x3 and up

    Throws

    • TypeError when trying to calculate determinant for non-square matrices

    Example

    const matrix = new Matrix([1, 5, -3, 2], 2, 2)
    matrixDeterminant(matrix) //-> 17

    Parameters

    • matrix: Matrix

      matrix to find determinant of

    Returns number

Generated using TypeDoc