We trace the logical line of formulating a theory of mechanics founded on the basic relations of mathematics of hypercomplex numbers and associated geometric images. Namely, it is shown that the physical equations of quantum, classical and relativistic mechanics can be regarded as mathematical consequences of a single condition of stability of exceptional algebras of real, complex and quaternion numbers under transformations of primitive constituents of their units and elements. In the course of the study, the notion of a basic fractal surface underlying the physical three-dimensional space is introduced, and an original geometric treatment (admitting visualization) of some formerly considered abstract functions (mechanical action, space-time interval) are suggested. © 2015, Pleiades Publishing, Ltd.