Last night I was reading a paper by the late Russian mathematician V. I. Arnold “Polymathematics: is mathematics a single science or a set of arts?” and posted a lightly edited extract of it on Twitter. It begins
All mathematics is divided into three parts: cryptography, hydrodynamics, and celestial mechanics.
Arnold is alluding to the opening line to Julius Caesar’s Gallic Wars  which suggests he’s being a little playful. The unedited version leaves no doubt that he’s being playful or cynical.
All mathematics is divided into three parts: cryptography (paid for by CIA, KGB and the like), hydrodynamics (supported by manufacturers of atomic submarines), and celestial mechanics (financed by military and other institutions dealing with missiles, such as NASA).
I edited out the parenthetical remarks, in part edit the sentence down to a tweet, but also because when you take out the humor/cynicism he makes a valid if hyperbolic point. He goes on to back this up.
Cryptography has generated number theory, algebraic geometry over finite fields, algebra, combinatorics and computers.
Hydrodynamics has procreated complex analysis, partial differential equations, Lie groups and algebra theory, cohomology theory and scientific computing.
Celestial mechanics is the origin of dynamical systems, linear algebra, topology, variational calculus and symplectic geometry.
Arnold adds a footnote to the comment about cryptography:
The creator of modern algebra, Viète, was the cryptographer of King Henry IV of France.
Of course not all mathematics was motivated by cryptography, hydrodynamics, and celestial mechanics, but an awful lot of it was. And his implicit argument that applied math gives birth to pure math is historically correct. Sometimes pure math gives rise to applied math, but much more often it’s the other way around.
His statements roughly match my own experience. Much of the algebra and number theory that I’ve learned has been motivated by cryptography. I dove into Knuth’s magnum opus, volume 2, because I wanted to implement the RSA algorithm in C++.
I got started in scientific computing in a computational fluid dynamics (CDF) lab. I didn’t work in the lab, but my room mate did, and I went there to use the computers. That’s where I would try my hand at numerical analysis and where I wrote simulation code for my dissertation. My dissertation in partial differential equations was related (very abstractly) to fluid flow in porous media.
I didn’t know anything about celestial mechanics until I sat in on Richard Arenstorf‘s class as a postdoc. So celestial mechanics was not my personal introduction to dynamical systems etc., but Arnold is correct that these fields came out of celestial mechanics.
 “Gallia est omnis divisa in partes tres.” which translates “Gaul is a whole divided into three parts.”