NAG CL Interface
F03 (Det)
Determinants

Settings help

CL Name Style:


1 Scope of the Chapter

This chapter is concerned with the calculation of determinants of square matrices.

2 Background to the Problems

The functions in this chapter compute the determinant of a square matrix A. The matrix is assumed to have first been decomposed into triangular factors
A=LU ,  
using functions from Chapter F07.
If A is positive definite, then U=LT, and the determinant is the product of the squares of the diagonal elements of L. Otherwise, the functions in this chapter use the Dolittle form of the LU decomposition, where L has unit elements on its diagonal. The determinant is then the product of the diagonal elements of U, taking account of possible sign changes due to row interchanges.
To avoid overflow or underflow in the computation of the determinant, some scaling is associated with each multiplication in the product of the relevant diagonal elements. The final value is represented by
detA=d×2id  
where id is an integer and
116|d|<1 .  
For complex valued determinants the real and imaginary parts are scaled separately.

3 Recommendations on Choice and Use of Available Functions

It is extremely wasteful of computer time and storage to use an inappropriate function, for example to use a function requiring a complex matrix when A is real. Most programmers will know whether their matrix is real or complex, but may be less certain whether or not a real symmetric matrix A is positive definite, i.e., all eigenvalues of A>0. A real symmetric matrix A not known to be positive definite must be treated as a general real matrix.

4 Decision Trees

Tree 1

Is A a real matrix?   Is A a symmetric positive definite matrix?   Is A a banded matrix?   f07hdc and f03bhc
yesyesyes
  no   no   no
f07fdc and f03bfc
f07adc and f03bac
f07arc and f03bnc
Note: if at any stage the answer to a question is ‘Don't know’ this should be read as ‘No’.

5 Functionality Index

Determinants of factorized matrices,  
complex matrix   f03bnc
real matrix   f03bac
real symmetric band positive definite matrix   f03bhc
real symmetric positive definite matrix   f03bfc

6 Auxiliary Functions Associated with Library Function Arguments

None.

7 Withdrawn or Deprecated Functions

The following lists all those functions that have been withdrawn since Mark 24 of the Library or are in the Library, but deprecated.
Function Status Replacement Function(s)
f03aec Withdrawn at Mark 25 f07fdc and f03bfc
f03afc Withdrawn at Mark 25 f07adc and f03bac
f03ahc Withdrawn at Mark 25 f07arc and f03bnc

8 References

Fox L (1964) An Introduction to Numerical Linear Algebra Oxford University Press
Wilkinson J H and Reinsch C (1971) Handbook for Automatic Computation II, Linear Algebra Springer–Verlag