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$)

The answer to your first question is "none".  Tangent planes are tangent to surfaces, not points or curves.  If a surface has a sharp point, then there is no tangent plane at that point.  To be "tangent", the plane must also be a good approximation to the surface, which means the surface has to be smooth.
To segue to your second question, there are two constraint surfaces here.  The cylinder $x^2+y^2 = 3$ and the plane $z=1$.  So there will be 2 Lagrange multipliers.  Let $g = x^2+y^2$ and $h=z$.  Solve $\nabla f = \lambda \nabla g + \mu \nabla h$ along with the two constraints.  It turns out that every point on the constraint curve is a solution.
