# How to find the set of all points in a submanifold minimizing the distance to a given point?

I have the following set $$M$$ defined as the set of all points $$(x,y,z)$$ such that $$x^2+y^2-z^2=-1$$. And I'm asked the following three questions :

a) Prove that this is a submanifold of $$R^3$$
b) Find its tangent space in the point (2,2,3)
c) Find the set of all point $$p_0 \in M$$ which minimizes the distance to the point $$q= (0,0,4)$$

I would like to know if my procedures for a) and b) are correct, and how exactly I should proceed for c)

a) To prove that this is a submanifold, we just take the derivative of $$f(x,y,z) = x^2+y^2-z^2+1$$ and set it equal to zero. Then we need to check that the results aren't contained in the set. So $$(2x,2y,-2z)=(0,0,0)$$ So the only point is $$(0,0,0)$$, which isn't contained in our set (we get $$0=-1$$ which is obviously wrong)

b) To find it's tangent space to the point $$(2,2,3)$$, we input our point into our derivative and find its kernel. So we get $$(4,4,-6)=(0,0,0)$$. If we solve this, we get $$(-1,1,0)$$ and $$(\frac{3}{2},0,1)$$. Now the tangent space to this point is simply the span of these two vectors.

c) Now my problem is here. I couldn't find an example in my book about this step. There were example for a) and b), but nothing for c). Do I somehow need to use $$d=\sqrt{(x-x_0)^2+(y-y_0)^2)+(z-z_0)^2)}$$ ?
Also, I searched on the internet but didn't find "practical/ computing-type" examples for this question. I found a lot of abstract definitions but no real examples, that's why I'm asking.

Edit : Okay, just in case this helps someone in the future. What is expected in c) is that we use the distance formula squared (to make life simpler), i.e. $$(x-x_0)^2+(y-y_0)^2+(z-z_0)^2$$, then our vector from q to p is $$(x-0)^2+(y-0)^2+(z-4)^2$$, the gradient of which is $$(2x, 2y, 2z-8)$$. The idea is to use Lagrange multiplier with the set M (i.e. $$x^2+y^2-z^2+1$$) as a constraint. So we get as in the comments $$(2x, 2y, 2z-8)= \lambda (2x, 2y, -2z)$$ which yields after solving : $$z=2$$ and x and y are free variables. We then plug $$z=2$$ into our set M, which gives the circle $$x^2+y^2=3$$. Thus all the points that minimize the distance are $$(\sqrt{3}cos(\theta), \sqrt{3}sin(\theta), 2)$$.

Maybe this will help someone in the future.

• If you are considering a closed (no boundary) submanifold as in this case then note that a maximum and a minimum corresponds to points where the differential of the function vanishes. So all you have to do is consider the gradient of your distance function and then look for points where this is orthogonal to the tangent space of the submanifold. – ThorbenK Dec 18 '18 at 12:26
• @ThorbenK Well, isn't that what I did for a) and b) ? – Poujh Dec 18 '18 at 12:28
• In a sense. But now you have to consider a different gradient namely the one from your distance function. If you Google "Lagrange multiplier" you can learn more about this. Even though I don't think this deserves its own name. – ThorbenK Dec 18 '18 at 12:37
• @ThorbenK I know what Lagrange multiplikator is. So my constraint is basically the distance function $d=\sqrt{(x-x_0)^2+(y-y_0)^2)+(z-z_0)^2)}$ ? And so I need to solve $\nabla f = \lambda \nabla g$ ? – Poujh Dec 18 '18 at 12:43
• I don't see, why the downvote ? I did my best trying to solve this problem. The answer of John Hugues was also downvoted, I don't understand why :/ – Poujh Dec 20 '18 at 8:47

b) To find it's tangent space to the point (2,2,3), we input our point into our derivative and find its kernel. So we get (4,4,−6)=(0,0,0). If we solve this, we get (−1,1,0) and (32,0,1). Now the tangent space to this point is simply the span of these two vectors.'

I have three corrections here.

The first is that "it's" means "it is"; pronouns' possessive forms have no apostrophes. The word you want to use is "its".

Second, the statement $$(4,4,−6)=(0,0,0)$$ is false. I think you meant to say that $$v$$ is in the kernel if and only if $$(4,4,−6) \cdot v=(0,0,0)$$.

Third, if we solve that correctly written equation, we don't just get $$(−1,1,0)$$ and $$(32,0,1)$$ --- we get all vectors of the form $$a(−1,1,0) + b (32,0,1)$$ (where $$a$$ and $$b$$ are arbitrary real numbers). What kind of result would you have ended up with if you'd made the equally correct claim that "If we solve this, we get $$(-1, 1, 0)$$ and $$(4, -4, 0)$$"?

As for part 3, here's a big hint: if $$p \in M$$ is as close as possible to $$q$$, then

1. the vector from $$p$$ to $$q$$ is perpendicular to the tangent plane at $$p$$, and
2. the point $$p$$ satisfies the defining equation for $$M$$.

Now that you seem to have solve the problem using Lagrange, I'll go ahead and work out what I was suggesting. Let's let $$p = (x, y, z)$$. Then condition $$1$$ says that the vector $$v = (x, y, z-4)$$ from $$q$$ to $$p$$ must be parallel to the normal vector at $$p$$, which is proportional to $$n = (x, y, -z)$$ So we know that $$v$$ is a multiple of $$n$$, say $$(x, y, z-4) = \lambda(x, y, -z)$$ ...which is exactly the same equation you came up with using Lagrange multipliers. And the algebra is all the same form here on out.
Why do we get the same equation? Because the gradient [i.e., direction of fastest growth] (at a point $$p$$) of the "distance from $$p$$ to a fixed point $$q$$" function is exactly a multiple of the ray from $$q$$ to $$p$$: if you want to increase that distance fastest, you move in the direction of that ray!
• 'What kind of result would you have ended up with if you'd made the equally correct claim that "If we solve this, we get (−1,1,0) and (4,−4,0)"?' Well, we would have the same result as they belong to the span of our two vectors. For part 3 : given that the gradient is also perpendicular to the tangent plane, and thus parralel to $pq$, do we have to take the dot product of the gradient and the vector $pq$ and set it equal to 1 ? And then solve accordingly ? – Poujh Dec 18 '18 at 15:52
• Using Lagrange as described in this question math.stackexchange.com/questions/1740699/… and using the distance squared as you say there, I get $(2x,2y,2z-8)= \lambda (2x,2y,-2z)$ I get $\lambda = 1, z = 2$ and $x$ and $y$ are free. So the set of all points that minimize the distance is $(x,y,2)$ Does that seem correct ? – Poujh Dec 18 '18 at 16:27
• That's almost correct. The points must also lie on $M$. Once you have $z = 2$, $x$ and $y$ must satisfy $x^2 + y^2 = 3$. So the solutions are points $(\sqrt{3}\cos t, \sqrt{3}\sin t, 2)$, for $0 \le t < 2\pi$. Have you drawn a picture to make certain that this result is consistent with the symmetries of the original problem? You probably should... – John Hughes Dec 18 '18 at 16:44
• The function is not a sphere...because it's a function. But its level-set --- the points $(x,y,z)$ where $f(x,y,z) = 0$ --- is in fact a nice set. For each fixed value of $z$, we have $x^2 + y^2 = z^2-1$. So for $-1 < z < 1$ there are no points, but for $|z| > 1$, we have circles in planes-of-constant-$z$. If we look just at points where $y = 0$ (to get a sense of things), we have $x^2 = z^2 - 1$, which is a hyperbola in the $xz$-plane. So the overall shape is a hyperboloid of 2 sheets, symmetric about the $z$-axis. – John Hughes Dec 18 '18 at 16:53
• We don't have to visualize. But it's sure a good skill. For instance, if you'd noticed the circular symmetry at the start, you could have restricted attention to the $xz$-plane, making computations easier. And noticing symmetries can often provide a sanity-check: if you'd algebraically come up with a single answer, but knew the problem had circular symmetry, you'd want to look closely at your algebra. As for "easier ways", I think that the one I proposed --- the segment $pq$ is parallel to the normal at $p$ --- might be simpler, but I confess I haven't actaully worked through it. – John Hughes Dec 18 '18 at 17:06