CrossN | R Documentation |
Vector cross product of n-1
vectors in n-dimensional space
CrossN(A)
A |
matrix of size |
The rows of the matrix A
are taken as(n-1)
vectors in
n
-dimensional space. The cross product generates a vector in this
space that is orthogonal to all these rows in A
and its length is
the volume of the geometric hypercube spanned by the vectors.
a vector of length n
The ‘scalar triple product’ in R^3
can be defined as
spatproduct <- function(a, b, c) Dot(a, CrossN(b, c))
It represents the volume of the parallelepiped spanned by the three vectors.
Hans W. Borchers <hwborchers@googlemail.com>
Cross
, Dot
A <- matrix(c(1,0,0, 0,1,0), nrow=2, ncol=3, byrow=TRUE)
CrossN(A) #=> 0 0 1
x <- c(1.0, 0.0, 0.0)
y <- c(1.0, 0.5, 0.0)
z <- c(0.0, 0.0, 1.0)
identical(Dot(x, CrossN(rbind(y, z))), det(rbind(x, y, z)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.