In the meantime also take a look at the matrix mul code I've written here: http://rosettacode.org/wiki/Matrix_multiplication#D In the first entry you see no whole transposition up front. Storing the whole matrix in a 1D array is probably more efficient. Bye, bearophile