
La Mode, 1836.
(Met Museum)
During the nineteenth century, the proper address for an unmarried young lady was very much a matter of rank—both the rank of the one being addressed and the one doing the addressing. For instance, a maidservant might acknowledge a command given by her young unmarried mistress by saying “Yes, miss.” Whereas a gentleman might address the same unmarried young lady with a “Yes, madam” or “Yes, ma’am.” According to How to Do It (1864):
“We address a married lady, or widow, as Madam, or by name, Missis or Mistress Jones. In answering a question, we contract the Madam to ma’am — as ‘yes, ma’am, no ma’am, very fine day, ma’am.’ A single lady, of a certain age, may also be addressed as Madam.”
As referenced above, proper address for an unmarried young lady also depended on her age. If she was old enough to marry—such as Elizabeth Bennet in Jane Austen’s Pride and Prejudice—a gentleman would address her as “Madam” or “Ma’am.” As an example, consider Mr. Darcy’s reply to Elizabeth’s rejection of his proposal:
“You have said quite enough, madam. I perfectly comprehend your feelings, and have now only to be ashamed of what my own have been.”

Les Modes Parisiennes, 1860.
(Met Museum)
It wasn’t always considered bad form to address an unmarried young lady as “Miss.” When coupled with a first name or surname, the honorific was wholly appropriate. How to Do It explains:
“A young lady, if the eldest of the family, unmarried, is entitled to the surname, as Miss Smith, while her younger sisters are called Miss Mary, Miss Julia, &c.”
Using “Miss” all by itself, however, was never appropriate unless one was of the servant or lower classes. As How to Do It states:
“The Term ‘Miss,’ used by itself, is very inelegant.”
Occasionally, in my writing, I come across a reader who is thrown by the fact that a hero or other character in one of my books addresses the unmarried heroine as “Ma’am” instead of “Miss.” I hope this brief post gives you some insight into why he does so.
Sources
Austen, Jane. Pride and Prejudice. Ed. Donald Gray. Norton Critical Editions. 3rd ed. New York: Norton, 2002.
How to Do It. New York: John Tingley, 1864.