c. 1300, formal term of address to a lady (a woman of rank or authority, or the mistress of a household), from Old French ma dame, literally "my lady," from Latin mea domina (see Donna, and compare madonna). It became a conventional term of address to women of any degree (but chiefly to the married and matronly); also "a woman of fashion or pretension" (often with a suggestion of disparagement) by 1590s. From 1719 as "a courtesan, a prostitute;" the meaning "female owner or manager of a brothel" is attested by 1871.
The title of Madam is sometimes given here, and generally in Charleston (S. Carolina), and in the South, to a mother whose son has married, and the daughter-in-law is then called Mrs. By this means they avoid the inelegant phraseology of old Mrs. A., or the Scotch, Mrs. A senior. [Sir Charles Lyell, "A Second Visit to the United States of North America," 1849]