Insanity, in Moby-Dick, means having a single-minded obsession over one thing or being completely possessed by one overpowering desire. Functioning highly while being completely mad is certainly an option. The most insane monomaniac (person obsessed with one thing), in this case Captain Ahab, can still behave with cool rationality as he calculates his ship’s course and manages his crew – it’s only his goal that’s totally ridiculous. Other, saner characters seem helpless in the face of his driven, controlled, all-consuming obsession. Another kind of madness the novel explores is the effect of desperate depression on an otherwise normal character.
By depicting single-minded obsession as an extreme form of madness, Moby-Dick implies that sanity can only consist of moderation and the relinquishing of bad feeling.
Pip’s madness, which he expresses in monologues of witty sound-play and metaphorical association, associates him with the tradition of the Shakespearean fool.