Creating a matrix and its transposition