As the 2018 Winter Olympics wind to a close, we wanted to take a closer look at the science behind two of the most common feats on ice: the spin and passing a puck.

Thanks to Raleigh Center Ice, we got rink time to demonstrate just how integral instant calculations are to Olympics success.

We invited three-time national champion ice skater Shantel Jordan to demonstrate the dizzying rotation so familiar to fans of her sport. Figure skater use a law of physics to control that rotation.

Angular momentum in spinning objects is governed by the velocity of the spin and the distribution of the object’s mass. Whether on the ice or in space, these stay in balance or are conserved.

As Jordan spins, she narrows her body, reducing the radius of the circle she's making and increasing her speed. Her angular velocity increases as the radius of the circle she’s creating decreases. The reverse is true as well. As Jordan widens her arms or extends a leg, she makes her radius larger and slows the speed of her spin. Like a top, she’s incredibly stable as she spins.

Angular momentum works the same way on the ice and in space.

When the Mars Curiosity rover was launched, it was rotating at about 70 rotations per minute (rpm). A yo-yo de-spin system was deployed to slow the spin for its nine-month journey to Mars. Cables with weighted ends are extended, increasing the radius, reducing the spin to the required 12 rpm.

We practiced some hockey passes to show how NASA engineers calculate trajectory for a trip to Mars.

In the same way that a pass to a moving player must anticipate that player's speed and angle, a spacecraft is aimed for where Mars will in be its orbit of the sun at the end of the months-long journey from Earth to the Red Planet.

Reaching Mars is hard. In the nearly 60 years we’ve been sending missions there, we are batting about .500. For NASA Trajectory Analyst Caley Burke, getting a spacecraft to the right place means finding the right time to send it there.

Even the slightest miscalculation sends our puck drifting out to center ice. In space, bad math can see a rocket miss its target entirely. That happened in 1973 when the Soviet Union’s Mars 7 lander missed the planet and in 1998 when a math error crippled NASA’s Mars Climate Orbiter.

The software controlling that mission’s thrusters was developed by Lockheed Martin and expressed force in English units (pound seconds). Another piece of software took that as input assuming it was in the metric unit (newton seconds). More than 4 times the planned force was applied, steering it into instead of into orbit around Mars.

“When working on the trajectories, you have to work backwards. You figure out where on Mars and at what time you want to land,” Burke explains.

NHL Trajectory Analyst Wayne Gretzky put it this way: “A great hockey player plays where the puck is going to be.”

In PyeongChang, the US Women’s Ice Hockey team got the math right, winning gold in a shootout over Canada. Olympic athletes from Russia take on Germany on Sunday in the gold medal game to close out the games.