Update matrix.py: getting conflict errors

I was getting conflict errors, not sure why.