Vector Representation of Arbitrary-sized Matrices