Let B=⎡⎢⎣α1α2α3β1β2β3γ1γ2γ3⎤⎥⎦
AB=⎡⎢⎣010100001⎤⎥⎦⎡⎢⎣α1α2α3β1β2β3γ1γ2γ3⎤⎥⎦=⎡⎢⎣β1β2β3α1α2α3γ1γ2γ3⎤⎥⎦
BA=⎡⎢⎣α1α2α3β1β2β3γ1γ2γ3⎤⎥⎦⎡⎢⎣010100001⎤⎥⎦=⎡⎢⎣α2α1α3β2β1β3γ2γ1γ3⎤⎥⎦
AB=BA⇒β1=α2, β2=α1, β3=α3, γ1=γ2
5 places can be filled independently in 55=3125 ways =3125 matrices