No matter what won't there always be a "gap" since there would always be a column of zeroes? Also in the book the number of "switches" is given as n(n-1)/2 which using the logic of swapping rows to create a diagonal doesn't make sense (like if n = 5 that would be 10 swaps!)
Before consulting the web I thought the answer would have to do with cofactors and using the formula
where the -1 and M multiply to be the cofactor of element a. As you can probably tell I'm pretty lost so any help would be great!