Do you know what "\(\displaystyle Z_{31}\)" is? That isn't clear from what you say. Two numbers, x and y, are "multiplicative inverses" in \(\displaystyle Z_{31}\) if and only if xy= 1 (mod 31) which means that xy is some multiple of 31 plus 1: xy= 31n+ 1. So one way to show that every member of \(\displaystyle Z_{31}\), except 0, has a multiplicative inverse is to go through all such 31 members and use that formula to show what the multiplicative inverse is.
For example, a multiplicative inverse of 7, x, must satisfy 7x= 31m+ 1 for so integer m. One way to do that is to try m= 1, 2, 3, ... until we get to a multiple of 7:
31*1+ 1= 32 is not a multiple of 7.
31*2+ 1= 63 is a multiple of 7: 7(9)= 63= 1 (mod 31).
The multiplicative inverse of 7 is 9 and the multiplicative inverse of 9 is 7.
Obviously the multiplicative inverse of 1 is 1 and we get two multiplicative inverse each time so we need to do this 15 times to determine all multiplicative inverses.