What if he actually is the smartest person in the room? Maybe even by far?
On the other hand, if you have that kind of attitude it will probably be mutually beneficial if you stay the hell away from him so it's a good strategy.
Sometimes he's right, though; and if you can swallow your distaste you can learn quite a bit. Fortunately, it's easy to tell if a vain person's judgement of his own intelligence is correct if you're smarter than he is.