Added functionality for finding a matrix inverse.