How is there inertia on earth? I though that inertia was just in space.
Inertia is everywhere. Left to itself, an object will obey inertia and travel at constant velocity. In deep space, far from any planet or star that exerts significant gravity, an object will exhibit this inertial motion. But on earth, the earth’s gravity introduces complications that make it harder to observe inertial motion. A ball that’s thrown up in the air still exhibits inertial effects, but its downward weight prevents the ball from following its inertia alone. Instead, the ball gradually loses its upward speed and eventually begins to descend instead. So inertia is the basic underlying principle of motion while gravity is a complicating factor.