It would seem that older witches are often called 'Madam' but is this definitely the criteria? E.g. Madam Pince the librarian, Madam Pomfrey, even Madam Hooch and Madam Rosmerta of The Three Broomsticks.
In one of the films at least, Hermione as Bellatrix gets called 'Madam Lestrange'
It is certainly not common in my area of the UK to title any women as 'madam' every time you speak to them, so JKR obviously made a decision to use this styling. Is it a historical reference, or an aspect used just to further set the wizarding world apart? Does she dislike Miss or Mrs?
Additional: I know what 'madam' means and where it comes from. I am asking why JKR chose to use this for a huge variety of women almost every time they are spoken to and about.