Mechanics
Center of Mass
The point where mass is "averaged" — where an object behaves as if all its mass were concentrated
The center of mass is the weighted-average position of all the mass in an object — the point that moves as if all the mass were concentrated there. For a ball thrown through the air, the center of mass follows a clean parabola even as the ball spins wildly. Critical for analyzing collisions, balance, throwing, and any motion where you want to ignore internal complexity. Defined by Σm·r / Σm.
- Definitionr_cm = Σ(m_i · r_i) / Σm_i
- For continuous bodyr_cm = (1/M) ∫r·dm
- External forceF_ext = M · a_cm (acts as if at COM)
- Internal forcesDon't affect motion of COM
- TrajectoryCOM follows clean projectile path even if body spins/breaks apart
- StabilityObject stable if line through COM falls within base of support
Interactive visualization
Press play, or step through manually. The visualization is yours to drive — try it before reading on.
Watch the 60-second explainer
A condensed visual walkthrough — narrated, captioned, under a minute.
Definition
The center of mass is the mass-weighted average of position vectors:
r_cm = (m₁·r₁ + m₂·r₂ + ... + m_n·r_n) / (m₁ + m₂ + ... + m_n) = Σ(m_i·r_i) / M
For a continuous body:
r_cm = (1/M) · ∫r·dm
where M is total mass. Each component (x, y, z) is computed separately.
Key properties
| Property | Statement |
|---|---|
| External force | F_ext = M·a_cm (system behaves as if all mass at COM) |
| Internal forces | Don't affect COM motion (3rd law cancellation) |
| Free flight | COM follows clean parabolic trajectory under gravity |
| Collisions | COM velocity unchanged by internal forces |
| Stability | Object tips when vertical line through COM exits base of support |
| Symmetry | For symmetric uniform body, COM is at the symmetric center |
Common COM locations
| Object | COM location |
|---|---|
| Uniform rod (length L) | Midpoint, L/2 |
| Uniform sphere | Geometric center |
| Uniform triangle | Centroid (1/3 from each side toward opposite vertex) |
| Uniform L-shape | Inside the L, computed from rectangles |
| Hollow ring | Center (in empty middle) |
| Boomerang | In the bend (outside material) |
| Standing person | Roughly at navel, centered |
| Earth-Moon system | 4670 km from Earth's center, inside Earth |
| Solar system | Just outside Sun's surface, mostly determined by Jupiter |
COM motion in projectiles
Throw a hammer (or any irregular object) into the air spinning. The hammer rotates wildly, but its COM follows a clean parabolic trajectory.
Why — only gravity (external force) acts. F_ext = mg, downward. So COM acceleration = g, downward. Every point of the hammer moves through complex curves, but the COM is just doing free-fall.
This works for ANY rigid body, ANY motion (rotation, deformation, breaking apart). External forces dictate COM motion; internal forces dictate everything else.
Balance and stability
An object is in stable equilibrium if the vertical line through its center of mass falls within its base of support.
If COM is directly over the support, slight perturbations create torques that restore the object. If COM is at the edge, any tilt causes it to fall. If beyond the edge, it definitely tips.
| Situation | Stability |
|---|---|
| Person standing upright | Stable — COM over feet |
| Person leaning past their toes | Unstable — COM ahead of base |
| Wide-base statue (Buddha) | Very stable — large base |
| Pencil balanced on tip | Unstable — tiny base, COM far above |
| Race car (low and wide) | Very stable — low COM, wide track |
| SUV (high COM) | Less stable — easier to tip when cornering |
JavaScript — center of mass calculations
// COM of n point masses
function centerOfMass(masses, positions) {
// positions is array of arrays (e.g., [[x1, y1], [x2, y2], ...])
const totalMass = masses.reduce((s, m) => s + m, 0);
const dim = positions[0].length;
const com = new Array(dim).fill(0);
for (let i = 0; i < masses.length; i++) {
for (let d = 0; d < dim; d++) {
com[d] += masses[i] * positions[i][d];
}
}
return com.map(v => v / totalMass);
}
// 3-body system
const com1 = centerOfMass([1, 2, 3], [[0, 0], [1, 0], [0, 1]]);
console.log(com1); // [(0+2+0)/6, (0+0+3)/6] = [0.333, 0.5]
// Earth-Moon system
const M_EARTH = 5.972e24;
const M_MOON = 7.342e22;
const D_EARTH_MOON = 384400e3;
const com_em = centerOfMass([M_EARTH, M_MOON], [[0, 0], [D_EARTH_MOON, 0]]);
console.log(`Earth-Moon barycenter: ${com_em[0].toExponential(3)} m from Earth's center`);
console.log(`Earth's radius: 6.371e6 m → barycenter is INSIDE Earth: ${com_em[0] < 6.371e6}`);
// Project a thrown object: COM follows g
function projectileCom(initial_x, initial_y, vx0, vy0, g = 9.81) {
return (t) => ({
x: initial_x + vx0 * t,
y: initial_y + vy0 * t - 0.5 * g * t * t
});
}
// Hammer thrown at 20 m/s, 30° upward, from 1.5 m height
const com_traj = projectileCom(0, 1.5, 20 * Math.cos(Math.PI/6), 20 * Math.sin(Math.PI/6));
console.log(com_traj(1)); // {x: 17.32, y: 6.6} — COM trajectory
// (regardless of how the hammer rotates!)
// COM of an L-shape: decompose into rectangles
function lShapeCom(width1, height1, width2, height2) {
// Rectangle 1: (0..width1, 0..height1), area = width1·height1
// Rectangle 2: (0..width2, height1..height1+height2)
const m1 = width1 * height1;
const m2 = width2 * height2;
const cm1 = [width1/2, height1/2];
const cm2 = [width2/2, height1 + height2/2];
return centerOfMass([m1, m2], [cm1, cm2]);
}
console.log(lShapeCom(4, 1, 1, 3)); // L-shape: 4×1 base + 1×3 vertical
// Total mass = 4 + 3 = 7. COM = ((4·2 + 3·0.5)/7, (4·0.5 + 3·2.5)/7) = [1.36, 1.36]
Where center of mass shows up
- Mechanics — collision analysis. COM moves at constant velocity through collisions; useful for momentum-conservation arguments.
- Sports. Diving, gymnastics, dance — performers manipulate posture to control COM motion. Long jump — extend forward, then tuck for max distance.
- Vehicle design. Low-and-wide cars are stable; SUVs with high COM tip in turns. F1 cars have COM as low as possible (~30 cm above ground).
- Architecture and engineering. Stable structures need COM above support. Cranes use counterweights to balance loads.
- Astronomy. Earth-Moon barycenter, planet-star wobble (exoplanet detection), galactic dynamics, solar system center.
- Robotics. Walking robots constantly track COM relative to support polygon; bipedal balance.
- Aerospace. Rocket COM shifts as fuel burns; thrust must be aligned with COM to avoid spinning. Spacecraft COM determines orbit dynamics.
Common mistakes
- Confusing COM with geometric center. For uniform symmetric bodies, they coincide. For asymmetric or non-uniform mass distributions, they differ.
- Thinking COM must be inside the body. Hollow rings, donuts, boomerangs all have COMs in empty space. Geometry doesn't constrain mass-weighted average.
- Ignoring internal forces (correctly!) — but applying it wrong. Internal forces don't affect COM motion. But they DO affect rotation, deformation, stress.
- Treating COM motion as the whole story. COM motion is just the translation of the system. Rotation, deformation, etc. are separate degrees of freedom.
- Confusing center of mass with center of gravity. Same in uniform g; differ slightly otherwise. Often used interchangeably in casual physics.
- Forgetting that stability depends on base shape, not size. A wide base is stable. But COM well above small narrow base is unstable. Both shape and size matter.
Frequently asked questions
How is center of mass different from center of gravity?
Same point in uniform gravity. Center of mass is the mass-weighted average position. Center of gravity is the point where gravity effectively acts. In uniform g, they coincide. In a non-uniform gravitational field (e.g., near a planet, where g varies with height), they differ slightly. For everyday objects on Earth, the difference is negligible.
Where is the COM of a hollow object?
Inside the empty space. A hollow sphere — COM at geometric center (empty interior). A boomerang — COM in the bend (empty area). A sliced donut — COM at the center of the hole. The COM doesn't have to be inside the material; it's the weighted-average mass position.
Why do thrown objects rotate around their COM?
For a free-flying object (no external force on it except uniform gravity), the COM follows a projectile path, and the rest of the body rotates around the COM. This decomposes complex motion into "translation of COM" + "rotation about COM." Useful for analyzing tumbling players, gymnasts, projectiles.
How does it explain balance and stability?
An object is stable if the vertical line through its COM falls within its base of support. If you tilt it past this — COM moves outside base — torque tips it over. Tightrope walkers extend arms (or use poles) to lower their effective COM and increase stability. Wide bases (broad-stance, sumo wrestlers) allow more tilt before COM exits base.
How does COM motion change in collisions?
For an isolated system (no external forces), the COM continues moving at constant velocity through the collision. Internal forces (between colliding bodies) come in equal-opposite pairs (Newton's 3rd) and don't change the system's COM motion. This is why momentum is conserved — total momentum equals (total mass × COM velocity), and COM velocity is invariant.
Where's the COM of the Earth-Moon system?
About 4670 km from Earth's center — INSIDE the Earth (Earth's radius is 6371 km), but offset toward the Moon. Earth and Moon both orbit this point (the "barycenter"). In a non-perfectly-circular orbit, this barycenter wobbles. Detection of similar wobbles in distant stars is how we discover exoplanets (the star wobbles slightly around the planet-star COM).
How do you find COM by integration?
For a continuous body — r_cm = (1/M) ∫r·dm. Choose a coordinate system; express dm in terms of position (using density ρ if uniform, or ρ(r) if not). Integrate. For a uniform rod of length L, COM is at L/2 (midpoint). For a uniform triangle, COM is at the centroid (1/3 from base). For an L-shape, decompose into rectangles, find each rectangle's COM, then weighted average.