Safeguard
Supply Chain Security•

Newton's Three Laws of Motion Explained With Worked Examples

Newton's laws: motion stays unchanged unless a net force acts, net force equals mass times acceleration, and forces come in equal, opposite pairs.

Safeguard Security Team
41 min read

Newton's three laws of motion say that an object keeps its velocity unless a net force acts on it (first law, inertia), that the net force on an object equals the rate of change of its momentum, which for constant mass is F = m a (second law), and that every force comes paired with an equal and opposite force on the other object (third law). Newton published them in his Principia in 1687, and they still run everything from car brakes to elevator cables to rocket launches, up to the point where speeds approach light or objects shrink to atomic scale.

Below: each law in Newton's own words and in modern form, worked numeric examples with cars, elevators and rockets using SI units the way NIST writes them, the reference frames where the laws hold, where they break down, the misconceptions that trip people up, and a short Python script that reproduces every number in this post.

Key takeaways

  • First law: with zero net force, velocity stays constant. Rest is just the special case where that velocity is zero. Inertia is the name for this resistance to changes in motion.
  • Second law: net force equals the rate of change of momentum. For constant mass that reduces to F = m a. A 1500 kg car going from 0 to 100 km/h in 8.0 s needs a net forward force of about 5.2 kN.
  • Third law: forces come in pairs that act on different objects. They never cancel each other, because they are not applied to the same body.
  • Units: the newton is a derived SI unit, 1 N = 1 kg·m/s². NIST writes a space between the number and the unit symbol, as in 5208 N.
  • Frames: the laws hold in inertial (non accelerating) frames. In a braking car or a rotating ride you either add "fictitious" forces or switch frames.
  • Limits: at a tenth of the speed of light, Newtonian momentum is off by about 0.5 percent; at 90 percent of light speed it is off by more than a factor of two. At atomic scale you need quantum mechanics.
  • Software link: the most famous Newtonian failure in engineering was a units bug. NASA's Mars Climate Orbiter was lost in 1999 because ground software delivered impulse data in pound force seconds where newton seconds were expected.

Where did Newton's laws come from?

Isaac Newton set out the three laws as the "Axioms, or Laws of Motion" at the start of Philosophiae Naturalis Principia Mathematica, the Principia. The first edition's imprint records that it was printed in London in 1687 by order of the Royal Society. NASA's Glenn Research Center says Newton presented the laws in 1686, so you will see both years quoted.

The Royal Society's archive holds Edmond Halley's 1687 manuscript paper "Of Newton's Principia". Cambridge University Library holds Newton's own first edition, interleaved with his amendments for later editions: the book was revised by its author for decades.

The text was written in Latin. The first law in the 1687 edition begins "Corpus omne perseverare in statu suo quiescendi vel movendi uniformiter in directum". The 1729 English translation renders the three laws as follows (spelling modernised):

Law I. Every body perseveres in its state of rest, or of uniform motion
         in a right line, unless it is compelled to change that state by
         forces impressed thereon.

Law II. The alteration of motion is ever proportional to the motive force
         impressed; and is made in the direction of the right line in which
         that force is impressed.

Law III. To every action there is always opposed an equal reaction: or the
         mutual actions of two bodies upon each other are always equal, and
         directed to contrary parts.

Two details in the original are worth noticing. First, Newton's "motion" in Law II means what we now call momentum, the product of mass and velocity, not speed alone. Second, he illustrated the third law with everyday examples: a horse pulling a stone tied to a rope is "equally drawn back towards the stone", and when you press a stone with a finger, "the finger is also pressed by the stone." He was not describing exotic physics. He was describing pushing things.

A short timeline

YearEventSource
1666Newton, aged 23, works out his early ideas on gravitation, according to NASA GlennNASA Glenn Research Center
1686Year NASA Glenn gives for Newton presenting the three lawsNASA Glenn Research Center
1687First edition of the Principia printed in London by order of the Royal SocietyFirst edition imprint, archive.org copies
1687Edmond Halley writes "Of Newton's Principia", now in the Royal Society archiveRoyal Society, Science in the Making
1708 onwardRichard Bentley persuades Newton to prepare a new edition; Newton's annotated first edition records his amendmentsCambridge Digital Library
1729English translation published, the version most English quotations come fromWikisource transcription of the 1729 edition
1905Einstein's special relativity paper, which shows where Newtonian mechanics stops being accurateMIT OpenCourseWare 8.20
1996Ariane 5 flight 501 lost about 40 seconds into flight after a software error in the inertial reference systemESA inquiry board press release
1999Mars Climate Orbiter lost after a pound force versus newton units errorNASA Mishap Investigation Board
2019The kilogram, and with it the newton, now rests on the Planck constant rather than a metal artifactNIST

What does Newton's first law actually say?

The first law says that if the net force on an object is zero, its velocity does not change. NASA's Glenn Research Center phrases it as an object at rest stays at rest, and an object in motion stays in motion at constant speed and in a straight line, unless acted on by an unbalanced force. The tendency to resist a change in motion is called inertia.

The key word is net. A car cruising at a steady 100 km/h on a flat road has plenty of forces acting on it: the engine pushes through the tyres, air drag and rolling resistance push back, gravity pulls down and the road pushes up. When those add to zero, the car's velocity stays constant. The first law does not say "no forces"; it says "no unbalanced force".

The second key idea is that velocity includes direction. A car going around a roundabout at a constant 30 km/h is not in uniform motion, because its direction is changing. Something must be supplying a net force toward the centre of the curve, and that something is the friction between tyres and road. On ice, that force disappears and the car continues in a straight line, exactly as the first law predicts.

Worked example: why seat belts exist

A car travels at 50 km/h and hits a solid barrier. The car stops; your body, by the first law, keeps going at 50 km/h until some force stops it. The only question is which force, and over what distance.

Speed:     50 km/h = 50 × 1000 m / 3600 s = 13.89 m/s
Occupant:  m = 70 kg

Belt and crumple zone stop the occupant over about 0.5 m:
  a = v² / (2 d) = (13.89 m/s)² / (2 × 0.5 m) = 192.9 m/s²  (about 19.7 g)
  F = m a = 70 kg × 192.9 m/s² ≈ 13.5 kN

The belt spreads that force across pelvis and chest. Without a belt, the occupant keeps moving until the dashboard stops them over a few centimetres, and since force scales with 1/d at a given speed, a tenth of the distance means ten times the force. These are illustrative numbers, not crash test data: the first law says you will keep moving; safety engineering controls where and how you stop.

What does Newton's second law actually say?

NASA's Glenn Research Center describes the second law as defining force as the change in momentum per change in time. Momentum is mass times velocity:

p = m v

F_net = Δp / Δt = (m₁ v₁ − m₀ v₀) / (t₁ − t₀)

If m is constant:
F_net = m (v₁ − v₀) / (t₁ − t₀) = m a

NASA stresses the condition: F = m a is only valid for objects of constant mass. For a baseball, that is fine. For a rocket that burns most of its mass as propellant, you have to go back to the momentum form. Force, velocity, acceleration and momentum are all vectors, so the equation applies separately along each direction (up and down, left and right, forward and back).

Rearranged, the law gives three useful forms:

F = m a     how much net force a given acceleration needs
a = F / m   how much acceleration a given net force produces
m = F / a   how to measure inertial mass from force and acceleration

The second form is the intuitive one. Double the force and you double the acceleration. Double the mass and, for the same force, you halve it.

Worked example: a car accelerating from 0 to 100 km/h

A 1500 kg car reaches 100 km/h from rest in 8.0 s. What net force did it need, on average?

v = 100 km/h = 100 × 1000 m / 3600 s = 27.78 m/s
a = Δv / Δt = 27.78 m/s / 8.0 s = 3.472 m/s²
F_net = m a = 1500 kg × 3.472 m/s² = 5208 N ≈ 5.2 kN

This is the net force. The engine and drivetrain must supply more than 5.2 kN at the tyres, because drag and rolling resistance push back and grow with speed. That is why a car's acceleration falls off at higher speeds even with the throttle wide open.

Worked example: braking distance

The same car brakes hard from 100 km/h on dry asphalt. Take a tyre to road friction coefficient of 0.7 (a typical textbook figure; real values vary with tyres, surface and weather). The maximum friction force is the coefficient times the normal force, and on a flat road the normal force equals the weight.

g = 9.806 65 m/s²        (standard acceleration of gravity, exact by definition)
Friction force:  F = μ m g = 0.7 × 1500 kg × 9.806 65 m/s² ≈ 10 297 N
Deceleration:    a = F / m = μ g = 0.7 × 9.806 65 m/s² = 6.865 m/s²

Stopping distance from 27.78 m/s:
  d = v² / (2 a) = (27.78 m/s)² / (2 × 6.865 m/s²) ≈ 56.2 m
Stopping time:
  t = v / a = 27.78 / 6.865 ≈ 4.05 s

Same braking from 50 km/h (13.89 m/s):
  d = (13.89)² / (2 × 6.865) ≈ 14.1 m

Notice two things. The mass cancels: a heavier car needs more friction force but also has more grip, so on an ideal surface the braking distance does not depend on mass. And distance grows with the square of speed. Halving speed from 100 km/h to 50 km/h cuts braking distance to roughly a quarter, from 56.2 m to 14.1 m. Real stopping distances are longer because they add the driver's reaction time, during which the car keeps going at full speed.

Worked example: impulse and stopping time

Rearranging the momentum form gives the impulse relation, which explains crumple zones, airbags and why you bend your knees when you land a jump:

F_avg × Δt = m Δv

70 kg occupant, 13.89 m/s to rest:
  stopped in 0.10 s:  F_avg = 70 × 13.89 / 0.10 ≈ 9.7 kN
  stopped in 0.01 s:  F_avg = 70 × 13.89 / 0.01 ≈ 97 kN

The change in momentum is fixed by the crash speed. The only thing engineering can change is the time (or distance) over which it happens. Stretching the stop by a factor of ten cuts the average force by a factor of ten.

What does Newton's third law actually say?

The third law says forces come in pairs. If object A pushes or pulls on object B, then B pushes or pulls on A with a force of the same size in the opposite direction. NASA's Glenn Research Center puts it simply: forces result from interactions.

Three rules make the third law easy to apply correctly:

  1. The two forces act on different objects. That is why they do not cancel.
  2. They are the same kind of force. A gravitational pull is paired with a gravitational pull; a contact push with a contact push.
  3. They are simultaneous. There is no "action first, reaction later".

NASA's aerodynamics examples follow the same pattern. A wing deflects air downward and the air pushes the wing upward. A jet engine throws hot exhaust out the back and the exhaust pushes the engine forward.

Worked example: two skaters push apart

Two people on ice push off each other. Skater A has a mass of 60 kg; skater B has 90 kg. After the push, A glides away at 1.5 m/s. How fast does B move?

During the push, the force on A and the force on B are equal and opposite at every instant, and they last for the same time. So the impulses are equal and opposite, and the momentum changes are equal and opposite. Starting from rest:

m_A v_A + m_B v_B = 0
v_B = − m_A v_A / m_B = − 60 kg × 1.5 m/s / 90 kg = − 1.0 m/s

B moves at 1.0 m/s in the opposite direction. The lighter skater moves faster because the same force produces a larger acceleration on a smaller mass. This is also the origin of conservation of momentum: if every internal force has an equal and opposite partner, internal forces cannot change the total momentum of a system.

Worked example: the apple pulls on the Earth

A 0.10 kg apple hangs from a tree. Earth pulls it down with a force of

F = m g = 0.10 kg × 9.806 65 m/s² ≈ 0.98 N

By the third law, the apple pulls Earth upward with exactly 0.98 N. Earth's mass is roughly 6 × 10²⁴ kg, so the acceleration this produces in Earth is about 0.98 / 6e24 ≈ 1.6e-25 m/s². The forces are equal; the accelerations are wildly different. Equal forces do not mean equal effects, because the second law divides by each object's own mass.

The horse and cart puzzle

If the cart pulls back on the horse as hard as the horse pulls the cart, how does anything move? Look at each body separately. The ground pushes the horse forward (the reaction to its hooves pushing back) harder than the rope pulls it back, and the rope pulls the cart forward harder than friction holds it. The third law pair never acts on one body, so it never cancels.

Worked examples in an elevator

Elevators are the cleanest way to see all three laws at work, and they show why your bathroom scale lies.

A 70 kg person stands on a scale inside an elevator. Two forces act on the person: gravity pulling down (m g) and the scale pushing up (the normal force N). The scale displays N, then divides by g to show a "mass". Take up as positive:

N − m g = m a      →      N = m (g + a)
Elevator motionAcceleration aNormal force NScale reading
At rest, or moving at constant speed (up or down)070 × 9.806 65 = 686.5 N70.0 kg
Starting upward, or slowing while going down+1.5 m/s²70 × 11.306 65 = 791.5 N80.7 kg
Starting downward, or slowing while going up−1.5 m/s²70 × 8.306 65 = 581.5 N59.3 kg
Cable cut, free fall (do not try this)−9.806 65 m/s²0 N0.0 kg

Three lessons sit in that table. First, a constant speed elevator feels exactly like a stationary one, which is the first law in action: zero acceleration means zero net force. Second, the scale reads high when the acceleration points up, regardless of whether the elevator is moving up or down. Third, in free fall the scale reads zero even though gravity is fully present; you feel "weightless" because nothing is pushing back on you.

The scale and the person also form a third law pair. The scale pushes up on the person with 791.5 N; the person pushes down on the scale with 791.5 N. That is the force the scale's spring actually measures.

Worked example: the cable tension

Now treat the car and its load as one body of 1200 kg, hanging from a cable. When it accelerates upward at 1.2 m/s², what tension does the cable carry?

T − m g = m a
T = m (g + a) = 1200 kg × (9.806 65 + 1.2) m/s² ≈ 13 208 N ≈ 13.2 kN

At rest:
T = m g = 1200 kg × 9.806 65 m/s² ≈ 11 768 N ≈ 11.8 kN

Starting upward adds about 12 percent to the cable load. Real elevator design adds large safety factors on top, plus brakes and governors that do not rely on the cable. Modern elevators also rely on control software to shape those accelerations, which is why their software supply chain is a safety topic; we covered that in elevator software supply chain risk and physical safety.

How do Newton's laws explain rockets?

A rocket is the third law and the momentum form of the second law working together. NASA's Glenn Research Center explains that a rocket engine burns stored fuel and oxidizer, accelerates the hot exhaust through a nozzle, and produces thrust according to Newton's third law. The engine pushes exhaust backward; the exhaust pushes the engine forward. NASA's thrust equation is

F = ṁ Vₑ + (pₑ − p₀) Aₑ

ṁ   mass flow rate of exhaust (kg/s)
Vₑ  exhaust exit velocity (m/s)
pₑ  exhaust pressure at the nozzle exit (Pa)
p₀  free stream (ambient) pressure (Pa)
Aₑ  nozzle exit area (m²)

The first term is pure momentum: each second, the engine gives ṁ kilograms of gas a velocity Vₑ, so it changes the gas's momentum by ṁ Vₑ per second, and by the third law the rocket receives an equal and opposite push. The pressure term is a correction for when the exhaust pressure at the nozzle differs from the surrounding air.

Worked example: liftoff acceleration

Take a small launch vehicle with a liftoff mass of 50 000 kg. Its engines expel 250 kg of exhaust per second at an effective exhaust velocity of 2800 m/s. Ignore the pressure term and air drag.

Thrust:  F = ṁ Vₑ = 250 kg/s × 2800 m/s = 700 000 N = 700 kN
Weight:  W = m g = 50 000 kg × 9.806 65 m/s² ≈ 490 kN
Net:     F − W ≈ 210 kN
Accel:   a = 210 000 N / 50 000 kg ≈ 4.19 m/s²

The rocket lifts off at about 4.2 m/s². Now let it burn for 80 s. It has expelled 250 × 80 = 20 000 kg, so its mass is 30 000 kg:

a = (700 000 − 30 000 × 9.806 65) / 30 000 ≈ 13.5 m/s²

Same thrust, much higher acceleration, because the mass dropped. This is exactly NASA's warning about F = m a: for a body whose mass changes, you cannot treat m as a constant. Integrating the momentum form over a burn gives the rocket equation, Δv = Vₑ ln(m₀ / m_f). With an exhaust velocity of 2800 m/s and a mass ratio of 3, the ideal velocity change is 2800 × ln 3 ≈ 3076 m/s before gravity and drag losses.

Do rockets need air to push against?

No. This is one of the most persistent misreadings of the third law. The rocket pushes against its own exhaust, not against the atmosphere. The pressure term in NASA's equation actually works against the rocket at low altitude, because high ambient pressure p₀ reduces the net thrust. Rockets work better in vacuum, not worse.

What are inertial reference frames, and why do they matter?

Newton's laws hold in inertial frames: viewpoints that are not themselves accelerating. Put a coffee cup on a slippery dashboard and brake. Watched from the roadside, the cup simply keeps moving forward because almost no horizontal force acts on it: the first law, cleanly.

Watched from inside the braking car, the cup appears to accelerate forward with nothing pushing it, and the first law seems to fail. You can rescue the calculation by adding a fictitious force equal to the cup's mass times the car's deceleration. Fictitious forces (centrifugal force in a turning car, the Coriolis effect on a rotating planet) are bookkeeping tools for non inertial frames, and they have no third law partner, which is a quick way to recognise them.

The ground is only approximately inertial, because Earth rotates. For cars and elevators the effect is negligible; for long range ballistics, weather and ocean currents, the Coriolis term matters. A practical rule: before applying F = m a, ask "measured from where?" If the answer is a vehicle that is speeding up, slowing down or turning, switch to the ground frame or add the fictitious forces explicitly.

How do the units work? Newtons, kilograms and NIST style

NIST's guide to the SI lists the newton as the coherent SI derived unit of force, with symbol N, expressed in base units as m·kg·s⁻². In other words, one newton is the net force that gives a 1 kg mass an acceleration of 1 m/s². Other mechanics units follow from it:

QuantitySI unitSymbolIn base unitsNewtonian meaning
ForcenewtonNm·kg·s⁻²mass times acceleration
Momentumnewton secondN·sm·kg·s⁻¹mass times velocity; also impulse
Energy, workjouleJ = N·mm²·kg·s⁻²force times distance
PowerwattW = J/sm²·kg·s⁻³work per second
PressurepascalPa = N/m²m⁻¹·kg·s⁻²force per area
Moment of force (torque)newton metreN·mm²·kg·s⁻²force times lever arm; NIST says write N·m, not J
Accelerationmetre per second squaredm/s²m·s⁻²change of velocity per second

Torque and energy share base units, but NIST writes torque as N·m, not J, to keep them distinct.

NIST's SI style checklist adds rules that are worth adopting in reports and code comments alike:

  • Leave a space between the number and the unit symbol: 25 kg, not 25kg.
  • Use a space or a half high dot to multiply units (N·m) and a slash or negative exponent to divide (m/s² or m·s⁻²). Do not repeat the slash on one line without parentheses.
  • Group long digit strings in threes with spaces, not commas, counting from the decimal marker, as in 15 739.012 53. This post follows that in the worked examples (700 000 N, 9.806 65 m/s²).

Two constants used above are exact by definition, according to the 2022 CODATA values published by NIST: the standard acceleration of gravity, gₙ = 9.806 65 m/s², and the speed of light, c = 299 792 458 m/s. Standard gravity is a conventional reference; local gravity varies slightly with latitude and altitude.

The kilogram itself changed. NIST explains that until 2019 the U.S. national mass standards were metal prototype kilograms, and that in November 2018 sixty nations voted to redefine the kilogram through the Planck constant, now exactly 6.626 070 15 × 10⁻³⁴ J·s. So the newton now rests on a constant of nature, not a lump of metal.

Mass versus weight

Mass (kilograms) measures inertia; weight is the gravitational force, in newtons. A 70 kg person weighs 70 × 9.806 65 ≈ 686.5 N at standard gravity. Bathroom scales divide the measured force by an assumed g, which is why the elevator scale "reads" 80.7 kg while the mass is still 70 kg. Mass goes into m; weight is a force and goes into F.

Where do Newton's laws break down?

Newtonian mechanics is not wrong; it is a limiting case. It is extremely accurate for everyday speeds and sizes and fails gracefully at the edges. There are two main edges.

Very high speeds: special relativity

Einstein's 1905 special relativity, the subject of MIT OpenCourseWare's 8.20 course, replaces Newtonian momentum p = m v with p = γ m v, where γ = 1 / sqrt(1 − v²/c²). The size of the correction tells you when Newton is good enough:

SpeedExampleγ − 1 (fractional correction to momentum)
30 m/sa car on a motorwayabout 5 × 10⁻¹⁵
7.7 km/sroughly the speed of a satellite in low orbitabout 3 × 10⁻¹⁰
0.1 cabout 30 000 km/sabout 0.005 (0.5 percent)
0.5 cabout 150 000 km/sabout 0.15 (15 percent)
0.9 cabout 270 000 km/sabout 1.29 (momentum more than doubles)

For anything on a road or launch pad, the correction is far below the precision of any force measurement you could make. Particle accelerators, cosmic rays and precise timekeeping, where tiny fractional differences accumulate, are where relativity becomes unavoidable.

Very small scales: quantum mechanics

At atomic scales, objects do not have a definite position and velocity at the same time, so Newton's laws, which assume both, cannot be applied directly. MIT OpenCourseWare's 8.04 course introduces wave mechanics and Schrödinger's equation, which take over there. For large collections of atoms, the quantum behaviour averages out and Newton's laws re-emerge as an excellent approximation. Strong gravity is the third edge and belongs to general relativity.

In short: use Newton for anything you can see, touch or drive; relativity near light speed or for extreme timing precision; quantum mechanics for atoms and electrons.

How do Newton's laws show up in software?

Every physics engine, vehicle dynamics model, flight simulator and robotics controller is, at its core, a loop that applies the second law in small time steps. Some of the bugs in and around that loop have been very expensive.

The units bug that lost a spacecraft

The clearest example is NASA's Mars Climate Orbiter. According to NASA's Mishap Investigation Board Phase I report (10 November 1999), the root cause was the failure to use metric units in the coding of a ground software file called "Small Forces". The spacecraft's thruster firing data, used to model small velocity changes during the nine month cruise, was delivered in pound force seconds instead of the specified newton seconds. The board noted the modelled velocity changes were low by a factor of 4.45, the conversion from pound force to newtons.

Each error was small, but they accumulated. At Mars arrival, the board found the trajectory was about 170 km lower than planned, and after the fact estimates put the closest approach at 57 km, too low for the spacecraft to survive. NASA's mission page summarises the outcome: last contact was on 23 September 1999, and the investigation found the spacecraft burned up in the Martian atmosphere.

The physics was right on both sides. The failure was at the interface between two pieces of software that disagreed about units: a software supply chain problem in miniature, where one component consumed another's data without verifying the contract.

A guidance software failure on Ariane 5

On 4 June 1996, the maiden flight of Ariane 5 failed about 40 seconds after flight sequence start. ESA's inquiry board attributed it to the complete loss of guidance and attitude information, caused by specification and design errors in the inertial reference system's software, and noted that a pre-liftoff alignment function still running in flight had not been covered by the simulations. An inertial reference system measures acceleration and rotation so guidance can apply Newton's laws; when its software failed, the vehicle lost its sense of motion.

Integration error in your own code

Even with perfect units, a naive simulation drifts. The simplest approach, explicit Euler integration, updates position using the old velocity, then updates velocity. For a ball dropped from rest for 2.0 s with a 0.1 s time step:

Exact:                  x = ½ g t² = 0.5 × 9.806 65 × 2.0² = 19.613 m
Explicit Euler:         x ≈ 18.633 m   (about 0.98 m short, a 5 percent error)
Semi-implicit Euler:    x ≈ 20.594 m   (about 0.98 m long)

Neither naive method is exact for this case; they err in opposite directions by about the same amount, and both errors shrink as the time step shrinks. Real engines choose integrators deliberately, test against analytic cases like this one, and fix the time step rather than letting it vary with frame rate.

Floating point adds its own trap. In IEEE 754 double precision, 0.1 + 0.2 evaluates to 0.30000000000000004, so comparing computed physical quantities with == is a bug waiting to happen. We have covered both issues in more depth in CWE-1339, insufficient precision or accuracy of a real number and CWE-1077, floating point comparison with an incorrect operator.

When physics code drives real machines, these bugs become safety issues. Vehicle software is one example, covered in autonomous vehicles, software supply chains and physical safety.

Step by step: reproduce every number in this post

The script below uses only the Python standard library, so it runs anywhere Python 3.8 or later is installed. Running it yourself is the best way to check a physics explainer, including this one.

1. Create an isolated environment

mkdir newton-examples && cd newton-examples
python3 -m venv .venv
source .venv/bin/activate      # on Windows: .venv\Scripts\activate

2. Save the script as newton_examples.py

import math

G_N = 9.80665          # standard acceleration of gravity, m/s^2 (exact)
C = 299_792_458        # speed of light in vacuum, m/s (exact)

def kmh_to_ms(v_kmh: float) -> float:
    """Convert km/h to m/s. Keep conversions in one named function."""
    return v_kmh * 1000 / 3600

# Second law: car 0 to 100 km/h in 8.0 s
m_car = 1500.0                        # kg
v = kmh_to_ms(100)                    # m/s
a = v / 8.0                           # m/s^2
print(f"car: a = {a:.3f} m/s^2, F_net = {m_car * a:.0f} N")

# Braking with friction coefficient 0.7
a_brake = 0.7 * G_N
print(f"braking: a = {a_brake:.3f} m/s^2, d = {v**2 / (2 * a_brake):.1f} m")

# Elevator scale, 70 kg person
m = 70.0
for acc in (0.0, 1.5, -1.5, -G_N):
    n = m * (G_N + acc)
    print(f"elevator a = {acc:+.2f} m/s^2: N = {n:.1f} N, scale = {n / G_N:.1f} kg")

# Rocket at liftoff and after 80 s
mdot, ve, m0 = 250.0, 2800.0, 50_000.0
thrust = mdot * ve
for mass in (m0, m0 - mdot * 80):
    print(f"rocket m = {mass:.0f} kg: a = {(thrust - mass * G_N) / mass:.2f} m/s^2")
print(f"ideal delta-v, mass ratio 3: {ve * math.log(3):.0f} m/s")

# Third law: skaters
print(f"skater B: {-60.0 * 1.5 / 90.0:.2f} m/s")

# Where Newton breaks down
for speed in (30.0, 7_700.0, 0.1 * C, 0.5 * C, 0.9 * C):
    gamma = 1 / math.sqrt(1 - (speed / C) ** 2)
    print(f"v = {speed:.3g} m/s: gamma - 1 = {gamma - 1:.3e}")

# Integration error: drop for 2.0 s with dt = 0.1 s
dt, steps = 0.1, 20
x = vel = 0.0
for _ in range(steps):
    x += vel * dt
    vel += G_N * dt
print(f"explicit Euler x = {x:.3f} m vs exact {0.5 * G_N * (dt * steps) ** 2:.3f} m")

3. Run it

python newton_examples.py

You should see the same values as the worked examples: 5208 N for the car, 56.2 m braking distance, scale readings of 70.0, 80.7, 59.3 and 0.0 kg, rocket accelerations of 4.19 and 13.53 m/s², a skater speed of −1.00 m/s and an Euler error of just under 1 m.

4. Add tests that compare with a tolerance

Never compare computed floats with ==. Use math.isclose with an explicit tolerance that matches the physics:

# test_newton.py
import math
from newton_examples import G_N, kmh_to_ms

def test_car_force():
    a = kmh_to_ms(100) / 8.0
    assert math.isclose(1500.0 * a, 5208.33, rel_tol=1e-4)

def test_free_fall_scale_reads_zero():
    assert math.isclose(70.0 * (G_N - G_N), 0.0, abs_tol=1e-12)
python -m pip install pytest
python -m pytest -q

5. Pin what you installed and check it

The script itself needs nothing outside the standard library, but the moment you add a test runner, a plotting library or a numerical package, you have a dependency tree. Record it and scan it:

python -m pip freeze > requirements.txt
safeguard scan --dir .

pip freeze records the exact versions you tested with. The Safeguard CLI scan builds an inventory of those dependencies and matches them against vulnerability databases, writing results as JSON under ./output. It tells you nothing about whether your physics is right; that is what the tests in step 4 are for.

Common mistakes

Most errors with Newton's laws are not arithmetic slips. They are misconceptions that feel intuitive.

  • "A moving object needs a force to keep moving." This was the pre Newtonian view, and everyday friction makes it feel true. The first law says the opposite: constant velocity needs zero net force. A car at steady speed needs engine force only to cancel drag and rolling resistance.
  • "Action and reaction cancel, so nothing should move." The pair acts on two different objects. Forces only cancel when they act on the same object. Draw a separate free body diagram for each body.
  • "Heavier objects fall faster." In the absence of air resistance, a heavier object feels a larger gravitational force but has proportionally more inertia, so a = F/m = g for all of them. Air drag is what makes a feather fall slowly.
  • "Mass and weight are the same thing." Mass is in kilograms and does not change with location. Weight is a force in newtons and depends on local gravity. Your bathroom scale converts one to the other using an assumed g.
  • "Astronauts float because there is no gravity in orbit." At typical space station altitudes, an inverse square estimate puts gravity at roughly 89 percent of its surface value. Astronauts float because they and their spacecraft are in continuous free fall together, the zero row of the elevator table.
  • "Centrifugal force throws you outward in a turn." In the ground frame, your body tries to continue straight (first law) and the car door pushes you inward. Centrifugal force only appears as a fictitious force in the rotating frame, and it has no third law partner.
  • "F = m a always works." It works only for constant mass. For rockets, conveyor belts and anything gaining or losing mass, use the momentum form F = Δp / Δt, as NASA's Glenn Research Center stresses.
  • "Rockets push against the air." They push against their own exhaust and work better in vacuum.
  • "Relativity proved Newton wrong." Relativity shows where Newton's laws stop being accurate. At everyday speeds, the difference is around one part in 10¹⁴ or smaller.

FAQ

What are Newton's three laws of motion in simple terms?

First: things keep doing what they are doing (staying still or moving in a straight line at constant speed) unless a net force acts. Second: net force equals mass times acceleration, so bigger forces cause bigger accelerations and heavier objects need more force. Third: when one object pushes or pulls another, the second pushes or pulls back equally hard in the opposite direction.

What is an example of Newton's first law in everyday life?

A passenger lurching forward when a bus brakes, a coffee cup sliding forward on a dashboard, or a tablecloth pulled quickly from under dishes. In each case the object keeps moving (or stays at rest) because the force acting on it is too small or too brief to change its motion.

What is the formula for Newton's second law?

For constant mass, F = m a, where F is net force in newtons, m is mass in kilograms and a is acceleration in metres per second squared. The more general form is F = Δp / Δt, net force equals rate of change of momentum, which you need when mass changes.

What is an example of Newton's third law?

Walking: your foot pushes back on the ground and the ground pushes you forward. Swimming: you push water back and it pushes you forward. A rocket: the engine pushes exhaust down and the exhaust pushes the rocket up. In every case, the two forces act on different objects.

Why don't action and reaction forces cancel out?

Because they act on different objects. Forces only cancel when they act on the same object. The ground's push on your foot affects you; your foot's push on the ground affects the Earth, which barely responds because of its enormous mass.

How many newtons is 1 kg?

A newton is a unit of force and a kilogram is a unit of mass, so they are not directly convertible. A 1 kg mass has a weight of about 9.81 N at standard gravity (exactly 9.806 65 N using the conventional value). Conversely, 1 N is the force that accelerates 1 kg at 1 m/s².

Do Newton's laws work in space?

Yes, and more visibly than on Earth, because little friction or drag hides them. The Mars Climate Orbiter's trajectory models applied them; the failure was a units mismatch, not the physics.

When do Newton's laws not apply?

Near light speed (special relativity), at atomic scales (quantum mechanics) and in very strong gravity (general relativity). In accelerating frames they still work once you add fictitious forces.

Why do you feel heavier in an elevator going up?

When the elevator accelerates upward, the floor must push you harder than your weight to accelerate you, and you feel that larger push. With a 1.5 m/s² upward acceleration, a 70 kg person's scale reading rises from 70.0 kg to about 80.7 kg. At constant speed, up or down, the reading returns to normal.

Where Safeguard fits, honestly

Safeguard does not do physics. Its models are single purpose security models, and nothing in this post was computed by them; the numbers come from the script above and the cited sources. The overlap is narrower and practical: physics engines, robotics stacks, vehicle and flight simulators and the numerical libraries underneath them are software with dependency trees, and those dependencies need the same inventory and patching as any web application. Safeguard scans repositories, container images and SBOM files, matches components against vulnerability databases, and shows which projects carry a given component and version. It will not catch a units mismatch or a bad integrator; tests, code review and interface contracts do that.

Fix it without waiting for upstream

Newton's laws have no CVEs, but the simulation and control software that applies them is built from open source components like any other code. If your team ships physics heavy software, the dependencies under it need the same patch discipline as everything else you build.

Whatever the vulnerability, most of the risk sits in two gaps. The first is the time between a fix being published and that fix actually running in your production builds. The second, and worse, is the time before any fix exists at all, while a maintainer works out a patch and a release schedule. Waiting through both gaps is a habit, not a requirement. Safeguard gives teams three ways to close them.

1. Autonomous remediation: pull requests, not tickets

When a fixed version exists, Safeguard's Griffin models open a tested, policy gated pull request that moves the affected dependency to the safe version. You can run it on one repository or in bulk across every project that carries the vulnerable version. Remediation covers eight categories, including dependencies, licenses, security posture and findings. Reachability analysis ranks the vulnerable code paths your application actually calls first, so the first pull requests you merge are the ones that matter most. Autonomous remediation ships switched off, with every category set to Manual, so your team decides how much runs on its own and what still needs a human approval.

2. Gold Open Source: the safe version in seconds, free

gold.safeguard.sh is free and needs no login. Search any CVE or package to see affected and fixed versions, CVSS, EPSS, CISA KEV status and a recommended safe version, or use the "Am I affected?" checker. The same data is available through a free read API, README status badges and RSS threat feeds. The safeguard-sh/gold-scan-action GitHub Action can fail a build on a known exploited vulnerability, on any known vulnerability, or never, so a version you have just removed cannot quietly come back in next week's merge.

3. Gold Registry: start from components that are already fixed

registry.safeguard.sh provides hardened, drop in replacements for upstream packages and container images. Every Gold artifact is held continuously to zero exploitable critical or high CVEs, zero malware and a completed license check, with SLSA L3 or higher provenance, a Sigstore signature and a public evidence page you can hand to an auditor. An artifact loses its Gold badge if it regresses. Teams can point their own package directory at the registry so hardened equivalents resolve without changing how developers install anything.

When upstream has no fix yet, or will not ship one, Safeguard first works to get the fix accepted upstream. If the issue is severe or upstream will not move, Safeguard builds a fork, fixes the vulnerability there and publishes a hardened Gold build, so you are not stuck on a maintainer's release schedule. You can also request a hardened, compatibility tested build of a specific package. This fork and patch flow is in early access today, so ask which packages it covers before you plan around it.

Your situationWhat to use
A fixed version existsAutonomous remediation opens the upgrade pull request; Gold Open Source confirms the safe version
You need to know today whether you are affectedGold Open Source lookup and "Am I affected?" checker, free and without login
You want vulnerable versions to stop shippingThe Gold scan GitHub Action in CI, plus Safeguard policies and gates
Upstream has no fix yet, or will not ship oneA custom Gold request; fork and patch (early access)
You want to start clean on new projectsPull hardened components and images from Gold Registry

One honest limit: when the vulnerable code lives in a vendor appliance, a hosted service or an operating system runtime you do not build yourself, the fix still has to come from that vendor or distribution. The steps above apply to the open source dependencies and container images you build and ship, which is where most teams carry the largest and least tracked share of their exposure.

See how Safeguard would help

The first demo is a real Safeguard CLI session: asked to fix a lodash CVE, it reads the finding and advisory, asks before each command, edits package.json to lodash 4.17.21, runs npm install and npm test with approval, prints a summary and pushes nothing. The same approve each step flow fits a simulation repository: upgrade a dependency, rerun the physics tests from step 4, and only then commit. The CLI does not check your physics; your tests do.

Click through it at your own pace, or open it full screen.

The second demo sets up Safeguard's local runner on your own machine, approves it with a device code, and runs a scan from the terminal. That is the same flow as step 5 above, run on the workstation or build host where your simulation code lives.

Click through it at your own pace, or open it full screen.

The third demo connects Claude to the Safeguard MCP server with OAuth and lets you choose which tools Claude can use. You could ask Claude to explain a worked example from this post and, in the same conversation, ask Safeguard which of your projects carry a given version of a numerical library, while you control exactly which Safeguard tools the assistant can call.

Click through it at your own pace, or open it full screen.

To try it on your own code, download Safeguard or read the CLI documentation.

Quick check

An elevator moves downward at a constant 2 m/s. Does a 70 kg person's scale read more than, less than, or exactly 70 kg?

Exactly 70 kg. Constant velocity means zero acceleration, so by the first and second laws the net force is zero and the scale's push equals the person's weight, 686.5 N.

A horse pulls a cart and the cart pulls back on the horse with an equal force. Why does the cart move?

The equal and opposite pair acts on two different bodies, so it never cancels. The cart moves because the rope's forward pull on the cart is larger than the friction holding it back. The horse moves because the ground pushes it forward harder than the rope pulls it back.

What units error did NASA's investigation board identify for the Mars Climate Orbiter?

Thruster impulse data in the "Small Forces" ground software file was delivered in pound force seconds instead of the specified newton seconds, making modelled velocity changes low by a factor of 4.45.

Sources

Last reviewed: 23 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.