At the close of round 21 in La Liga Real Madrid remain where they started, one point behind Barcelona and Atlético Madrid in the table. After spending most of the first half of the season at least five points adrift of the leaders, it's a position that Carlo Ancelotti will be pleased with. How did they turn things around? A change of formation helped.

It was a bit comical to hear some voices trying to write off Madrid back in later October after a 2-1 loss against Barcelona at the Camp Nou. You can certainly sympathize with their reactionary thinking considering that ten games into the season Madrid were seven points back of the leaders and had suffered losses at the hands of both Barca and Atléti. To dismiss a team filled with as much talent as Madrid that early, though, was foolish -- there was still plenty of football left to be played.

Slowly, over the next two months, Madrid chipped away at that points lead by simply playing better football. Since that loss to Barcelona, Los Blancos have not lost and their only slip up was a 2-2 draw against Osasuna. During that stretch Atlêti three draws while Barca have two, with one coming against the other in early January.

The inevitable ebb and flow of a long season opened the door for Madrid to re-enter the title race -- after some tactical tweaking.

The most obvious difference between Madrid in the opening months of the season and the team that has gone on a 11 match unbeaten run since the loss to Barca is the defense. In the first ten matches of the season Madrid allowed nine goals and only managed two clean sheets. In the eleven subsequent games they've allowed ten goals while collecting six clean sheets, including four straight shutouts in league play.

The goals allowed per game numbers aren't that different but Sevilla's three goals in a match won 7-3 by Madrid skews that figure somewhat. Focus instead on the shutouts. Focus on the fact that in the last eight games Madrid have not allowed a goal in six of them. That's an impressive turnaround for a team that was giving up roughly a goal per game for the first ten rounds of the season.

So what's the difference between then and now?

Dani Carvajal settling in after returning to Madrid during the summer and taking ownership of the right back role is a big part of the defensive improvement. Marcelo getting healthy after missing a couple matches early in the year has helped as well. Ancelotti has been able to settle of a consistent back line of Carvajal, Sergio Ramos, Pepe and Marcelo which has created stability in the defense in front of Diego López.

The return of Xabi Alonso in the midfield has also helped, especially after Sami Khedira went down with a knee injury in international duty.

The key change, though, came in the rest of the midfield where Luka Modrić was installed as the first choice starter and Ángel di Maria began playing in a deeper midfield role in front of Marcelo. The switch to a 4-3-3 from a 4-2-3-1 centered around Isco has helped Madrid be more stable defensively, and the results have proven it's the right move.

Marcelo is now able to get forward more effectively, with Di María capable of handling the space on the left wing created by the fullback's adventures forward. Before the change Madrid were relying entirely on Alonso and Ramos to cover the gap since Cristiano Ronaldo isn't known for his proclivity towards tracking back. Di María understands how to play on the wing and it's helped improve Madrid's shape and stability.

During the last three matches with that 4-3-3 in place, Ancelotti has used the same exact lineup and watched as his team have outscored opponents 7-0 while taking advantage of Barca and Atléti's recent stumbles. Even with Gareth Bale still struggling to settle and adapt to playing a more forward role on the right wing, Madrid have looked better and are getting results.

There's still a long way to go in the season and Madrid face a busy schedule with Champions League and Copa del Rey matches. Fortunately for Madrid they've found a formation and lineup that is working for them and it's one that should serve them well going forward in the league.

For the neutrals, they've also given us the possibility of one of the best title races in Spain in years.