I recently came across this phrase in my vocab book: "Elle s'est mariée avec mon frère." Why is this sentence conjugated with être instead of avoir? And why is there a extra e after marié(e). Shouldn't the participe passé stay the same regardless of gender.
The verb is se marier, which is a pronominal verb. Thus it has to be conjugated with être, not avoir. With pronominal verbs, past participles agree in gender and number with the subject. So you have "Elle s'est mariée..." but "Il s'est marié...". This goes for other verbs as well.
Another example: I would say "je me suis réveillé tôt ce matin" while my sister would say "je me suis réveillée tôt ce matin."
Here's a quick rundown on pronominal verbs and the passé composé, with exercises.
To build on Robert Ward's answer, the reason that se marier is a pronominal verb will become clearer when you look at the different words French has for "to marry".
In the following English sentence, will the new husband be Father McCarthy, or someone else?
Lyse liked Pastor Jean, but she wanted Father McCarthy to marry her when the time came.
We have some ambiguity because the word has two meanings: to marry someone as in "to become a spouse", and to marry someone as in "to cause two people to become spouses".
French has separate words for this:
épouser : « prendre pour époux ou épouse » (take as husband or wife)
marier : « unir un homme et une femme par le lien conjugal » (cause two people to be married)
So épouser is what each spouse does and marier is what a priest does. As a result, if the woman in your question wants to marry your brother, she must épouser him.
But there is one more option:
se marier : « s'unir par le mariage » (get married)
You can think of this as literally "marrying yourself off to someone". You make yourself one of the two people you are "causing to be married".
That's why this verb is pronominal and the conjugation rules that Robert cited come into play.