11.1 The Determinant

   

 
Java Number Cruncher: The Java Programmer's Guide to Numerical Computing
By Ronald  Mak

Table of Contents
Chapter  11.   Matrix Inversion, Determinants, and Condition Numbers


Once a square matrix A has been decomposed into matrices L and U, the determinant of A is the product of the diagonal elements of U. However, each row exchange that we do for partial pivoting during the decomposition flips the sign of the determinant:

graphics/11equ01.gif


In class LinearSystem of package numbercruncher.matrix (see Listing 10-0 in Chapter 10), variable exchangeCount keeps track of the number of row exchanges, and if this value is odd, we need to negate the value of the product of the diagonal elements of LU .

Using LU decomposition is a much more efficient way to compute a determinant than the traditional way, especially for larger matrices. The traditional way, expansion by cofactors, is actually a recursive algorithm.


   
Top
 


Java Number Cruncher. The Java Programmer's Guide to Numerical Computing
Java Number Cruncher: The Java Programmers Guide to Numerical Computing
ISBN: 0130460419
EAN: 2147483647
Year: 2001
Pages: 141
Authors: Ronald Mak

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net