Transformation matrix to column-major vector