# napack

napack, a FORTRAN77 code which handles various common tasks in numerical linear algebra and optimization, by William Hager.

napack may be used to

• solve linear systems;
• estimate the condition number of a matrix;
• compute the norm of a matrix;
• compute the determinant of a matrix;
• multiply a matrix by a vector;
• invert a matrix;
• solve linear least squares problems;
• perform unconstrained minimization of a function f(x);
• compute eigenvalues and eigenvectors of a matrix;
• compute the singular value decomposition of a matrix;
• compute the QR factors of a matrix.

The package has special routines for general, band, symmetric, indefinite, tridiagonal, upper Hessenberg, and circulant matrices.

Many of the routines use a standard naming convention, in which the first letter indicates the matrix type, and the remainder of the name indicates the operation.

• B, Band matrix;
• C, Complex matrix;
• E, Upper Hessenberg matrix;
• H, Symmetric band matrix;
• i, Symmetric matrix (symmetric pivoting);
• K, General matrix (complete pivoting);
• O, Circulant matrix;
• P, Tridiagonal matrix (partial pivoting);
• S, Symmetric matrix;
• T, Tridiagonal matrix;

The original, true, correct version is available through NETLIB: http://www.netlib.org/napack/index.html".

### Languages:

napack is available in a FORTRAN77 version.

### Related Data and Programs:

BLAS1, a FORTRAN77 library which contains level 1 basic linear algebra routines.

CONDITION, a FORTRAN77 library which implements methods of computing or estimating the condition number of a matrix.

DLAP, a FORTRAN90 library which carries out the iterative solution of sparse linear systems.

GSL, a C++ library which includes many linear algebra routines.

LAPACK_EXAMPLES, a FORTRAN77 program which demonstrates the use of the LAPACK linear algebra library.

LINPACK, a FORTRAN77 library which factors and solves systems of linear equations in a variety of formats and arithmetic types.

LINPLUS, a FORTRAN77 library which factors and solves systems of linear equations in a variety of formats and arithmetic types.

MGMRES, a FORTRAN77 library which applies the restarted GMRES algorithm to solve a sparse linear system.

SPARSEKIT, a FORTRAN77 library which carries out operations on sparse matrices, including conversion between various formats.

TEST_MAT, a FORTRAN77 library which defines test matrices, some of which have known determinants, eigenvalues and eigenvectors, inverses and so on.

William Hager

### Reference:

1. William Hager,
Applied Numerical Linear Algebra,
Prentice-Hall, 1988,
ISBN13: 978-0130412942,
LC: QA184.H33.
2. William Hager,
Condition Estimates,
SIAM Journal on Scientific and Statistical Computing,
Volume 5, Number 2, June 1984, pages 311-316.

### Source Code:

Last revised on 15 October 2023.