## A closed set generated by a formula

The set $$M \subseteq \mathbb R^3$$ is defined as $M = \{(x,y,z) \in \mathbb R^3\colon \space x^2 + y^2 + z^2 = 17, \space xyz -xz + x + y = 3 \}.$ Show that $$M$$ is a closed subset of $$\mathbb R^3$$.
Define functions $$F, G \colon \space \mathbb R^3 \to \mathbb R$$ as $$F(x,y,z) = x^2 + y^2 + z^2$$, $$G(x,y,z) = xyz - xz + x + y$$. Then $$M = F^{-1}(\{17\}) \cap G^{-1}(\{3\})$$. $$F$$ a $$G$$ are continuous and the sets $$\{17\}$$ and $$\{3\}$$ are closed. Using one of the equivalent definitions of continuity (the image of a closed set is a closed set), we get the that $$M$$ is the intersection of two closed sets, and therefore closed.