mdet - Matrix Determinant

Prev Next

Function Names

mdet

Description

This function calculates the determinant of the matrix. A non-zero determinant indicates that the set of equations modeled with the matrix can be solved.

Call as: function

Restrictions

Indirect parameter passing is disabled

Parameter count

1

Parameters

No.TypeDescription
1
input
matrix of numerals Matrix

Return value

TypeDescription
numeral Determinant

Exceptions

Division: Matrix is not a square (number of rows and columns differ)

Examples

      echo( mdet ({{1,2},{3,4}} ) ); // returns 2

Output

-2
Try it yourself: Open LIB_Function_mdet.b4p in B4P_Examples.zip. Decompress before use.