mathgeometrylinear-algebra4d

How to find the hyper-volume of the 4d analogue of a parallelepiped?


Firstly, does said analogue exist?

Secondly, how to find its 4d-volume/hyper-volume given 4 vectors for sides, ideally using dot, cross product, etc.

Thirdly, what would be the 3D analogue to surface area? Eg. 1D-Arc length, 2D-Surface area, 3D- Volume, 4D-?


Solution

  • What you are describing is generalized using the determinant.

    nD object embedded in an nD space

    For objects using all dimensions, e.g., a parallelogram in 2D or a parallelepiped in 3D, put the n vectors defining the sides of the (hyper-)parallelepiped as rows of a matrix and compute the determinant:

    2D       3D          4D             5D
    |x1 y1|  |x1 y1 z1|  |x1 y1 z1 w1|  (Repeat the same pattern)
    |x1 y2|  |x2 y2 z2|  |x2 y2 z2 w2|
             |x3 y3 z3|  |x3 y3 z3 w3|
                         |x4 y4 z4 w4|
    

    Note that the obtained (hyper-)volume is signed, depending on the orientation of the vectors. It is thus possible to have negative volumes.

    (n-1)D object embedded in nD space

    For objects using one dimension less than the space in which they live, e.g., a parallelogram in 3D space, you can use the cross-product (which derives from the determinant) or a generalization of the cross-product. For example, The area of a parallelogram embedded in 3D defined by two 3D vector (x1,y1,z1) and (x2,y2,z2) is calculated from matrix containing the two vectors as rows:

    [x1 y1 z1]
    [x2 y2 z2]
    

    From this matrix, simply create all combinations of 2x2 sub-matrix, calculate the determinant of each matrix, and put them in a vector as such

    [|y1 z1|, |z1 x1|, |x1 y1|] = (y1*z2-z1*y1, z1*x2-x1*z2, x1*y2-y1*x2)
    [|y2 z2|  |z2 x2|  |x2 y2|]
    

    You obtain a vector, and the length of this vector is the area of the parallelogram: sqrt((y1*z2-z1*y1)^2 + (z1*x2-x1*z2)^2 + (x1*y2-y1*x2)^2).

    The (Almost-)Ultimate Generalization

    From this last example, we can create a general recipe that works for any object embedded in any dimension (yes, you can calculate the volume of a 3D parallelepiped embedded in a 17D space):

    1. Put all vectors describing the object as rows of a (possibly non-square) matrix.
    2. Enumerate all possible combinations of square sub-matrices.
    3. Calculate the determinant of all these sub-matrices and put them in a list (the order is not important if all you want is the volume).
    4. Square these determinants individually.
    5. Sum them all.
    6. Take the square root of the result.

    Note that this last recipe gives the unsigned volume since you square then take the square-root.

    Final note: Obviously, this answer is more of a recipe than an explanation of why all these calculations work. For more information on this subject, I suggest you to look into Exterior Algebra, which is a formalism that uses the wedge product (a generalization of the cross-product) to define these hyper-volumes in a very general way.