Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Linear Algebra Module User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

4.4 Calculating the Determinant, Inverse, and Condition Number

Factorizations are useful for many calculations besides solutions to systems of equations. The Linear Algebra Module factorization classes include member functions for calculating the determinant, condition number, and inverse of a matrix.

4.4.1 Determinants

Calculating the determinant of a matrix is an inexpensive simple process, given its factorization. If F is a float precision factorization, then its determinant can be calculated using:

4.4.2 Matrix Inverses

Matrix inverses are often used in describing matrix algorithms. However, in practice, it is almost never necessary to calculate the inverse of a matrix explicitly. In almost every case, the problem can be solved much more efficiently by using a factorization. Nevertheless, for those rare occasions when you actually need the explicit inverse, a function is provided for its calculation. For example, to find the inverse of a double precision symmetric matrix whose factorization is the variable fact of type RWSymFact<double>, you use:

4.4.3 Condition Number

The condition number of a matrix describes how sensitive it is to errors in the right-side vector when solving systems of equations. The factorization classes can calculate an estimate of the reciprocal condition number. When this number is near 1, the matrix is said to be well-conditioned. When the reciprocal condition number is near 0, the matrix is ill-conditioned. The solutions obtained for ill-conditioned matrices may not be very accurate. Consult a linear algebra text for more information on conditioning. You compute the condition number like this:

To compute the condition, the factorization class must do a little extra work while constructing the factorization; it must compute the norm of the system matrix. If you know that you will not need the condition number, you can save some computation by using the optional bool parameter on the factorization constructor. See the SourcePro C++ API Reference Guide for details.



Previous fileTop of DocumentContentsNo linkNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo, and SourcePro, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.