In the context of military aircraft and missiles, radars often have ranges of hundreds of kilometers, while thermal infrared sensors can only barely reach 100 km in the best of circumstances. But infrared radiation is emitted by the contact, while radar radiation is only reflected from the contact, leading to the received infrared radiation being proportional to $d^2$ (the inverse square law), while received radar signal is proportional to $d^4$ (inverse square law applied twice), with $d$ being the distance to the contact.
Reasoning from first principles, I would expect the extra $d^2$ penalty of radar signals to dominate other differences in how both sensors work, and thus infrared sensors to have a longer range than radars. But that is obviously not the case. Why not?
(I am specifically looking for the underlying differences in the physics, not for the details of specific radar or infrared systems.)
I am aware of a number of differences that are favourable to one type of sensor or the other, but I have no idea which of these (or something else entirely) is responsible for overcoming the $d^4$ radar signal handicap and causing radar to win in terms of detection range.
edit: As many of these differences are in orders-of-magnitude ranges, I expect that qualitative and order-of-magnitude numbers should be sufficient without needing to dive into detailed calculations. But I could be wrong.
Some of the differences I'm aware of:
|reflected, signal proportional to $d^4$
|emitted by contact, signal proportional to $d^2$
|tens of kW, but only a fraction being reflected by the contact
|10s to 100s of kW? A jet engine consumes megawatts worth of fuel when cruising, I'd expect a substantial portion of that is converted into heat.
|transmitter is very directional, but reflection is omnidirectional
|radar antennas are typically much larger than IR sensors
|If this was an issue IR sensors could be made much larger
|I think radio receivers are more sensitive, in terms of min. picowatts being detectable. Not sure
|Advanced photodetectors have a significant probability of detecting an individual photon. But IR has a lot more energy per photon than radar.
|Radar, being longer wavelength, gives a much lower angular resolution for the same aperture
|IR, being much shorter wavelength, gives a higher angular resolution
|the atmosphere also emits some infrared, though it being very cold high up I don't expect it is a lot
|depends on wavelength, but for some wavelengths it is quite low