Using Lagrange multipliers Say we want to minimize the distance from the point $(x, y, z)$ to the origin $$f(x,y,z)=x^2+y^2+z^2$$ subject to the constraint that the point lie on the line $x^2+y^2=3, \, z=1$, and we can easily see that all points on the line has a distance of $2$ to the origin
I have two questions:


*

*How many tangent planes does a point, let's say,$(1,\sqrt{2}, 1)$ have in 3-dimensional space?infinite? My understanding for a tangent plane is that,any planes only touch the graph on one point can be called an tangent plane, then there are infinite on a line beacuae you can tilt planes in different angles, making it tangent to the point.

*$\nabla f(x,y,z)=\left \langle 2x,2y,2z \right \rangle$ then how can I write $g(x)$ to use Lagrange multipliers with $\nabla f(x,y,z)$ to find out extrema? (the result should be infinite extrema which is distance of $2$)

A smooth curve $\gamma$ in $3$-space has a unique tangent line at each of its points $p$. If $\pi$ is a plane containing such a tangent then you would say that the curve touches $\pi$, but you would not call $\pi$ a tangent plane to $\gamma$.
In your example $\gamma$ is a circle, given as intersection of a cylinder and a line. The intersection is transversal at all of its points, meaning that the two intersecting surfaces have different normals at the points of intersection.
In such a case Lagrange's method, set up correctly, brings to the fore all points $p\in\gamma$ where $\nabla f(p)$ is orthogonal to the tangent line at $p$. In your example it so happens that this is the case at all points $p\in\gamma$. The conclusion is that $f$ is in fact constant on $\gamma$  – of course you knew that all along.
