Why is Hilbert's Seventeenth Problem important? I'm self-learning about Model Theory and I just got to the proof of Hilbert's 17th Problem via Model Theory of Real Closed Fields. The 17th problem asks to show that a non-negative rational function must be the sum of squares of rational functions.
It seems to me that I lack a strong enough understanding of the context of the problem to understand its significance. Why did Hilbert think it was important enough to include it as one of his 23 problems?
 A: I am not an expert on the history of math nor on the mathematics around Hilbert's 17th problem, so I welcome corrections and other insights from others more knowledgeable than me. Also, most of what I'm going to say already appears on the Wikipedia page for the 17th problem, but hopefully I can turn it into a useful answer.
The first connection between squares and positivity is the observation that a real number $r$ is a square if and only if $r \geq 0$. This is no longer true for integers and rational numbers, but it remains true that a number is $\geq 0$ if and only if it is a sum of squares (trivially for the integers by writing $n = \underbrace{1^2 + \dots + 1^2}_{n \text{ times}}$ and slightly less trivially for the rationals by writing $\frac{a}{b} = \underbrace{\left(\frac{1}{b}\right)^2 + \dots + \left(\frac{1}{b}\right)^2}_{ab\text{ times}}$). Lagrange famously improved this in 1770 by showing that every non-negative integer is the sum of four squares, from which it follows easily that the same is true for non-negative rational numbers.
Now it's natural to ask analogous questions for other (partially) ordered rings. Let's say a function $f\colon\mathbb{R}^n\to \mathbb{R}$ is non-negative if $f(x)\geq 0$ for all $x\in \mathbb{R}$. If $f$ is a sum of squares of real-valued functions, then it is obviously non-negative. Does the converse hold? Well, yes, $f$ is the square of the function $\sqrt{f}$. But in analogy to restricting to integers or rational numbers above, the question becomes more interesting if we want to represent $f$ as a sum of squares of polynomials or rational functions.
Hilbert proved in 1888 that there are non-negative polynomials over $\mathbb{R}$ which are not sums of squares of polynomials (but the first explicit example of such a polynomial was apparently not found until 1967!). On the other hand, in 1893, Hilbert showed that any non-negative polynomial over $\mathbb{R}$ in at most $2$ variables is a sum of squares of rational functions.
It's then a very reasonable conjecture that we can remove the restriction on the number of variables. In the years between 1893 and Hilbert's address in 1900, I would be surprised if Hilbert didn't try to extend his result at least to the case of polynomials in $3$ variables - but evidently even this incremental improvement was out of reach. So as a natural question, related to Hilbert's previous work, and apparently resistant to the current methods of 1900, it's not surprising that Hilbert would have included it on his list.
And indeed, the resolution of the problem (both the original purely algebraic solution and its elegant reformulation using model theory) only came after the introduction of bold new ideas, namely the Artin-Schreier theory of real closed fields.
