The ticket seller/collector called me 'madam' several times on the train this morning ("A return to Redhill? Certainly, madam", "Here you are, madam" and "Thank you, madam"), and, in fact, the staff on that particular train often do. I don't think they are being ironic, as they are polite to everyone. The use of the title may have declined since the 18th century, as the OED informs us, but it is alive and well on First Great Western Railways.
Madam comes from the French ma + dame (where dame is an old word for 'mother') and it was generally spelt madame with an e in English till around 1600. It was pronounced the French way at that time, too, with the stress on the second syllable.
Originally only women of high rank were addressed as 'madam(e)'. In Chaucer's Canterbury Tales the wives of aldermen had the right to be called 'madame'; poets of the 14th and 15th centuries addressed their beloveds as 'madame' and nuns were addressed as 'madame' until the Reformation. In the 16th and 17th centuries there was a tendency to use 'madam' to address married women and 'mistress' to address unmarried women.
Something that often happens with words describing women has happened with madam, too -- namely, they soon gain a sexual or pejorative connotation (as mistress, queen, tramp - see this old post of mine). One of the well-known meanings of 'madam' is brothel-keeper (other former and current definitions include a kept mistress, a hussy or minx and nonsense or humbug).
You don't often need to say the plural of the polite term of address 'madam', but if you did want to, you would have to say 'mesdames' (which is also used as a plural of Mrs in formal contexts). Madams is the plural of madam in the bawd and hussy senses (eg "little madams" said of precocious little girls).