Final answer:
Set M has 5 elements because the formula for the number of proper subsets of a set is 2^n - 1, and given that there are 31 proper subsets, we solve for n to find that M contains 5 elements.
Step-by-step explanation:
If set M has 31 proper subsets, this means we want to find a set M with a certain number of elements such that when we calculate all the possible subsets (excluding the set itself), we get 31. The number of all subsets of a set is given by 2n, where n is the number of elements in the set.
This includes both proper subsets and the set itself as a subset. To find the number of proper subsets, we subtract 1 from the total number of subsets. This gives us 31 = 2n - 1. By trying different values of n, we soon see that 25 = 32 and hence 25 - 1 = 31. Therefore, set M must have 5 elements.