Programming assignment for matrix inverse