Let $f\colon\mathbb{R}^n\to\mathbb{R}$ be a function with $n\geq 2$, and define $S_{f}=\{(x_1,x_2, \ldots x_n) \in\mathbb{R}^n \mid f(x_1,x_2, \ldots x_n)=1\} = f^{-1}(1)$.
Is $S_f$ path-connected when $f$ is $C^{\infty}$? If not, what about if $f \in \mathbb{Q}[x_1,\ldots,x_n]$?
Context: I had to establish that the set of diagonal square matrices with $\det=1$ was path-connected, which I did, but it got me thinking on more general lines.
By the way, please answer (if possible) such that one needs as little prerequisites as possible to understand.
Added: Though Eric has already answered the question. There's a natural next question to ask: For what kinds of functions is this set path-connected?