Matrix Tranposition in Place

TOMS467 is a FORTRAN77 library which implements ACM TOMS algorithm 467, to transpose the elements of a matrix in place.

The text of many ACM TOMS algorithms is available online through ACM: or NETLIB:


call xpose ( a, n1, n2, n12, moved, nwork )
where A is the matrix to be transposed, stored as a vector, N1 and N2 are the row and column dimensions, N12 is the product of N1 and N2, MOVED is a logical workspace vector, and NWORK is the length of MOVED, which should be at least (N1+N2)/2.


TOMS467 is available in a FORTRAN77 version.

Related Data and Programs:

MINPACK, a FORTRAN90 library which contains routines which can minimize the absolute value of a function of several variables.

TEST_OPT, a FORTRAN90 library which contains routines defining a number of scalar functions of multiple variables to test minimization routines.


  1. Norman Brenner,
    Algorithm 467: Matrix Transposition in Place,
    Communications of the ACM,
    November 1973, Volume 16, Number 11, pages 692-694.

Source Code:

Examples and Tests:

List of Routines:

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

Last revised on 03 December 2005.