Here is a derivation of Newton's 1st law of motion in three-dimensions. The derivation is based on the classical least-action principle. It should be evident by the end that the same process works for any number of dimensions.
Suppose a particle goes from to between time and time . Suppose also that space is potential-free (and thus force-free). The action is defined as (where is the kinetic energy and is the potential energy):
The particle will follow the path between the two points which minimizes the action. Suppose we discretize the path into constant-velocity periods. can be made arbitrarily large. For each period, the velocity is . The action becomes:
The actual path must minimize the action while satisfying the constraints corresponding to the changes in position. We can use the method of Lagrange multipliers with the following Lagrangian:
Taking partial derivatives with respect to the period-specific velocities and setting to zero (per standard practice) results in:
Thus, for motion in potential-free (force-free) three-dimensional space, the least-action principle dictates that the vector velocity must be constant.