NFC Championship - Detroit Lions v San Francisco 49ers
Getty Images

The 49ers' legendary comeback in the NFC championship game win over the Lions was sparked by head coach Kyle Shanahan's dedication to his scheme that maximizes offensive efficiency. 

In the first half, Brock Purdy was 7 of 15 for 93 yards with no touchdowns and a pick. San Francisco was pedestrian on the ground with 38 yards on 13 carries.  

During the regular season, San Francisco motioned at the second-highest rate in the NFL (70.2% of all offensive snaps), and used motion at the snap on a whopping 37.7% of its offensive plays (per ESPN), the third-highest percentage in football. 

The second half featured more conventional 49ers offensive efficiency from Purdy. The second-year pro went 13 of 16 for 174 yards with one touchdown in the ferocious comeback in which San Francisco erased a 17-point lead. 

The 49ers also totaled 117 yards on 20 second-half rush attempts. 

How did they do it? 

Let's dive inside the schematics from Shanahan who, after halftime, authored a master class in motion utilization to gain advantages on the ground and through the air.

Starting here, on the first play of the second half, check how Shanahan got the advantage in the numbers game on an 8-yard scamper to the right by Christian McCaffrey

Motion and then more motion, right before the snap. 

And let's cut the field in half, through the center, to best understand what happened here. 

George Kittle motioned from left to right. After that movement, starting with the center, who was in prime position with the nose tackle aligned further down the line, away from the eventual run direction, the 49ers had four blockers for three in-the-box Lions defenders -- and the dynamic goes to four vs. three if you count Brandon Aiyuk and the Lions cornerback on the outside. 

Those type of advantages occur often in the ground game, and don't always equate to a successful run. 

Watch what happens a second before the snap. 

All-Pro fullback Kyle Juszczyk flew across the formation essentially at the snap, giving the 49ers a five-on-three (or six-on-four) advantage to that side of the field, including a bowling ball lead blocker charging in front of McCaffrey. 

With Aiyuk blocking down after his cornerback sunk before the snap, this was bound to be a positive gain on the ground for the 49ers. 

Actually, the fact the Lions were able to contain this run to just an 8-yard gain was impressive. Then, the 49ers were in second-and-2, a situation in which every offense wants to be. 

And what did Shanahan do? Sent out an extra offensive lineman and aligned Juszczyk attached to the formation on the right side of the now jumbo line. Clear run look. 

But it was play-action against an eight-man box and a single-high safety look -- plenty of room for Aiyuk and Deebo Samuel, the latter being the target on this pass, which amounted to a 26-yard gain.

In the regular season, Purdy's completion percentage jumped a mammoth 14.3% (!) when using play-action compared to when he didn't -- the third-largest jump in football -- and his yards-per-attempt average of 10.6 on play-action was the third-highest among qualifiers. 

While that drive ultimately stalled and led to a field goal, the 49ers hit on two of their offensive staples, which hadn't occurred in the first half. 

Quick, check the numbers game on this 2-yard run in the first quarter. Detroit had San Francisco outmanned, five to four. 

Totally different right? It was if in the first half, the 49ers were trying to outsmart the Lions with misdirection. That didn't work. Detroit was ready. 

Back to the second half -- this was the first play of the 49ers second drive, after the Lions failed to convert on fourth down. What do you notice? 

Yep, another Juszczyk late motion to give San Francisco a lead blocker with a running start on the play side of the field. While the 49ers didn't technically get a numbers advantage with Juszczyk's motion, they were even in blockers vs. defenders (two vs. two), which essentially made it was Samuel vs. a safety flying downhill. And the 49ers will take that matchup every time. 

Watch here, how the use of short motion into a stacked look at the top of the screen provided Kittle a free release off the line, which was all he needed to run a gorgeous sail route -- which may have featured him getting away with push off -- to get wide open for Purdy en route to a 28-yard gain. 

The pre-snap motion was humming for the 49ers in the second half. 

On what basically amounted to the dagger, this 25-yard run deep into the Lions end, already with a three-point lead, the 49ers won the numbers game again. This time, no motion was needed, believe it or not. 

Again, cut the offensive line in half. View it that way. From the center to the right side of the screen, the 49ers had five blockers to just four Lions defenders. The nose tackle aligned just a shade away from this run direction allowed center Jake Brendel to ignore the defensive line, and climb to the second level where he had an angle advantage on inside linebacker Alex Anzalone.

That left a pair of double teams up front and an awesome peel off the outside double team by veteran blocking tight end Charlie Woerner to dispatch the outside cornerback from filling and making a play on McCaffrey close to the line. 

Now, San Francisco's epic comeback wasn't solely thanks to scheme. Purdy had a 21-yard scramble as the comeback was mounting and a ridiculous escape from a sack on a 10-yard completion to Juszczyk. McCaffrey made plays. Oh yeah and Aiyuk's catch on a tipped pass deep down the field? That helped a bit too. 

But the 49ers got back to their core offensive concepts and philosophies, and they worked awesomely in the second half. Now they're going to another Super Bowl with Shanahan.