The home side started in ominous fashion when Mesut Ozil played in Alvaro Morata to calmly slide home on three minutes.
Ozil bagged another assist nine minutes later when his near post free-kick was met by Ramos who powered home with his head.
Ramos' red card was an innocuous one. Seconds after a soft first booking, the Spaniard handled innocuously outside his own area and was harshly dismissed.
Rayo had plenty of chances to get back into the game. Roberto Trashorras fired over on the stroke of haltime and Lass and Piti both went close either side of the hour mark.
Sami Khedira almost put the game to bed on seventy-four minutes, but his curling effort flew narrowly wide of the mark.
Chori Dominguez rattled the woodwork thirteen minutes from time with a fine half-volley and Leo Baptistao failed to make meaningful contact when un-marked at the back post two minutes later.
Jose Mourinho will be pleased with the way his side stayed compact with ten men, hanging on to move within four points of city rivals Atletico. Defeat for Rayo leaves them in seventh place in La Liga.