Matrix Inverse code for Programming Assignment 2

This code is tested thoroughly for several inputs.