The term "madam" (which is derived from the French for "woman") can have several meanings. It can be an address to a woman, such as, "may I help you, madam?". It can be a term of respect, instead of just calling a woman, "hey you". It also is sometimes used to referred to the head woman of a house of prostitution.
Not sure on this one but I thought I would throw in my two cents , Think it means my lady and dates back to the 13th century , btw how come its a penny for your thoughts but i just throw in two cents , somebody is making a cent