In the phrase "Ich danke der Frau", why is it "der" Frau? I don't understand why this is a male article for a feminine noun.
The sentence uses the dative case, because of the verb "to thank". (there are four cases In German: nominative, accusative, dative genitive, which all help define an action of a phrase or word in a sentence).
The nominative case is the regular case for words (there is no action on them) and will be the case applied when you learn the articles ("the", "a") in their basic form. It all gets more difficult when cases change, like in your example sentence.
In the dative case, this happens:
der changes to dem
die to der
das to dem
die (plural) to den
Hence "ich danke der Frau".
Great answers above: just in case it helps to see the analogy with modern English, note that we still have the remnants of the case system in our pronouns, with the subject pronouns (I/he/she) being the equivalent of the German nominative and the object pronouns (me/him/her) serving for both the German dative and accusative. (Not surprisingly given how close our languages are, it wasn't too many centuries ago that we actually had separate dative and accusative pronouns ourselves - but they have since merged into what we have now.)
So the use of cases is not so clear in "I thank the woman" but you can see it more clearly when we say "I thank her."
That's the basic idea - it's just a wee bit more complicated in German, since it matters for articles (as well as the pronouns) plus there's a couple more of them to keep track of conceptually.
It's not a mal article in this case. It's the "dative + feminine" article.
Indeed there are many "mode" in german :Nominative, accusative and dative (these names are the french names they might be different in english ). These modes are linked to the function of the word un the sentence. (here the frau is the person WHOM you think about) Usually you can find this table:
Hoping it will help. Regards