## `linalg::det` -- determinant of a matrix

#### Introduction

`linalg::det``(A)` computes the determinant of the square matrix A.

#### Call(s)

`linalg::det(A)`

#### Parameters

`A` | - | a square matrix of a domain of category `Cat::Matrix`.

#### Returns

an element of the component ring of `A`.

#### Related Functions

`linalg::gaussElim`, `linalg::permanent`, `linalg::rank`, `numeric::det`

#### Details

- A floating-point approximation of the determinant is computed with `numeric::det`, if `A` is defined over the component ring `Dom::Float`. In this case it is recommended to call `numeric::det` directly for a better efficiency.
- The component ring of `A` must be a commutative ring, i.e., a domain of category `Cat::CommutativeRing`.

#### Example 1

We compute the determinant of the following matrix:

    >> A := matrix([[a11, a12], [a21, a22]])

                                  +-          -+
                                  |  a11, a12  |
                                  |            |
                                  |  a21, a22  |
                                  +-          -+

which gives us the well-known formula for the determinant of an arbitrary 2x2 matrix:

    >> linalg::det(A)

                                 a11 a22 - a12 a21

#### Background

- For an n x n matrix A=(a[i,j]) (1<=i,j<=n) over a commutative ring its determinant is defined as:

      det(A):= Sum( sign(s)*Prod( a[s(j),j],j=1..n ), s in Sn )

  (Sn is the symmetric group of all permutations of {1,...,n}.)
- For a component ring of A that is an integral domain (i.e., a domain of category `Cat::IntegralDomain`) and not defined over the domain `Dom::Float`, Gaussian elimination is used to compute the determinant of A.

  For any other commutative ring that is not an integral domain, a modification of the Berkowitz algorithm is used. Reference: A. Jounaidi: The Berkowitz Algorithm, Maple and Computing the Characteristic Polynomial in an Arbitrary Commutative Ring. Equipe de Mathèmatiques de Besancon, Universitè de Franche - Comtè, 25030 Besancon Cedex, May 1996.

#### Changes

- Uses `numeric::det` for a floating-point approximation of the determinant.

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000