The former Chelsea and PSG defender was due to leave the Emirates at the end of June when his current deal expires, but his services have been retained for at least another season.
After being brought on as a substitute, he failed to block a Kevin De Bruyne pass to Raheem Sterling for the first goal before then giving away a penalty for a professional foul on Riyad Mahrez inside the box, for which he was sent off.
Luiz took full responsibility for his display afterwards, while Sky Sports commentator Gary Neville said after the dismissal: “I have no words. He never learns.”
The news broke as Arsenal confirmed three other pieces of business, with Cedric Soares and Pablo Mari making their loan deals permanent, and Dani Ceballos extending his loan from Real Madrid until the end of the current season.
Arsenal technical director Edu is happy with the business conducted.
"I am really happy that we will have these players in our squad for the future," he said.
"They have been part of the long-term technical plan [manager] Mikel [Arteta] and I have developed. They bring the right balance to our squad.
"David is a really important player for us. He has played most of our matches this season and has been important for the team," added Edu.
"His passing, his communication with the team on and off the pitch - he helps everyone."
Arsenal followed up the defeat by Manchester City with a damaging loss against Brighton, and face Southampton away in their next fixture on Thursday.