Volume and barycentric coordinates of $k$-simplex in $\Bbb{R}^{n}$ How can the volume and barycentric coordinates (aka area/triangular coordinates) of a $k$-simplex in $\Bbb{R}^{n}$ be calculated given the vertices? In general $k \le n$ but any special cases for $k=n$ should be noted. Give formulas both directly in terms of the $k+1$ vertex vectors and also in terms of $k$ edge vectors originating from one vertex.
An example is finding the area of a triangle in 3D space. This is an extension of this question with this useful answer. Incidentally, my motivation is applying natural boundary conditions in the finite element method.
 A: I'll answer my own question. I'm not a mathematician and any confirmation or elaboration of the following would be appreciated. The simplex can be given by vertices $v_1,\ldots,v_{k+1}\in\Bbb{R}^n$ or by edges $e_1,\ldots,e_{k}$ relative to vertex $v_{k+1}$ where $e_i=v_i-v_{k+1}$.
When $k=n$ (eg a tetrahedron in 3D space) it is well known that the volume is given by the determinant
$$\pm\frac{1}{k!}\begin{vmatrix}
e_1 & \cdots & e_k
\end{vmatrix}\tag{1}\label{1}$$
which follows from the fundamental property of the determinant being the volume of the parallelepiped spanned by its column vectors. By vertices the volume is
$$\pm\frac{1}{k!}\begin{vmatrix}
1 & \cdots & 1 \\
v_1 & \cdots & v_{k+1}
\end{vmatrix}\tag{2}$$
which can either be derived algebraically from the edge determinant, or by thinking of the row of $1$s as an extra dimension $h$ the simplex has been lifted into such that the $n$-simplex is in the $h=1$ plane and hence forms the base of a $(n{+}1)$-pyramid in $\Bbb{R}^{n+1}$ with apex at the origin and whose height is $1$ and whose edges are the columns of the given matrix.
In the general case of $k \le n$, the determinant is not obviously defined and \eqref{1} cannot be applied directly, but it can be expanded into
$$\frac{1}{k!}\sqrt{\begin{vmatrix}
(e_1 & \cdots & e_k)^T(e_1 & \cdots & e_k)
\end{vmatrix}}\tag{3}\label{3}$$
which involves the determinant of the Gramian. That was a simple algebraic manipulation for the $k=n$ case but \eqref{3} also works for $k<n$ and these notes help explain why it works. In terms of vertices, the volume in the general $k \le n$ case is given by
$$\frac{1}{k!}\sqrt{-\begin{vmatrix}
0 & 1 & \cdots & 1 \\
1 & v_1 \cdot v_1 & \cdots & v_1 \cdot v_{k+1} \\
\vdots & \vdots & \ddots & \vdots \\
1 & v_{k+1} \cdot v_1 & \cdots & v_{k+1} \cdot v_{k+1}
\end{vmatrix}}\tag{4}\label{4}$$
which is similar to \eqref{3} (expand the matrix multiplication) and can be derived by algebraic manipulation. I did this myself so am not totally sure it's correct. I have no geometric interpretation of this, though note that the determinant is $\begin{vmatrix}(a & v_1 & \cdots & v_{k+1})^T(b & v_1 & \cdots & v_{k+1})\end{vmatrix}$ for some $a$ and $b$ which are orthogonal to each other and give $1$ when dotted with each $v$, if that's even possible.
The barycentric coordinates $\xi$ are given in terms of the original coordinates $x$ by
$$\xi^*=\begin{pmatrix}e_1 & \cdots & e_k\end{pmatrix}^{-1}(x-v_{k+1})\tag{5}\label{5}$$
and the left inverse of a matrix $A$, which is $(A^TA)^{-1}A^T$, can be used when $k < n$. This only gives the first $k$ coordinates and the last one is simply the difference of the sum of the others with unity. In terms of vertices
$$\xi=\begin{pmatrix}
1 & \cdots & 1 \\
v_1 & \cdots & v_{k+1}
\end{pmatrix}^{-1}
\begin{pmatrix}1 \\ x\end{pmatrix}\tag{6}\label{6}$$
and again the left inverse can be used for the non-square matrix when $k < n$.
Both come from the equation $\begin{pmatrix}v_1 & \cdots & v_{k+1}\end{pmatrix}\xi=x$, which is an expression of the fact that the barycentric coordinates of a single vertex (a $1$ and many $0$s) select a single column of the matrix that multiplies it. For \eqref{5} $\begin{pmatrix}v_{k+1} & \cdots & v_{k+1}\end{pmatrix}\xi$ is subtracted from both sides, noting it is simply equal to $v_{k+1}$ on the right and getting rid of the resulting zero column on the left. For \eqref{6}, the row of $1$s are added to ensure the matrix is invertible. It's not clear to me that the left inverse can always be taken so any comments welcome here.
In summary, formulas for the volume and barycentric coordinates are well known for the $k = n$ case. For the $k < n$ case, the key operations of taking the determinant and the inverse are slightly modified but the formulas remain essentially the same. I have no reference for the form given in \eqref{4}.
