This book contains a mathematical exposition of analogies between classical (Hamiltonian) mechanics, geometrical optics, and hydrodynamics. In addition, it details some interesting applications of the general theory of vortices, such as applications in numerical methods, stability theory, and the theory of exact integration of equations of dynamics.