If A is non-singular, inv(A) gives its matrix inverse. It returns an error if A is singular.
It reports a warning, and proceeds to compute the inverse anyway, if the reciprocal of the condition number of A is less than norm(A)*eps. That means, A nearly singular or badly conditioned).