Modular multiplicative inverse
Mathematica, 14 bytes

Obligatory Mathematica builtin:

ModularInverse


It's a function that takes two arguments (a and b), and returns the inverse of a mod b if it exists. If not, it returns the error ModularInverse: a is not invertible modulo b..