Linear Algebra Library
Single Precision Real

LINPACK_S is a FORTRAN90 library which solves systems of linear equations for a variety of matrix types and storage modes.

LINPACK has officially been superseded by the LAPACK library. The LAPACK library uses more modern algorithms and code structure. However, the LAPACK library can be extraordinarily complex; what is done in a single LINPACK routine may correspond to 10 or 20 utility routines in LAPACK. This is fine if you treat LAPACK as a black box. But if you wish to learn how the algorithm works, or to adapt it, or to convert the code to another language, this is a real drawback. This is one reason I still keep a copy of LINPACK around.

Versions of LINPACK in various arithmetic precisions are available through the NETLIB web site.


The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.


LINPACK_S is available in a C version and a C++ version and a FORTRAN77 version and a FORTRAN90 version and a MATLAB version.

Related Data and Programs:

BLAS1_S, a FORTRAN90 library which contains basic linear algebra routines for vector-vector operations, using single precision real arithmetic.

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

LINPACK_BENCH, a FORTRAN90 program which measures the time taken by LINPACK to solve a particular linear system.

LINPACK_C, a FORTRAN90 library which solves linear systems using single precision complex arithmetic;

LINPACK_D, a FORTRAN90 library which solves linear systems using double precision real arithmetic;

LINPACK_Q, a FORTRAN90 library which implements a few of the LINPACK library of linear solvers, using quadruple precision.

LINPACK_Z, a FORTRAN90 library which solves linear systems using double precision complex arithmetic;

NMS, a FORTRAN90 library which includes LINPACK.

SLATEC, a FORTRAN90 library which collects together a number of standard numerical libraries.

SVD_DEMO, a FORTRAN90 program which demonstrates the singular value decomposition for a simple example.

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


  1. Jack Dongarra, Jim Bunch, Cleve Moler, Pete Stewart,
    LINPACK User's Guide,
    SIAM, 1979,
    ISBN13: 978-0-898711-72-1,
    LC: QA214.L56.
  2. Charles Lawson, Richard Hanson, David Kincaid, Fred Krogh,
    Algorithm 539, Basic Linear Algebra Subprograms for Fortran Usage,
    ACM Transactions on Mathematical Software,
    Volume 5, Number 3, September 1979, pages 308-323.

Source Code:

Examples and Tests:

List of Routines:

You can go up one level to the FORTRAN90 source codes.

Last revised on 24 June 2009.