3 of 6 added 700 characters in body

# MATL, 28 27 bytes

tZyZ}:w:!+-1y^7MGn/*-X:K#S)


Input is in the form

[1 2 3; 5 6 4; 9 7 8; 1 2 3]


Try it online!

t       % input 2D array. Duplicate
ZyZ}    % get size as length-2 vector. Split into two numbers: r, c
:       % range [1,2,...,c] as a row vector
w:!     % swap, range [1;2;...;r] as a column vector