A drawer contains

22 black socks, 22 white socks, and 22 blue socks. 
If the light is off and Matt reaches into the drawer to get his socks, what is the minimum number of socks he must pull out in order to be sure that he has a matching pair?

40

To find the minimum number of socks Matt must pull out to be sure that he has a matching pair, we need to consider the worst-case scenario.

In this case, the worst-case scenario is when Matt selects socks of all different colors before finally getting a matching pair. Therefore, to guarantee a matching pair, Matt needs to pull out at least one more sock than the total number of different colors.

Given that there are 3 different colors (black, white, and blue), Matt needs to pull out 3 + 1 = 4 socks to be sure that he has a matching pair.

To be sure that Matt has a matching pair of socks, he needs to consider the worst-case scenario. In this case, the worst-case scenario is that the first sock he pulls out is of a different color than the next sock. Therefore, Matt needs to pull out 3 socks to guarantee that he has a matching pair.

Here is the reasoning behind it:
1. He could pull out a black sock. The next sock he pulls out could be white or blue.
2. He could pull out a white sock. The next sock he pulls out could be black or blue.
3. He could pull out a blue sock. The next sock he pulls out could be black or white.

So, by pulling out 3 socks, Matt will have at least one matching pair in the worst-case scenario.