Studying surface integrals I have come up with a problem when I try to generalize some formulas. In case I need a normal unit vector of a surface in $\mathbb{R}^n$, how can I get it? For a surface in $\mathbb{R}^3$ which is parameterized I usually do the vector product of the partial derivatives but, in higher dimensions, I don't know how to get it. Is the unitary normal vector still calculated as $\frac{\nabla f}{||\nabla f||}$ ? As a special case, if I could write it as $x_n=\phi(x_1, ..., x_{n-1})$ for some $x_1, ..., x_n$, is there an easier way to get it?
Thanks
I think you want the orthogonal complement of the tangent space of the $(n-1)$-manifold (your surface) in the tangent space of the $n$-manifold containing it (in your case, $\mathbb{R}^n$).
Taking the orthogonal complement of one subspace with respect to another gives you the general case of normals to a curved manifold embedded in another curved manifold. For example, if you have a curve embedded in a curved surface (like a sphere) that is itself embedded in $\mathbb{R}^n$, and you want the normals to the curve in the surface (e.g. as normals to the boundary of a piece cut out of the surface), you find tangent spaces of the curve and the surface at each point of the curve, and find the orthogonal complement of one with respect to the other.
If you just want to compute it numerically, then Gaussian elimination can in theory be used, but in practice if you've got floating point numbers you're better off using a linear algebra maths library.
If you want to do it algebraically, then there's a formalism using Clifford algebra to represent a tangent space as the (unit) wedge product of its basis vectors. (The wedge product is closely related to the vector product, but can be generalied to more than three dimensions.) For example, $T_X=x_1\wedge x_2\wedge \ldots\wedge x_{k-1}$ embedded in $T_Y=y_1\wedge y_2\wedge \ldots\wedge y_k$ are related by $T_xn=T_y$, $n$ being a unit normal vector, so $n=T^{-1}_XT_Y$. Hestenes has used this approach (his version of Real Clifford Algebra being called 'Geometric Algebra') to produce a unification and further generalisation of the many variations on the Generalised Stokes Theorem and the Cauchy Integral formula to higher dimensions. McDonald fills in some of the gaps. I'm not sure if it will be of much use to you - Hestenes' version of Clifford Algebra is more popular with physicists than mathematicians, and it takes a while to figure out the new terminology and notation. If you're trying to generalise surface integral theorems to higher dimensions, I thought it might be interesting to see what others have done along those lines.