Two goals by Imanol Agirretxe in the opening 14 minutes set the Basque side on their way to victory and although they took their foot off the gas somewhat in the second half, they were always in control of the game.
This was Sociedad's fifth win in seven games and means they maintain their grip on fourth spot in the La Liga table, staying four points clear of Malaga and moving four points ahead of Valencia.
The visitors did not take long to impose themselves on the game and arrived in the opposing area with ease. They had already created two dangerous opportunities before they took the lead on six minutes.
Antoine Griezmann controlled a long punt up field on the left wing and held the ball up for Alberto De La Bella to run onto and lay off for Agirretxe to stroke home from six yards out.
They doubled their lead seven minutes later.
Carlos Martinez launched a long ball on the volley which Xabi Prieto ran onto unchallenged and in plenty of space, allowing him to control the ball and then play a simple pass across to Agirretxe, who converted from close range again.
Both goals had arrived from the left-hand side and Rayo coach Paco Jemez took action immediately, making a double substitution with only 15 minutes of the game played, taking off right winger Lass and right back Tito and bringing on Jose Carlos and Anaitz Arbilla.
The changes shored up their defence and made them less exposed but it had little effect on their ability to create chances that would have got them back in the game.
They nearly pulled a goal back just before half-time when Piti burst down the right-hand side to cross to Leo Baptistao, but De La Bella got there first to clear the ball away.
The hosts improved in the second half and saw more of the ball but were still unable to break down their opponents.
Jemez made an attacking substitution in taking off midfielder Roberto Trashorras for striker Andrija Delibasic, who had a chance to score a minute after coming on, but shot over the bar after a cross from Chori Dominguez.
Agirretxe then wasted an opportunity to bag a hat-trick, firing well over the bar following a fine pass by Prieto.