The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
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 (2025). 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 \(\left|I\right|^2=1\). For standard \(\mathbb{R}^2\) and \(\mathbb{R}^3\), and Minkowski space \(\operatorname{Cl}(3,1)\) we have \(I^2=-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 \(I^2=+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 \(a_1,\ldots, a_n\) 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,\ldots,n\). Working in \(\operatorname{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 \(a_1\) to \(a_5\) 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\cdot\left(AI\right)=a\wedge 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)
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.