All right, I was playing around with a function of four variables tonight, and I want to know how to find the normal vector to its surface at an arbitrary point.
The function is f(u, v, x, y) = 1 - w - x - y - z + 2ux + 2vy + uy + vx. The gradient is simple to compute; it’s [symbol]Ñ[/symbol]f(u, v, x, y) = (-1 + 2x + y, -1 + 2y + x, -1 + 2u + v, -1 + 2v + u). Note the symmetry, cause it’s interesting.
Now I want the normal vector to the tangent plane at the point (a, b, c, d). Based on what I found in my calc III book, my best guess is that the gradient is the normal vector to the tangent plane. But it’s been a long time since I took calc III.
So howsabout it, folks? Is this right, or am I way off base? If I’m wrong, could someone steer me in the right direction, with an explanation of how to find said normal vector?
I’m a little confused on one point. Are the coordinates of your system (u, v, x, y) or (w, x, y, z)? I’m not sure that it makes much of a difference. Just wondering.
I’m fairly sure that in three dimensions, the gradient vector of a scalar function f is the normal vector to a plane tangent to a surface of constant f. (Don’t forget that last part.) It points in the direction of increasing f. I never took 4-d Calculus, but I believe that you’d have to have a space tangent to a 3-surface of constant f, but other than that, it would be the same.
Hey ultrafilter, your book is right on. The gradient most certainly is perpendicular to the tangent hyperplane at every point. Enjoy your higher-dimensional math!
The coordinate system is (u, v, x, y). Substitute u and v for w and z (geez, how’d I do that?).
Now I’m gonna see if I can’t argue that fact (“The gradient most certainly is perpendicular to the tangent hyperplane at every point”). Well, not tonight, but you know what I mean…
Just FYI, this function arose out of my working with the Monty Hall problem. If the host puts the prize behind door 1, 2, or 3 with respective probabilities u, v, and 1 - u - v, and you choose door 1, 2, or 3 with respective probabilities x, y, and 1 - x - y, then f(u, v, x, y) represents the probability that you chose correctly. I can’t plot it, so I decided to analyze it.
The gradient is perpendicular to the “level curve/surface” at your point (a,b,c,d). I’m not entirely convinced that that makes it perpendicular to the surface itself. I s’pose it should be. But something doesn’t sound quite right…
Erika is right. Something is wrong here. For 2D surfaces with equations of the form z = f(x,y), the gradient is a 2-dimensional vector in the plane that points in the direction of the greatest increase of the funtion (i.e. “the direction to walk if you want to climb the mountain the fastest”). To find the normal vector to a 2D surface at a point, take the cross product of the two vectors tangent to the surface at the point that have slope given by the partial derivatives (at the point) and that are parallel to the (x,z)-plane and the (y,z)-plane (respectively). More precisely, take the cross product of
i + D[sub]x[/sub]f(x,y)k
and
j + D[sub]y[/sub]f(x,y)k.
These two vectors span the tangent plane at that point, so their cross-product is normal to that plane.
(This will give you a vector pointing in the right direction. But you will still need to normalize it if you want the unit norm at that point, say.)
In the case of a 3D “surface”, you’d need to find a vector pair-wise perpendicular to three other vectors, rather than the two above. The cross-product worked for doing this in the 2D case above, but in the 3D case I guess you’ll have to pull in some linear algebra and solve Ax = 0, where A is the 3-by-4 matrix which has your three tangent vectors as rows. x will then be a normal vector at that point. Note that the tangent vectors will be 4-vectors, though some of their coordinates will be zero.
I haven’t worked out what the three tangent vectors are that would be analogous to the two I gave above, but I imagine they look similar, and should be deducible from similar considerations…
Oh; I just realized that you have a 4D surface. So you need to find four 5-dimensional tangent vectors, and solve Ax = 0 where A is the 4-by-5 matrix whose rows are you tangent vectors. But the same pattern should hold…I hope.
Sorry. I was thinking two-dimensionally. To be more accurate, I should have said that the cross product is
-D[sub]x[/sub]f(x, y)i - D[sub]y[/sub]f(x, y)j + k
But this is still -1 times grad f(x, y, z), because in this case, z = f(x, y), and so in order for f(x, y, z) to be constant we’d have to require that f(x, y, z) = f(x, y) - z + const.
Basically, this boils down to two questions:[ol][li] How do you find the tangent hyperplane to a hypersurface?[/li] How do you find the normal vector to a hyperplane?[/ol]The first one is definitely the harder of the two, and I’ll look into it once I get home tonight.
Ah, I realize what you’re asking about now. You don’t want a 4-vector normal to a 3-plane tangent to a surface of constant f. You want the 5-vector normal to a 4-plane tangent to a surface defined by f. Well if that’s the case then I would make a new function (sort of like what I did in my last post) defined thusly:
F(u, v, x, y, z) = f(u, v, x, y) - z
Notice that for every point defined by f (that is, z = f(u, v, x, y)), F is a constant (0). Now take the gradient of F. It’s going to be:
I’m not sure what the problem is with this. Isn’t that what you’d expect? The normal vector of a surface should be the gradient of the function for which that surface is a level curve. In fact the solution you did provide reflects exactly this reasoning.
The simplest way to do this is to construct the gradient vector which is perpendicular to the tangent plane. Then (Del f) dot <x,y,z> = 0 is the equation of the tangent plane.
2x[sub]0[/sub]x + 2y[sub]0[/sub]y- 2z[sub]0[/sub]z = f(x,y,z,) = equation of the tangent plane at the point (x[sub]0[/sub], y[sub]0[/sub], z[sub]0[/sub])