The Pythagorean Theorem in Physics

How physicists combine perpendicular quantities into one magnitude, from a hiker's displacement and a boat's velocity to AC impedance and the spacetime interval, with units in every example.

By the PythagoreanTheorem.net teamUpdated 11 min read

In physics, the Pythagorean theorem gives the size of a vector from its perpendicular parts. When two quantities act at right angles, such as 3 m/s east and 4 m/s north, their combined effect, called the resultant, has magnitude √32 + 42 = 5 m/s. The same rule gives vector lengths in 3D, projectile speeds and AC impedance.

Resultant vectors: adding perpendicular quantities

A vector is a quantity with both a size, called its magnitude, and a direction. Displacement, velocity, acceleration and force are vectors; mass and temperature are not. To add vectors you place them tip to tail. If the two vectors are perpendicular, they form the legs of a right triangle and the resultant is the hypotenuse:

|R| = √Rx2 + Ry2,   θ = arctanRy over Rx

Here Rx and Ry are the components, the parts of the vector along the x and y axes, and θ is the angle the resultant makes with the x-axis. The magnitude has the same unit as the components.

Example 1: displacement

A hiker walks 3.0 km east and then 4.0 km north. What is her displacement?

d= √3.02 + 4.02 = √25 = 5.0 kmθ= arctan4.0 over 3.0 ≈ 53.1° north of east

5.0 km at about 53.1° north of east. She walked 7.0 km, but she is only 5.0 km from her start: the 3-4-5 triangle.

Example 2: crossing a river

A boat points straight across a river 60 m wide and moves through the water at 4.0 m/s. The current flows downstream at 3.0 m/s. Find the boat's speed over the riverbed, the crossing time and how far downstream it lands.

v= √4.02 + 3.02 = 5.0 m/st= 60 m over 4.0 m/s = 15 sdrift= 3.0 m/s × 15 s = 45 m

5.0 m/s, 15 s and 45 m downstream. Only the across component sets the crossing time; the current just carries the boat sideways. Check: the path is √602 + 452 = 75 m, and 75 ÷ 15 = 5.0 m/s.

current 3 m/s 60 m aimed here lands here drift 45 m 4 m/s 3 m/s 5 m/s velocity triangle
The boat keeps pointing straight across, yet it travels along the green diagonal. Its velocity over the ground is the hypotenuse of a 3-4-5 triangle of velocities.

Example 3: two perpendicular forces

Two people pull a crate with ropes at right angles: one with 120 N toward the east, the other with 50 N toward the north. What single force has the same effect?

F= √1202 + 502 = √16,900 = 130 Nθ= arctan50 over 120 ≈ 22.6° north of east

130 N at about 22.6° north of east, a scaled-up 5-12-13 triangle. The two pulls total 170 N, but because they are perpendicular their combined effect is only 130 N.

Only for right anglesYou may add magnitudes with the theorem only when the vectors are perpendicular. For any other angle, split each vector into x and y components, add the components, and use the theorem on the totals, or use the law of cosines directly.

Breaking a vector into components

Physics problems often run the other way: you know a vector's magnitude and direction and need its components. Trigonometry does the split, and the theorem guarantees the pieces fit back together. A 50 N force pulling at 30° above the horizontal has

Fx= 50 cos30° ≈ 43.3 NFy= 50 sin30° = 25.0 N√Fx2 + Fy2= √43.32 + 25.02 ≈ 50 N

This always works because cos2θ + sin2θ = 1, the Pythagorean identity, which is the theorem written for a hypotenuse of length 1. Splitting, adding components and recombining with the theorem is the standard method for adding any number of vectors, the same bookkeeping navigators use for dead reckoning.

The magnitude of a vector in 3D

Real motion happens in three dimensions. Using the theorem twice, first across the floor and then up, gives the magnitude of a 3D vector:

|v| = √vx2 + vy2 + vz2

Example 4: a climbing drone

A drone moves 2.0 m/s east, 3.0 m/s north and 6.0 m/s upward at the same time. How fast is it moving?

v = √2.02 + 3.02 + 6.02 = √4 + 9 + 36 = √49 = 7.0 m/s

7.0 m/s. The numbers 2, 3, 6, 7 form a Pythagorean quadruple, so the answer comes out whole.

Example 5: reading a magnetometer

A phone's three-axis magnetometer reports field components of 18.0 µT, 2.0 µT and 45.0 µT. What is the strength of the magnetic field?

B = √18.02 + 2.02 + 45.02 = √2,353 ≈ 48.5 µT

About 48.5 microtesla, typical of the Earth's field, which ranges from roughly 25 to 65 µT at the surface.

The derivation is on the Pythagorean theorem in 3D page, and the pattern continues into any number of dimensions as the length of an n-component vector (see the theorem in n dimensions).

Projectile motion: speed from velocity components

A thrown ball has a horizontal velocity that stays constant (ignoring air resistance) and a vertical velocity that gravity changes by 9.8 m/s every second. Its speed at any moment is the hypotenuse of those two components.

Take a ball launched at 20 m/s, 30° above the horizontal, with g = 9.8 m/s²:

vx= 20 cos30° ≈ 17.32 m/s (constant)vy= 20 sin30° − 9.8t = 10.0 − 9.8t m/s
MomentTime (s)vx (m/s)vy (m/s)Speed √vx2 + vy2 (m/s)
Launch017.3210.0020.00
Highest point1.0217.320.0017.32
On the way down1.5017.32−4.7017.95
Landing (same height)2.0417.32−10.0020.00
17.3 10.0 20.0 17.3 17.3 4.7 17.9 t = 0 t = 1.02 s (top) t = 1.5 s orange: horizontal part (m/s) blue: vertical part (m/s) green: speed (m/s)
Drawn to scale. The horizontal part never changes; the vertical part shrinks to zero at the top and then grows downward. The speed is always the hypotenuse.

The theorem also explains why energy splits neatly into parts. Kinetic energy is 1 over 2mv2, and v2 = vx2 + vy2, so a 0.50 kg ball launched as above has 1 over 2(0.50)(202) = 100 J of kinetic energy: 75 J from horizontal motion and 25 J from vertical motion. At the top, the vertical 25 J has all become potential energy, mgh = 0.50 × 9.8 × 5.1 ≈ 25 J, while the horizontal 75 J is untouched.

AC circuits: impedance Z = √(R² + X²)

In an alternating-current circuit, the voltage across a resistor rises and falls in step with the current, but the voltage across an inductor peaks a quarter cycle (90°) earlier and the voltage across a capacitor a quarter cycle later. Engineers draw these as arrows called phasors, and quantities 90° out of step combine exactly like perpendicular vectors.

The circuit's total opposition to current is its impedance Z, measured in ohms (Ω). The resistance R is one leg; the net reactance X = XL − XC is the other, where XL = 2πfL for an inductor and XC = 1 over 2πfC for a capacitor at frequency f:

Z = √R2 + (XL − XC)2
φ ≈ 53.1° R = 30 Ω X = 40 Ω Z = 50 Ω Z = √(R² + X²) cos φ = R/Z = 0.6 (the power factor)
The impedance triangle. Resistance and reactance are perpendicular, so impedance is the hypotenuse, and the angle φ is how far the current lags the voltage.

Example 6: a resistor and an inductor

A series circuit has R = 30 Ω and XL = 40 Ω and is connected to a 120 V (rms) supply. Find the impedance, current and phase angle.

Z= √302 + 402 = 50 ΩI= V over Z = 120 over 50 = 2.4 Aφ= arctan40 over 30 ≈ 53.1°

50 Ω, 2.4 A, and the current lags the voltage by about 53.1°. The power factor is cosφ = 30 ÷ 50 = 0.6.

Example 7: a full RLC circuit

A series circuit at f = 60 Hz has R = 100 Ω, L = 0.50 H and C = 10 µF.

XL= 2π(60)(0.50) ≈ 188.5 ΩXC= 1 over 2π(60)(10 × 10−6) ≈ 265.3 ΩZ= √1002 + (188.5 − 265.3)2 ≈ √1002 + 76.82 ≈ 126.1 Ω

About 126 Ω. The net reactance is negative (the circuit behaves capacitively), but squaring removes the sign, so only its size affects Z.

The same right triangle appears for power. In Example 6, the real power is P = I2R = 172.8 W, the reactive power is Q = I2X = 230.4 var, and the apparent power is S = VI = 288 VA. Check: √172.82 + 230.42 = 288. Engineers call this the power triangle; it is the impedance triangle scaled by I2.

Special relativity: the theorem with a minus sign

Einstein's theory of special relativity uses the ordinary Pythagorean theorem in its most famous thought experiment, and then produces a version of it with a twist. (Einstein also recalled finding his own proof of the theorem as a boy; see Einstein's proof.)

The light clock

Imagine a clock made of two mirrors a distance L apart, with a pulse of light bouncing between them. In the clock's own frame, one round trip takes Δτ = 2L/c, where c is the speed of light. Now watch the clock fly past at speed v. From the ground, the light travels along a diagonal while the mirrors move sideways, so each half-trip is the hypotenuse of a right triangle.

At rest L tick: Δτ = 2L/c Moving at speed v, seen from the ground c·Δt/2 L v·Δt/2 v
Seen from the ground, the light's path is longer, but light still travels at c, so each tick must take longer. The right triangle in green, blue and orange turns that idea into a formula.

Apply the theorem to one half-trip, which takes time Δt/2 in the ground frame:

(c Δt over 2)2 = L2 + (v Δt over 2)2

Multiply by 4, replace 2L with c Δτ, and solve for Δt:

(c Δt)2 = (c Δτ)2 + (v Δt)2  ⇒  Δt = Δτ over √1 − v2/c2

This is time dilation. At v = 0.6c, √1 − 0.36 = 0.8, so each tick of the moving clock lasts 1 ÷ 0.8 = 1.25 times as long as seen from the ground.

The spacetime interval

Rearrange the same equation as (c Δτ)2 = (c Δt)2 − (v Δt)2, where v Δt is the distance the clock moved. It says that a combination of time and distance comes out the same for every observer, even though they disagree about the time and the distance separately. In three space dimensions, this combination is the spacetime interval:

(Δs)2 = (c Δt)2 − (Δx)2 − (Δy)2 − (Δz)2

Compare it with ordinary distance, (Δx)2 + (Δy)2 + (Δz)2, which stays the same however you rotate your axes. The spacetime version stays the same however fast you move, but the time part enters with the opposite sign. That single minus sign is the difference between the geometry of space and the geometry of spacetime. (Some textbooks flip every sign and write (Δx)2 + (Δy)2 + (Δz)2 − (c Δt)2; the physics is identical.)

Example 8: a trip to a nearby star

A spaceship travels at constant speed to a star 4 light-years away, arriving 5 years after it left, as measured in the frame of the Earth and star. How much time passes on the ship's clock?

(c Δτ)2= (c Δt)2 − (Δx)2 = (5 ly)2 − (4 ly)2 = 9 ly2c Δτ= 3 ly  ⇒  Δτ = 3 years

3 years, at a speed of 4 ÷ 5 = 0.8c. It is a 3-4-5 triangle with a subtraction where you would expect an addition.

More places the theorem appears in physics

  • Combining measurement uncertainties. Independent random errors combine as a root sum of squares: σ = √σ12 + σ22. A length with a 0.3 mm reading uncertainty and a 0.4 mm alignment uncertainty has a combined uncertainty of about 0.5 mm, not 0.7 mm.
  • Energy and momentum. In relativity, a particle's energy E, momentum p and mass m satisfy E2 = (pc)2 + (mc2)2. It has the form of the theorem, with rest energy mc2 and pc as the legs and total energy as the hypotenuse; for light, m = 0 and E = pc.
  • Distances between particles in simulations. Every gravity or collision calculation in a physics simulation starts with √(Δx)2 + (Δy)2 + (Δz)2; the programming page shows how code does it efficiently.

Frequently asked questions

What is a resultant vector?

It is the single vector that has the same effect as two or more vectors acting together. You find it by adding the vectors tip to tail. When two vectors are perpendicular, the resultant is the hypotenuse of the right triangle they form, so its magnitude is √a2 + b2.

How do you find the magnitude of a vector?

Square each component, add the squares and take the square root. For v = (6, 8) m/s the magnitude is √36 + 64 = 10 m/s; in three dimensions add the third squared component too, so (1, 2, 2) has magnitude √9 = 3.

Can I use the theorem if the vectors are not perpendicular?

Not directly on their magnitudes. Resolve each vector into perpendicular x and y components, add those, and then apply the theorem to the totals. Alternatively, the law of cosines gives the resultant of two vectors at any angle in one step.

Why is there a minus sign in the spacetime interval?

Because the light-clock argument produces (c Δτ)2 = (c Δt)2 − (Δx)2: moving through space uses up some of the time a clock would otherwise record. Observers moving at different speeds all agree on this combination, which is why it, rather than the ordinary sum of squares, plays the role of distance in spacetime.

Why is impedance calculated with the Pythagorean theorem?

The voltage across a resistance and the voltage across a reactance are a quarter cycle (90°) out of step. Represented as phasors, they point at right angles, so their combined effect is the hypotenuse: Z = √R2 + X2. Simply adding R and X would overestimate the impedance.

Keep exploring