Matthew Koma hilariously dressed up as wife Hilary Duff's ex Joel Madden for a Halloween double date with Joel and his wife Nicole Richie.

Matthew Koma pranked wife Hilary Duff's ex Joel Madden on Halloween

Matthew Koma pranked wife Hilary Duff's ex Joel Madden on Halloween

Musician Matthew and former Disney star Hilary wore matching MDDN hats - the name of Good Charlotte rockers Joel and Benji Madden's music company - and shades as the 'Lizzie McGuire' star went as his twin Benji.

Matthew captioned a snap of the pair: "Going as @benjaminadden and @joelmadden to a Halloween dinner with @joelmadden and @nicolerichie."

Hilary, 37, dated the 'Lifestyles of the Rich and Famous' singer, 45, from 2004 to 2006, and previously revealed that she has an amazing friendship with Joel and his family.

Appearing on 'Watch What Happens Live' last year, she said: "I have a good relationship with their whole family. We actually hang out all the time.

"I was just in [Nicole's] driveway, honking for her to come drink wine with us the other day. She wouldn't, she was asleep by eight.

"But now we get them to hike together all the time. And you know what? It’s lovely.”

Hilary also revealed that Matthew, 37, likes to play pranks on her and Joel – whose brother Benji is married to Cameron Diaz.

She said: "My husband is a giant troll, it’s one of the best things about him. Right when they moved in, for some reason Matt photoshopped a picture of Joel and [brother Benji Madden] in a photo with me on Valentine’s Day with like, ‘Happy Valentine’s Day, honey.'”

Speaking in 2007 after their split, Joel insisted he and Hilary were still close.

He said: "Every girl I’ve ever dated I have respect for, and I always try to leave them on good terms. I don’t see the necessity to be friends with anyone you’ve dated but definitely out of respect of the time, you have to be kind of respectful and that’s what I try to do.

"People can say or think whatever they want … so in my reality, it’s kind of irrelevant. I’m always the kind of person that does the right thing and keeps my side of the street clean."