updated matrix inversion functions
Merge https://github.com/alex-titire/ProgrammingAssignment2