pseudoscalar()
in the
clifford
package## function ()
## {
## m <- getOption("maxdim")
## if (is.null(m)) {
## stop("pseudoscalar requires a finite value of maxdim; set it with something like options(maxdim = 6)")
## }
## else {
## return(e(seq_len(m)))
## }
## }
To cite the clifford
package in publications please use
Hankin (2022). This short document
discusses the pseudoscalar I
in the clifford
R package. The behaviour of I depends on the dimension n and the signature of the space
considered, and as such function pseudoscalar()
fails if
maxdim
is not set:
## Error in pseudoscalar(): pseudoscalar requires a finite value of maxdim; set it with something like options(maxdim = 6)
Function pseudoscalar()
needs option maxdim
to ascertain what object to return. Let us set maxdim
to
7:
## Element of a Clifford algebra, equal to
## + 1e_1234567
The example above makes it clear that pseudoscalar()
returns the unit pseudoscalar, in whatever dimension we are
working in. The usual workflow would be to define maxdim
and a signature at the start of a session, then define an R object
(conventionally I
), as the pseudoscalar. However, in this
vignette we will repeatedly redefine the signature and the maximum
dimension to illustrate different aspects of
pseudoscalar()
. The first feature of I is that |I|2 = 1. For standard
ℝ2 and ℝ3, and Minkowski space Cl (3, 1) we have I2 = −1:
## Element of a Clifford algebra, equal to
## + 1e_123
## [1] -1
And for Minkowski space:
## [1] -1
However, we can easily define other signatures in which I2 = +1:
## Element of a Clifford algebra, equal to
## + 1e_1234
## [1] 1
The pseudoscalar I defines an orientation in the sense that, for any ordered set of n linearly independent vectors a1, …, an their outer product will have either the same or opposite sign as I. Because the orientation is negated by interchanging a pair of vectors, we see that the orientation is preserved by even permutations of 1, 2, …, n. Working in Cl (5, 0):
options(maxdim=5)
signature(5)
I <- pseudoscalar()
ai <- list(); for(i in 1:5){ai[[i]] <- as.1vector(rnorm(5))}
ai[[1]] # the other 5 look very similar
## Element of a Clifford algebra, equal to
## + 1.263e_1 - 0.32623e_2 + 1.3298e_3 + 1.2724e_4 + 0.41464e_5
## Element of a Clifford algebra, equal to
## + 3.3202e_12345
Above we see, from the last line, that the vectors a1 to a5 are independent (the
result is nonzero). Further, we see that the vectors are a right-handed
set, for the wedge product is positive. We can permute the vectors using
the permutations
package (Hankin
2020):
## [1] (12)(345)
## [1] FALSE
Above, we see that p
is an odd permutation,
being a product of a transposition and a three-cycle.
## [1] 3.3202 -3.3202
Above, we see that the sign of the wedge product of the permuted list has changed, consistent with the permutation’s being odd. We know various things about the pseudoscalar; below we will verify that a ⋅ (AI) = a ∧ AI for vector a and multivector A:
## Element of a Clifford algebra, equal to
## + 1e_1234567
## Element of a Clifford algebra, equal to
## + 7e_1 + 6e_2 + 1e_3 + 4e_4 + 8e_5
## Element of a Clifford algebra, equal to
## + 7 + 2e_4 + 7e_234 - 6e_1345 + 9e_16 - 8e_126 + 6e_236 + 3e_1236 - 1e_1356 - 9e_2456
Above we choose randomish values for a and A. Observe that A has terms of different grades; it
is not homogeneous. Numerical verification is straightforward [NB:
“%.%
” breaks markdown documents]:
## Element of a Clifford algebra, equal to
## the zero clifford element (0)