This highly specialized life trait is affecting vast portions of the genetic makeup of the organism. ~ English biologist Joe Parker
Echolocation is a complex trait, involving production, reception, and sensory processing of ultrasonic pulses. It is used for orientation, avoiding obstacles, communication, and hunting.
Echolocation evolved in bats as a way to fly at night without banging into things. Fruit bats, also known as the flying foxes, produce clicks with their wings that allow them to hunt in darkness via echolocation. This is more rudimentary than the oral biosonar of other bats, which arose independently at least twice.
Echolocation also convergently evolved in dolphins and toothed whales 34 MYA. Narwhals, the unicorns of the sea, are superb practitioners: equal to bats in precise employment of echolocation.
Echolocation is not a matter of a few genes. It involves multiple genetic complexes ranging over hundreds of genes, geared to the numerous traits required for an organism to echolocate.
In echolocating mammals there were identical changes in nearly 200 genes – incredible! ~ Joe Parker
Like vision, echolocation beautifully illustrates adaptation as a teleological exercise.
Blind cavefish nimbly navigate the pitch-black caves where they live, never bumping into obstacles. In a liquid variant of echolocation, cavefish see through suction.
Sucking water into its mouth, a cavefish creates currents in the surrounding water that flow around and reverberate off objects. A fish detects these subtle water movements via lateral line sensors on it flanks.
As with other fish, the blind cavefish mentally maps nearby terrain by subtracting its own wave production while swimming.
When approaching large objects, cavefish suck more often: getting better resolution by feedback from more frequent pressure waves. From a physics standpoint this is the same technique that echolocating animals employ.