Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.0.1 - English

Change language to:
Français - 日本語 - Português - Русский

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function

Scilab Help >> Linear Algebra > Matrix Analysis > det

det

determinant

Syntax

det(X)
[e,m]=det(X)

Arguments

X

real or complex square matrix, polynomial or rational matrix.

m

real or complex number, the determinant base 10 mantissae

e

integer, the determinant base 10 exponent

Description

det(X) ( m*10^e is the determinant of the square matrix X.

For polynomial matrix det(X) is equivalent to determ(X).

For rational matrices det(X) is equivalent to detr(X).

The det and detr functions don't use the same algorithm. For a rational fraction, det(X) is overloaded by %r_det(X) which is based on the determ function. detr() uses the Leverrier method.
Sometimes the det and detr functions may return different values for rational matrices. In such cases you should set rational simplification mode off by using simp_mode(%f) to get the same result.

References

det computations are based on the Lapack routines DGETRF for real matrices and ZGETRF for the complex case.

Concerning sparse matrices, the determinant is obtained from LU factorization of umfpack library.

Examples

x=poly(0,'x');
det([x,1+x;2-x,x^2])
w=ssrand(2,2,4);roots(det(systmat(w))),trzeros(w)   //zeros of linear system
A=rand(3,3);
det(A), prod(spec(A))

See also

  • detr — polynomial determinant
  • determ — determinant of polynomial matrix
  • simp_mode — toggle rational simplification
Report an issue
<< cond Matrix Analysis orth >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Feb 12 19:26:47 CET 2018