Handle column -> row major in matFormat correctly

We do need to do a transpose, but the inital matrix should have columns and
rows reversed, so that the matrix side remains correct.