Adding population methods for matrix class