Hey Jtmartz.

There are some formulas to calculate inverses but the general way is to look at the multiplication group table for the congruence classes since [ab] = [a][b] (Mod n) which means if you have [a] and need to get [b] then [ab] = 0 (mod n).

If the group operation is [a] + [b] instead [ab] then use that but the idea is the same.