LAPACK


LAPACK is a standard software library for numerical linear algebra. It provides routines for solving systems of linear equations and linear least squares, eigenvalue problems, and singular value decomposition. It also includes routines to implement the associated matrix factorizations such as LU, QR, Cholesky and Schur decomposition. LAPACK was originally written in FORTRAN 77, but moved to Fortran 90 in version 3.2. The routines handle both real and complex matrices in both single and double precision.
LAPACK was designed as the successor to the linear equations and linear least-squares routines of LINPACK and the eigenvalue routines of EISPACK. LINPACK, written in the 1970s and 1980s, was designed to run on the then-modern vector computers with shared memory. LAPACK, in contrast, was designed to effectively exploit the caches on modern cache-based architectures, and thus can run orders of magnitude faster than LINPACK on such machines, given a well-tuned BLAS implementation. LAPACK has also been extended to run on distributed memory systems in later packages such as ScaLAPACK and PLAPACK.
LAPACK is licensed under a three-clause BSD style license, a permissive free software license with few restrictions.

Naming scheme

Subroutines in LAPACK have a naming convention which makes the identifiers very compact. This was necessary as the first Fortran standards only supported identifiers up to six characters long, so the names had to be shortened to fit into this limit.
A LAPACK subroutine name is in the form pmmaaa, where:
For example, the subroutine to solve a linear system with a general matrix using real double-precision arithmetic is called DGESV.
NameDescription
BDbidiagonal matrix
DIdiagonal matrix
GBgeneral band matrix
GEgeneral matrix
GGgeneral matrices, generalized problem
GTgeneral tridiagonal matrix
HB Hermitian band matrix
HE Hermitian matrix
HGupper Hessenberg matrix, generalized problem
HP Hermitian, packed storage matrix
HSupper Hessenberg matrix
OP orthogonal matrix, packed storage matrix
OR orthogonal matrix
PBsymmetric matrix or Hermitian matrix positive definite band
POsymmetric matrix or Hermitian matrix positive definite
PPsymmetric matrix or Hermitian matrix positive definite, packed storage matrix
PTsymmetric matrix or Hermitian matrix positive definite tridiagonal matrix
SB symmetric band matrix
SPsymmetric, packed storage matrix
ST symmetric matrix tridiagonal matrix
SYsymmetric matrix
TBtriangular band matrix
TGtriangular matrices, generalized problem
TPtriangular, packed storage matrix
TRtriangular matrix
TZtrapezoidal matrix
UN unitary matrix
UP unitary, packed storage matrix

Details on this scheme can be found in the section in LAPACK Users' Guide.

Use with other programming languages

Many programming environments today support the use of libraries with C binding. The LAPACK routines can be used like C functions if a few restrictions are observed.
Several alternative language bindings are also available: