Where did the dude who thought of sonar get the idea?

Was he watching bats/sea creatures and thought, “hey, that would be really useful for boats,” or did he just kind of think it up on his own.

Wikipedia didn’t help much.

Without knowing anything in particular about the development of marine navigation sonar, many impressive systems don’t start out as ambitiously as they end up.

I’d guess that the first sonar research related to simple range finding. From there, it would have been noticed that a considerable amount of resolution can be gained from the various delays and reflections and work then turned to refining the imaging and directional technology.

Just my guess.

Prior to Sonar, submarines use hydrophones and judged direction and distance by sound. Sonar is a logical outgrowth of a more primitave technique.