Disclaimer

This is a work in progress. So far, only the geometric product seems to work and it has not been tested much. There is no inner nor outer product yet, but once the geometric product works reliably, the inner and outer products implementation should be straightforward.

Also, this will probably only work on Google chrome, as the code relies on the recent inclusion on big natural integers in javascript.

Introduction

Clifford.js is a javascript library that performs computations on the Universal geometric algebra with multivariate polynomial coefficients. Thus, it allows computations on expressions such as : $$ 1 + (1+x+x^2)\mathbf{e}_1 + xyz\,\mathbf{e}_2\wedge\mathbf{e}_3 $$ That particular example can not be simplified, though. An other example would be an expression such as \(\mathbf{e}_1\wedge\mathbf{e}_2\wedge\mathbf{e}_1\), which should be simplified as 0.

Numbers

Literal numbers are integers of arbitrary size. Dividing two of them may return a rational number. There is no support for decimal or floating-point numbers. Neither is there any support for scientific notation such as 1e6.

Only rational numbers can be used as a divisor.

Variables

Right now, only twenty-six variables are possible, each named after a letter of the alphabet. Variables are assumed to represent an undetermined real scalar value. Algebraic operations on variables spans the algebra of multivariate polynomials.

Basis vectors

The universal geometric algebra contains three orthogonal spaces.

  1. An Euclidean Space is spanned by an orthonormal basis \(\mathbf{e}_0,\mathbf{e}_1,\ldots\). To enter those basis vectors, a "$" prefix is used : $0, $1, ...
  2. An anti-Euclidean Space is spanned by a basis \(\mathbf{\bar e}_0,\mathbf{\bar e}_1,\ldots\) To enter those basis vectors, a "%" prefix is used : %0, %1, ...
  3. A Minkowskii space is spanned by a null basis \(n_o, n_\infty\). To enter those basis vectors, the words no and ni are used respectively.

Tests

Enter an algebraic expression below

The table below tests various inputs.

input .toTeX()

Dependencies