Do a row switching transformation.
new matrix that rowIndex1th row and rowIndex2th row has exchanged.