Implement Matrix2d class
Not tested