$$f:\mathbb{R}^2 \rightarrow \mathbb{R}\\ (x,y) \rightarrow x^2 +y^2\\ S=\{(x,2) \ |\ x \in \mathbb{R}\}$$
I tried using Lagrange multipliers. I started by deriving the equation $x^2+y^2$ to get $f: 2x+2y$. Then I had $g(x,y)= (x,2)$ and derived it to get $g(x,y)= (1,0)$. I then set up the following equations:
$2x+2y= \lambda (1,0)$
$2x= \lambda $
$2y= 0$
Then I don't know what to do. Am I doing something wrong? Is my approach correct? How do I find the relative extrema from doing this since I only know $\lambda = 2x$?