2
$\begingroup$

We have $\left\{\vec{v_1},\vec{v_2},\vec{v_3}\right\}=\left\{\begin{bmatrix}1\\0\\0\\0\end{bmatrix},\begin{bmatrix}1\\1\\1\\1\end{bmatrix},\begin{bmatrix}1\\2\\3\\4\end{bmatrix}\right\}$

QR-factorization gives $\text{det }(A^TA)=\text{det }(R^TR)=\text{det }(R^2)$ such that $\sqrt{\text{det }(A^TA)}$ yields the volume of our desired parallelepiped. Letting $A=\begin{pmatrix}1&1&1\\0&1&2\\0&1&3\\0&1&4\end{pmatrix}$,

$\sqrt{\text{det }(A^TA)}=\sqrt{\begin{pmatrix}1&0&0&0\\1&1&1&1\\1&2&3&4\end{pmatrix}\begin{pmatrix}1&1&1\\0&1&2\\0&1&3\\0&1&4\end{pmatrix}}=\sqrt{\text{det }\begin{pmatrix}1&1&1\\1&4&10\\1&10&30\end{pmatrix}}$

Expanding down the first column of $\begin{pmatrix}1&1&1\\1&4&10\\1&10&30\end{pmatrix}$ using Laplace yields $\text{det }\begin{pmatrix}1&1&1\\1&4&10\\1&10&30\end{pmatrix}=6$, such that $\sqrt{\text{det }(A^TA)}=\sqrt{6}$, which is the volume of the desired parallelepiped.


Is there a quicker and more energy-efficient algorithm to solve this? I know that for $3\times3$ matrices we can use $\text{det }A=\vec{u}\cdot(\vec{v}\times\vec{w})$, given $\left\{\vec{u},\vec{v},\vec{w}\right\}$ span the columns of $A$. Is there an analog here?

$\endgroup$
2
  • 1
    $\begingroup$ is not the volume zero? $\endgroup$
    – abel
    Apr 7 '15 at 22:47
  • 1
    $\begingroup$ The 4-volume, yes. But they are linearly independent, therefore they span a 3-volume. $\endgroup$ Apr 7 '15 at 22:50
3
$\begingroup$

$\newcommand{\Reals}{\mathbf{R}}\newcommand{\Basis}{\mathbf{e}}$Since volume of a parallelipiped spanned by a set of vectors is invariant under the operation of adding a scalar multiple of one vector to another, it suffices to compute the volume of the parallelipiped spanned by $$ \left[\begin{array}{@{}c@{}} 1 \\ 0 \\ 0 \\ 0 \\ \end{array}\right],\qquad \left[\begin{array}{@{}c@{}} 0 \\ 1 \\ 1 \\ 1 \\ \end{array}\right],\qquad \left[\begin{array}{@{}c@{}} 0 \\ 0 \\ 1 \\ 2 \\ \end{array}\right]. \tag{1} $$ The last two vectors (each lying in the coordinate $3$-space $\{x_{1} = 0\}$ orthogonal to the first vector) span a parallelogram $P$ whose area is the magnitude of the cross product $$ (1, 1, 1) \times (0, 1, 2) = (1, -2, 1), $$ namely $\sqrt{6}$. Since the first vector has unit length and is orthogonal to $P$, the three vectors in (1) span a prism of volume $\sqrt{6}$.

Naturally, there's "good fortune" in this example: After "column reduction", the first column was a standard basis vector orthogonal to the remaining columns.


Alternatively, there's a "cross product" for $(n - 1)$ vectors in $\Reals^{n}$ whose definition generalizes the usual cross product in $\Reals^{3}$: Assemble your vectors into an $(n - 1) \times n$ matrix, prepend the standard basis vectors into the first row (obtaining a square matrix) and take the determinant. The magnitude of the resulting vector is the volume of the parallelipiped of the original set of vectors. (See below.) Here you'd have $$ \left\lvert\begin{array}{@{}cccc@{}} \Basis_{1} & \Basis_{2} & \Basis_{3} & \Basis_{4} \\ 1 & 0 & 0 & 0 \\ 1 & 1 & 1 & 1 \\ 1 & 2 & 3 & 4 \\ \end{array}\right\rvert = \left\lvert\begin{array}{@{}cccc@{}} \Basis_{1} & \Basis_{2} & \Basis_{3} & \Basis_{4} \\ 1 & 0 & 0 & 0 \\ 0 & 1 & 1 & 1 \\ 0 & 0 & 1 & 2 \\ \end{array}\right\rvert = \Basis_{2} - 2\Basis_{3} + \Basis_{4},\qquad \|\Basis_{2} - 2\Basis_{3} + \Basis_{4}\| = \sqrt{6}. $$ (I leave to you the assessment of whether this is more energy-efficient for your purposes, though again I think there's a favorable comparison in this example.)

This "generalized cross product" has the advertised property for reasons analogous to the situation with the ordinary cross product:

  • If $(v_{j})_{j=1}^{n-1}$ and $w$ are vectors in $\Reals^{n}$ and $v_{1} \times \dots \times v_{n-1}$ denotes the "cross product" described above, then $$ \left\lvert\begin{array}{@{}c@{}} w \\ v_{1} \\ \vdots \\ v_{n-1} \\ \end{array}\right\rvert = (v_{1} \times \dots \times v_{n-1}) \cdot w. \tag{2} $$

  • By (2), the cross product $v_{1} \times \dots \times v_{n-1}$ is orthogonal to each $v_{j}$, and therefore orthogonal to the parallelipiped spanned by the $(v_{j})$.

  • The preceding item and the fact that the determinant in (2) is the $n$-dimensional volume of the parallelipiped spanned by the $(v_{j})$ and $w$ implies that the $(n - 1)$-dimensional volume of the parallelipiped spanned by the $(v_{j})$ is the magnitude of their cross product.

$\endgroup$
2
  • $\begingroup$ Did you get $\newcommand{\Reals}{\mathbf{R}}\newcommand{\Basis}{\mathbf{e}}$ $ \left\lvert\begin{array}{@{}cccc@{}} \Basis_{1} & \Basis_{2} & \Basis_{3} & \Basis_{4} \\ 1 & 0 & 0 & 0 \\ 0 & 1 & 1 & 1 \\ 0 & 0 & 1 & 2 \\ \end{array}\right\rvert = \Basis_{2} - 2\Basis_{3} + \Basis_{4}$ using Laplace? $\endgroup$ Apr 8 '15 at 0:17
  • $\begingroup$ @BenjaminLoya: Yes. expanding about the second row. :) (As you probably noticed, there's an overall sign error in the vector, though the magnitude is correct.) $\endgroup$ Apr 8 '15 at 10:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.