(A) What is the matter with you?
What is the subject of (A)?


The subject is matter.
What is one of those hard-to-classify words that introduce questions. Grammarians tend to call them interrogative pronouns. It's usual in a question to find the subject after the verb. (Middle-school English teachers love this stuff. No one else much cares.)