Clifford Algebra with Mathematica
Total Page:16
File Type:pdf, Size:1020Kb
Clifford Algebra with Mathematica J.L. ARAGON´ G. ARAGON-CAMARASA Universidad Nacional Aut´onoma de M´exico University of Glasgow Centro de F´ısica Aplicada School of Computing Science y Tecnolog´ıa Avanzada Sir Alwyn William Building, Apartado Postal 1-1010, 76000 Quer´etaro Glasgow, G12 8QQ Scotland MEXICO UNITED KINGDOM [email protected] [email protected] G. ARAGON-GONZ´ ALEZ´ M.A. RODRIGUEZ-ANDRADE´ Universidad Aut´onoma Metropolitana Instituto Polit´ecnico Nacional Unidad Azcapotzalco Departamento de Matem´aticas, ESFM San Pablo 180, Colonia Reynosa-Tamaulipas, UP Adolfo L´opez Mateos, 02200 D.F. M´exico Edificio 9. 07300 D.F. M´exico MEXICO MEXICO [email protected] [email protected] Abstract: The Clifford algebra of a n-dimensional Euclidean vector space provides a general language comprising vectors, complex numbers, quaternions, Grassman algebra, Pauli and Dirac matrices. In this work, we present an introduction to the main ideas of Clifford algebra, with the main goal to develop a package for Clifford algebra calculations for the computer algebra program Mathematica.∗ The Clifford algebra package is thus a powerful tool since it allows the manipulation of all Clifford mathematical objects. The package also provides a visualization tool for elements of Clifford Algebra in the 3-dimensional space. clifford.m is available from https://github.com/jlaragonvera/Geometric-Algebra Key–Words: Clifford Algebras, Geometric Algebra, Mathematica Software. 1 Introduction Mathematica, resulting in a package for doing Clif- ford algebra computations. There exists some other The importance of Clifford algebra was recognized packages and specialized programs for doing Clif- for the first time in quantum field theory. Lately, there ford algebra; CLIFFORD/Bigebra is a Maple package has been a tendency to exploit their power in many arXiv:0810.2412v2 [math-ph] 22 Jan 2018 which include additional specialized packages such as others fields. These fields include projective geome- SchurFkt (for the Hopf Algebra of Symmetric Func- try [9], electrodynamics [11], analysis on manifolds tions) and GfG - Groebner for Grassmann (for Com- and differential geometry [8], crystallography [18, 2] puting Groebner Bases for Ideals in Grassmann Alge- to name a few. A recent account of the applications bra) [1]; TCliffordAlgebra is as add-on application for of Clifford algebra in fields such as robotics, com- the Mathematica package Tensorial that implements puter vision, computer graphics, engineering, neural Clifford algebra operations [16]; CLICAL is a stand- and quantum computing, etc., can be found in [3] and alone calculator-type computer program for MS-DOS [19]. [15]. While the first two packages requires more spe- General introductions to Clifford algebra can be cialized knowledge of Clifford algebras, CLICAL and found in several books (see for instance Refs. [17] the package presented here is easy to use and can be and [4]). Here, a gently introduction to the Clifford used by non mathematicians. More recently, Clif- Rn algebra of is presented together with some exam- ford Multivector Toolbox, a toolbox for computing ples to show the generality of this algebra in order to with Clifford algebras in MATLAB, has been released provide a general language comprising vectors, com- [6]. A more specialized package is GAViewer pack- plex numbers and quaternions. The main goal is to age, designed for computation and visualization of ob- implement the basic operations of Clifford algebras in jects in conformal geometric algebra [5] (for a more ∗ recent account and application see Ref. [12]). We Mathematica is a registered trademark of Wolfram Research, Inc. must emphasise that with the exception of the Maple packages, the other packages and toolboxes only al- where 1 is the identity of the algebra. The product so low numeric computations. Our Clifford Mathematica defined is associative: package allow us to carry out numerical and symbolic computations with complex numbers, quaternions, the a(bc) = (ab)c, hyperbolic plane, Grassmann algebra and, Dirac and and we are constructing an algebra A equipped with Pauli algebras, all defined within the Clifford algebra an identity 1. framework. Our package clifford.m is available With the vector space and the product (1), the re- for download at: sulting algebra of all possible sums and products of https://github.com/jlaragonvera/Geometric-Algebra vectors in Rn is called the Clifford algebra of Rn and is denoted by Cln. Note in particular that Rn 2 The Clifford algebra of a2 = ha, ai 2 The set of n-tuples of the form (x1,x2, ..., xn) with ei = 1 (2) the standard operations of addition and multiplication eiej = −ejei, i 6= j. for real numbers is a vector space, over the field of Rn real numbers, which we denote as . It means that The Clifford algebra Cln is itself a vector space of the addition of -tuples, and multiplication by real n n n n dimension p=0 p = 2 , with basis numbers satisfy certain properties which are those of P n a vector space [13]. The canonical basis of R is the {1, e1,..., en, e1e2,..., e1en,..., e1e2 · · · en} , set of n-dimensional vectors {e1, e2, ..., en} where n such that an element A in Cl is written as hei, eji = δij and h , i is a inner product in R . An n element v of Rn is written as a linear combination of A = a0 + a11e1 + · · · + a1 e + a21e1e2 + this canonical basis: i n + · · · a2ie1en + · · · + adie1e2 · · · en, (3) v = x1e1 + x2e2 + · · · + xnen. n n where d = 2 − 1 and i = p for the real num- It is said therefore that the n-tuple (x1,x2, ..., xn) bers api. Consequently, the vector space Cln can be is the coordinate vector of v with respect to the canon- decomposed in n + 1 subspaces as: ical basis e e e . { 1, 2, ..., n} 0Rn 1Rn nRn The vector space Rn has two operations defined: Cln = Λ ⊕ Λ ⊕···⊕ Λ . (4) addition of vectors and multiplication of vectors by Each subspace is of dimension n . scalars. The multiplication by vectors between them- p The elements A (Eqn. 3) of the Clifford alge- selves is not defined. The algebraic structure which bra Cl are called multivectors, and those of ΛpRn, considers multiplication between vectors is called an n p-vectors. In particular, 0-vectors are real num- algebra. bers and dim(Λ0Rn) = 1. Λ1Rn has the ba- An algebra A is a vector space over a field F to- sis {e1, e2,..., e }, so 1-vectors are simply vec- gether with a binary multiplication ab in A such that n tors and dim(Λ1Rn) = n. Λ2Rn has the ba- form any a, b, c ∈A and α ∈ F [10]: sis {e1e2, e1e3,..., e1en} and their elements (2- nRn a b c ac bc vectors) are also called bivectors. Finally, Λ has ( + ) = + n n as basis {e1e2 · · · e } and since dim(Λ R ) = 1, the a(b + c) = ab + ac n n-vectors of Cln are referred as pseudoscalars. α(ab) = (αa)b = a(αb). In this paper, arbitrary multivectors will be de- noted by non bold upper case characters without or- Rn In the case of the vector space , the field F namentation such as A. p-vectors will be denoted by is the set of real numbers. In order to construct an A , with the exception of vectors (1-vectors), that will Rn p algebra from , it is required to define a product ab be denoted by bold lower case characters such as a. Rn Rn between vectors in . One particular product in Bearing in mind that the decomposition of the can be defined as follows. vector space Cl as the direct sum of the subspaces Rn n Let us consider the vector space with ΛpRn, 0 ≤ p ≤ n, given in (4), any multivector A can the inner product ha, bi and an orthonormal basis n be written as {e1, e2, ..., en}. We construct an algebra from R by Rn introducing a product between vectors in that sat- A = hAi0 + hAi1 + · · · + hAin, (5) isfies the condition where hAip, the p-vector part of A, is the projection of p n ab + ba = 2ha, bi1, (1) A ∈Cln into Λ R . h i is called the grade operator. 2.1 Innner and outer products 2.2 Geometric interpretation Given the decomposition (4), an important property of Bivectors have an interesting geometric interpretation. a Clifford algebra is the existence of products that al- Just as a vector describes an oriented line segment, lows us to move from one subspace of Cln to another. with the direction of the vector representing the ori- Let us first consider the product of two 1-vectors. For ented line and the magnitude of the vector, the length 1Rn all u, v ∈ Λ , their product uv can be written as of the segment; a bivector a ∧ b describes an ori- 1 1 ented plane segment, with the direction of the bivec- uv = (uv + vu)+ (uv − vu) . tor representing the oriented plane and the magnitude 2 2 of the bivector measuring the area of the plane seg- Now define the “inner” and “outer” products as fol- ment (Figure 1). The same interpretation is extended lows to high-order terms: a ∧ b ∧ c represents an oriented 1 volume. In general, multivectors contain information u · v = (uv + vu)= ha, bi, 2 about orientation of subspaces. 1 u ∧ v = (uv − vu) . 2 2.3 The main involution The inner product is symmetric and notice that vectors u and v are orthogonal if an only if uv = −vu. The The magnitude or modulus of a multivector A is de- outer product u∧v is antisymmetric (and associative) fined by the equation and vanishes whenever the two vectors are collinear, that is, u and v are collinear (or linearly dependent) 1/2 if an only if uv = vu.