The visitors piled pressure on the home defence early on and were duly rewarded in the 19th minute when Sergio Ramos’s miscued overhead kick fell into the path of Borja Mayoral, who provided the finish.
Nine minutes later, a cracking volley from Kévin Rodrigues slipped through Keylor Navas’s fingertips and Sociedad were level against the run of play.
In the 36th minute, after Rodrigues had hit Navas’s crossbar, the Sociedad goalscorer chased the Madrid counter only to divert Mayoral’s cross into his own net.
Tensions spilled over as Diego Llorente, Marco Asensio, Asier Illarramendi, and Adnan Januzaj were all booked in between Real Madrid’s second goal and the half-time whistle.
The visitors went into the break 2-1 ahead — a scoreline which perhaps flattered Sociedad, who had been comprehensively outplayed.
The second half continued where the first left off, with Real Madrid dominating play and Real Sociedad occasionally looking dangerous.
The hosts felt they should have had a penalty in the 48th minute when Theo Hernández appeared to have held Xabi Prieto in the box. However, referee Ignacio Iglesias Villanueva was unmoved.
Thirteen minutes later, an inch-perfect ball over the top from Isco found Gareth Bale, who lobbed the ball over Gerónimo Rulli and into the net, doubling the visitors’ lead.
Casemiro was booked three minutes later in what was to be the final yellow card of the game.
Sociedad created some chances in the latter stages of the match, but they looked to have lost confidence and struggled to find a finish.
There was a late blow to Zinedine Zidane’s side as Hernández had to be replaced by Nacho after an awkward landing.
However, the Frenchman will go back home happy with his injury-hit side as they claimed their 11th away La Liga win on the trot.