Coded Functions

The functions were coded to compute inverse of a matrix if it hasn't
already been computed.