linalg(deprecated)/det - Help

Home : Support : Online Help : linalg(deprecated)/det

linalg(deprecated)

 det
 determinant of a matrix

 Calling Sequence det(A) det(A, sparse)

Parameters

 A - two-dimensional square matrix sparse - optional directive

Description

 • Important: The linalg package has been deprecated. Use the superseding command LinearAlgebra[Determinant], instead.
 - For information on migrating linalg code to the new packages, see examples/LinearAlgebraMigration.
 • The function det computes the determinant of the given matrix.
 • The second argument (optional) specifies that the computational method of minor expansion should be used.  This works well for sparse matrices.
 • With no extra argument, a decision is made automatically whether to use minor expansion or Gaussian elimination (or a combination of both). Specifying the extra argument eliminates the overhead of the decision process if you happen to know ahead of time that minor expansion will work best.
 • The command with(linalg,det) allows the use of the abbreviated form of this command.

Examples

Important: The linalg package has been deprecated. Use the superseding command LinearAlgebra[Determinant], instead.

 > $\mathrm{with}\left(\mathrm{linalg}\right):$
 > $A≔\mathrm{hilbert}\left(3\right)$
 ${A}{≔}\left[\begin{array}{ccc}{1}& \frac{{1}}{{2}}& \frac{{1}}{{3}}\\ \frac{{1}}{{2}}& \frac{{1}}{{3}}& \frac{{1}}{{4}}\\ \frac{{1}}{{3}}& \frac{{1}}{{4}}& \frac{{1}}{{5}}\end{array}\right]$ (1)
 > $\mathrm{det}\left(A\right)$
 $\frac{{1}}{{2160}}$ (2)
 > $B≔\mathrm{matrix}\left(2,2\right)$
 ${B}{≔}\left[\begin{array}{cc}{{\mathrm{?}}}_{{1}{,}{1}}& {{\mathrm{?}}}_{{1}{,}{2}}\\ {{\mathrm{?}}}_{{2}{,}{1}}& {{\mathrm{?}}}_{{2}{,}{2}}\end{array}\right]$ (3)
 > $\mathrm{det}\left(B\right)$
 ${{B}}_{{1}{,}{1}}{}{{B}}_{{2}{,}{2}}{-}{{B}}_{{1}{,}{2}}{}{{B}}_{{2}{,}{1}}$ (4)