History of Geometric Analogies in Number Theory My question, put simply, is: When did mathematicians/number theorists begin viewing questions in number theory through a geometric lens? 
For example, was it before Grothendieck introduced schemes to generalize the notion of covering spaces and algebraic curves to include primes in rings? Today we call p-adic fields local and number fields global, which suggests a very geometric interpretation of their relationship. I can certainly see the parallels more and more as I learn more of the theory, but I am curious as to when this "realization" that geometric ideas were all over number theory rose to prominence among number theorists. 
Does it go all the way back to classical number theory (i.e. Euler and Gauss), or perhaps does it begin with Hensel and Hasse? Any resources on the matter would also be appreciated.
 A: Treating number and function fields on the same footing or (for instance) the idea that ramification in algebraic number theory and in the theory of covering of Riemann or analytic surfaces are two incarnations of the same mathematical phenomenon are classical ideas of the German school of the second half of the 19th century.
It is very present in the research as well as expository material of Kronecker, Dedekind and Weber (see for instance the algebraic proof of Riemann-Roch by the last two). In fact, it is so ubiquitous in Kronecker's work that in some of his results on elliptic curves, it is often hard to ascertain if the elliptic curve he is studying is supposed to be defined over $\mathbb C$, $\bar{\mathbb Q}$, the ring of integers of a number field or over $\bar{\mathbb F}_p$ (or over all four depending on where you find yourself in the article). This is why the introduction of SGA1 says that the aim of the volume is to study the fundamental group in a "kroneckerian" way.
At any rate, the analogy was so well-known to Hilbert that Takagi actually says in his memoirs that Hilbert had a negative influence on his definition and study of ray class field: Hilbert always wanted Takagi's theorem to make sense for Riemann surfaces and so was asking Takagi to only consider extension of number fields unramified everywhere.
In the 1920s and 1930s (so to mathematicians like Artin, Hasse or Weil), this was thus very common knowledge. The revolutionary idea of Weil, in fact, is not at all the idea that arithmetic and geometry should be unified or satisfy deep analogies, it was the idea that they should be unified by topological means (at a low level, by systematically putting Zariski's topology to the forefront, at a high level, by introducing the idea that the rationality of the Zeta function and Riemann's hypothesis for varieties over function fields of positive characteristics were the consequences of the Lefschetz formula on a to be defined cohomology theory). A fortiori, the idea of viewing arithmetic through a geometric lens should certainly not be credited to Grothendieck, whose contribution (at least, the first and most relevant to the question) was the much more precise and technical insight that combining Serre's idea of studying varieties through the cohomology of coherent sheaves on the Zariski topology and Nagata's and Chevalley's generalization of affine varieties to spectrum of arbitrary rings, one would get the language required to carry over Weil's program.    
I cannot resist concluding with the following anecdote of Serre. In a talk he gave in Orsay in Autumn 2014 on group theory, he started by explaining that finite group theory should be of interest to many different kind of mathematicians, if only because the Galois group of an extension of number fields or the fundamental group of a topological space are examples of finite groups. In fact, he continued, these two kind of groups are the same thing and (quoting from memory and in my translation) "that they are the same thing is due to German mathematicians of the late 19th century, of course, except in Orsay where it is due to Grothendieck."
A: *

*Minkowski, H.
On geometry of numbers. (Ueber Geometrie der Zahlen.) (German) JFM 23.0208.04
Naturf. Ges. Halle LXIV. 13 (1891).

