Added matrix transposition.