determinant ( matrix -- determinant )
Extra matrix operations

Prev:nullity ( matrix -- nullity )
Next:1/det ( matrix -- 1/det )


Vocabulary
math.matrices.extras

Inputs
matrixa square-matrix


Outputs
determinanta number


Generic word contract
Compute the determinant of the input matrix. Generally, the determinant of a matrix is a scaling factor of the transformation described by the matrix.

Notes
This word is intended for use with "flat" (2-dimensional) matrices.
This word assumes that elements of the input matrix are compatible with the following words:
max ( obj1 obj2 -- obj )

- ( x y -- z )

* ( x y -- z )


Errors
non-square-determinant if the input matrix is not a square-matrix.

Examples
USING: math.matrices.extras prettyprint ; { { 3 0 -1 } { -3 1 3 } { 2 -5 4 } } determinant .
44

USING: math.matrices.extras prettyprint ; { { -8 -8 13 11 10 -5 -14 } { 3 -11 -8 3 -7 -3 4 } { 10 4 -5 3 0 -6 -12 } { -14 0 -3 -8 10 0 10 } { 3 -6 1 -10 -9 10 0 } { 5 -12 -14 6 5 -1 -7 } { -9 -14 -8 5 2 2 -2 } } determinant .
-103488155


Definition

GENERIC: determinant ( matrix -- determinant )


Methods