Matrix Representation In Python