Gaussian Elimination

TOMS423 is a FORTRAN77 library which implements ACM TOMS algorithm 423, for Gaussian elimination to factor a matrix and solve a related linear system.

While the text of many ACM TOMS algorithms is available online through ACM: or NETLIB:, most of the early algorithms are not available. This is one of them. I typed it in.


call decomp(n,ndim,a,ip)
computes the LU factorization of an N by N matrix A, stored in an array with leading dimension NDIM. The vector IP returns pivot information.
call solve(n,ndim,a,b,ip)
solves a linear system A*X=B, after A has been factored by DECOMP. B contains the right hand side on input, and the solution on output.


TOMS423 is available in a FORTRAN77 version.

Related Programs:

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

LINPACK, a FORTRAN77 library which solves linear systems for a variety of matrix storage schemes, real or complex arithmetic, and single or double precision.


Cleve Moler


  1. Cleve Moler,
    Algorithm 423: Linear Equation Solver,
    Communications of the ACM,
    Volume 15, Number 4, April 1972, page 274.

Source Code:

Examples and Tests:

List of Routines:

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

Last revised on 30 November 2005.