Week 3 programming assignment, inverting a matrix efficiently