<<

arXiv:0810.2412v2 [math-ph] 22 Jan 2018 nrdcint h anieso lfodagba ihthe with program , algebra Clifford the of for ideas calculations main the to algebra, introduction Grassman , , complex vectors, Abstract: olfreeet fCifr ler nte3dmninls 3-dimensional the in mathematic Algebra Clifford Clifford of all elements of for manipulation tool the allows it since Key–Words: https://github.com/jlaragonvera/Geometric-Algebra Inc. lxnmesadqaenos h anga sto is in goal Clifford main of operations The basic the implement quaternions. and com- to numbers vectors, order comprising plex in language algebra general this a of provide generality the show to ples n 4) ee etyitouto oteClifford the to [17] introduction gently Refs. of a algebra instance Here, for [4]). (see and books several in found and [3] in found be [19]. com- can etc., neural , computing, , quantum as and graphics, such applications computer the fields vision, of in puter account algebra recent Clifford A of few. a 2] name [18, crystallography to [8], on analysis differential and [11], many geome- electrodynamics projective in [9], include power fields try their These exploit to fields. others tendency there Lately, a theory. been field recognized quantum has in was time algebra first the Clifford for of importance The Introduction 1 ∗ Mathematica eea nrdcin oCifr ler a be can algebra Clifford to introductions General h lfodagbao -iesoa ulda etrsp vector Euclidean n-dimensional a of algebra Clifford The R nvria ainlAtooad M´exico Aut´onoma de Nacional Universidad a al 8,ClnaReynosa-Tamaulipas, Colonia 180, Pablo San lfodAgba,GoercAgba ahmtc Softwa Mathematica Algebra, Geometric Algebras, Clifford n praoPsa -00 60 Quer´etaro 76000 1-1010, Postal Apartado speetdtgte ihsm exam- some with together presented is sargsee rdmr fWlrmResearch, Wolfram of trademark registered a is nvria Aut´onoma Metropolitana Universidad .ARAG G. etod F´ısica Aplicada de Centro [email protected] Tecnolog´ıa Avanzaday [email protected] nddAzcapotzalco Unidad 20 ..M´exico D.F. 02200 ..ARAG J.L. lfodAgbawith Algebra Clifford MEXICO MEXICO ON-GONZ ´ ON ´ ALEZ ´ Mathematica [email protected] lojcs h akg lopoie visualization a provides also package The objects. al pace. al n ia arcs nti ok epeetan present we , this In matrices. Dirac and Pauli h lfodagbapcaei hsapwru tool powerful a thus is package algebra Clifford The . ∗ uigGobe ae o dasi rsmn Alge- Grassmann [1]; in bra) Ideals for Bases Groebner puting and tions) as SchurFkt such packages specialized additional include which ihCifr lersin algebras recently, Clifford with More Toolbox be can . and ford use non to by easy is used here presented package the akgsadseilzdporm o on Clif- doing for programs algebra; other ford some specialized exists and There packages computations. algebra ford Mathematica 6.Amr pcaie akg is package specialized more A [6]. spe- algebras, more Clifford requires of packages knowledge two cialized first the While [15]. for program computer calculator-type alone the eetacutadapiainseRf 1].We the of [12]). exception the with Ref. that see more emphasise application a must (for and [5] account algebra recent geometric conformal in ob- of jects visualization and computation for designed age, lfodagbaoeain [16]; operations algebra Clifford anga odvlpapcaefrCifr algebra Clifford for package a develop to goal main eatmnod Matem´aticas, ESFM de Departamento ..RODR M.A. Mathematica colo optn Computing of School Mathematica lso,G28QScotland 8QQ G12 Glasgow, i ly ila Building, William Alwyn Sir dfii .030DF M´exico D.F. 07300 9. Edificio .ARAGON-CAMARASA G. clifford.m nttt Polit´ecnico Nacional Instituto [email protected] PAof L´opez Mateos, Adolfo UP nvriyo Glasgow of University NTDKINGDOM UNITED TCliffordAlgebra c rvdsagnrllnug comprising language general a provides ace frteHp ler fSmercFunc- Symmetric of Algebra Hopf the (for f renrfrGrassmann for Groebner - GfG re. eutn napcaefrdigClif- doing for package a in resulting , CLIFFORD/Bigebra MEXICO IGUEZ-ANDRADE ´ package saalbefrom available is MATLAB olo o computing for toolbox a , sa d-napiainfor application add-on as is Tensorial CLICAL sa is a enreleased been has , GAViewer htimplements that Maple CLICAL sastand- a is frCom- (for MS-DOS package Maple pack- Clif- and packages, the other packages and toolboxes only al- where 1 is the identity of the algebra. The 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 , Grassmann algebra and, Dirac and and we are constructing an algebra A equipped with Pauli algebras, all defined within the an identity 1. framework. Our package clifford.m is available With the vector 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 of n- of the form (x1,x2, ..., xn) with ei = 1 (2) the standard operations of and eiej = −ejei, i 6= j. for real numbers is a , 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 p=0 p = 2 , with numbers satisfy certain properties which are those of P  n a vector space [13]. The 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 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- (x1,x2, ..., xn) bers api. Consequently, the vector  space Cln can be is the 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 which bra Cl are called , 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 . 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 . α(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 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 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 of p n ab + ba = 2ha, bi1, (1) A ∈Cln into Λ R . h i is called the grade . 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 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 of the vector, the 1Rn all u, v ∈ Λ , their product uv can be written as of the segment; a 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 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 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- 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. Thus, the product uv pro- |A| = AA , (8) D E0 vides information about the relative directions of the e vectors. Anticommutativity means and where ∼ denotes the reverse defined as commutativity means . Notice that for the n bases vectors of R , we have ∼ (e1e2 · · · ep) = ep · · · e2e1. eiej = ei ∧ ej, i 6= j, 2 The operation reverse is distributive [8] so that the ei · ei = ei = 1. reverse of an arbitrary multivector A can be easily cal- From the following equality culated. If the inverse of a multivector A exists, it is denoted by A−1 or 1/A, and is defined by the equa- uv = u · v + u ∧ v, tion AA−1 = 1. = huvi0 + huvi2, we can extend the notions of inner and outer product to the case of p- and q-vectors in the following way. 2.4 General metrics pRn qRn For a p-vector Ap ∈ Λ and a q-vector Bq ∈ Λ , In many physical applications one considers real vec- the inner product Ap · Bq is defined by tor Rn with metrics that are not positive defi- nite with the h , i, in (1), such that hApBqi|p−q| if p,q > 0, Ap · Bq =  0 if p = 0 or q = 0. 2 2 2 2 2 hx, xi = x + x + · · · + x − x −···− x , (6) 1 2 p p+1 p+q Analogously, the outer product Ap ∧Bq is defined by where n = p + q. In this case, the vector space is de- Rp,q A ∧ B = hA B i . (7) noted as , giving rise to the Clifford algebra Clp,q. p q p q p+q p,q Using the orthonormal basis {e1, e2,..., en} of R , Since arbitrary multivectors can be decomposed the relations (2) are now: as in (5), inner and outer product can be extended by to Cln. Then, given A, B ∈Cln, we have 2 ei = 1 1 < i ≤ p n 2 ei = −1 p < i ≤ n (9) A · B = hAik · hBil, eiej = −ejei, i 6= j. k,lX=1 n A ∧ B = hAik ∧ hBil, The p is called the of the bilinear k,lX=1 form h , i. 3 Clifford algebra calculations with ntuple[x_, dim_]:= Mathematica ReplacePart[Table[0,{dim}],1,List @@ x /. e[k_]->{k}] According to Eqns. (6), (7) and (8), all that we should The signature of the bilinear form can be set by need to manipulate multivectors in a computer alge- using $SetSignature = p. Relations (9) can be bra program such as Mathematica, would be to define coded as: the two basic operations: geometric product and grade operator. In the first case, a simple for the bilinearform[e[i_],e[i_]]:= computation of the geometric product between multi- If[i <= $SetSignature, 1, -1] vectors can be devised by noticing that a general mul- With some exceptions, it is not necessary to define tivector (3) in Clp,q is formed by a linear combination of terms in the form the dimension of the vector space since it can be calcu- lated directly. The maximum dimension of the space m1 m2 mn where a is embedded can be extracted from the e1 e2 · · · en , (10) list: where mi = 1, 0, (i = 1, ..., n). Let us call blades to [x_]:= multivectors of the form (10). The geometric product List @@ x /. e[k_?Positive] -> k of two of these blades is: and, therefore, enables us to perform computa- (em1 em2 · · · emn ) (er1 er2 · · · ern )= tions in any dimension with any given signature. For a 1 2 n 1 2 n general multivector, we need the relations that include s m1+r1 m2+r2 mn+rn (−1) e1 e2 · · · en , (11) the distributivity of addition: where the sum mi + ri is evaluated modulus two, and dimensions[x_Plus]:= List @@ Distribute[tmp[x]] /. s = r m . tmp -> dimensions i j dimensions[a_]:= 1 ≤Xi

Therefore, the function to calculate the geometric where e1e2e3 is the of Cl3,0. We may actu- product of arbitrary multivectors is defined as ally take this as a definition of the . From (13), it is easy to define the function GeometricProduct[_]:= $Failed crossprod[v,w] that gives the cross product between GeometricProduct[m1_,m2_,m3__]:= two three-dimensional vectors v and w: tmp[ GeometricProduct[m1,m2],m3] /. tmp -> GeometricProduct crossprod[v_,w_]:= GeometricProduct[m1_,m2_]:= GeometricProduct[-e[1]e[2]e[3], geoprod[Expand[m1], Expand[m2]] OuterProduct[v,w]]

To complete the basic operations of a Clifford al- The associativity property of the geometric product al- gebra, we must define and implement the grade oper- ator. The following auxiliary function calculates the lows algebraic manipulations typical of real numbers that grade of a blade are not possible in the Gibbs’ since the cross and dot products are not generally associative. For example gradblade[a_]:= 0 /; FreeQ[a,e[_?Positive]] a × (b × c) 6= (a × b) × c. gradblade[x_]:= Plus @@ ntuple[x, Max[dimensions[x]]] Even more, many products such as a · (b · c) are not gradblade[a_ x_]:= even defined. With Clifford algebra all products are not gradblade[x] /; FreeQ[a,e[_?Positive]] only well defined but associative making simpler many al- Now, Grade[x,n] should extract the of gebraic manipulations and allowing to define grade n from the multivector X. Firstly, we consider and just as they are defined for real functions of the case when the multivector X is a blade of grade r: real variables, provided that we are careful to maintain the hXin = 0 if r 6= n and hXin = X if r = n. The order of the factors since geometric product is not commu- code reads: tative. Grade[x_, n_?NumberQ]:= One specific example that shows the simplicity of If[gradblade[x]==n,x,0]] some expressions if the geometric product is used, is con- cerning . Consider a vector v in Rn which is ro- For a general multivector X, we have: tated by an θ in the oriented plane characterized by Grade[x_Plus, n_?NumberQ]:= the bivector a ∧ b. After the , the vector v is trans- ′ Distribute[tmp[x,n],Plus] /. tmp -> Grade formed into v , given by [7]:

Functions GeometricProduct and Grade v = UvU, (14) enable us to construct all the operations which can be defined in a Clifford algebra, such as where e a ∧ b outer product (OuterProduct[v,w,..]), inner U = cos(θ/2)+ sin(θ/2). product (InnerProduct[v,w,..]), magnitude |a ∧ b| (Magnitude[v]), reverse (Turn[v]}), inverse The direction of the rotation (clockwise or counter clock- (MultivectorInverse[v]), dual (Dual[v,dim]), wise) is specified by the orientation of the bivector a ∧ b. and many others, all included in the package Eqn. 14 gives the rotated vector v′ regardless of the dimen- Clifford.m. This package works with general sion of the space in which it is embedded. No correspond- multivectors of the form (3), but particular cases can help ing simple expression exists in vector algebra. to envisage the power of multivector calculus, as it is made As an example, which can be easily visualized, con- explicit in what follows. sider the vector v = (1, 1, 1), to be rotated 90o maintaining invariant the plane xy. To characterizethe plane xy,wecan Scalar = 0 use a ∧ b where a = (1, 0, 0) and b = (0, 1, 0), in which case we get a rotation counterclockwise and is easy to see that v′ = (−1, 1, 1),but ifwe use b ∧ a then the rotation is clockwise and v′ = (1, −1, 1). Here is this example solved with Clifford:

In[1]:= << Clifford.m 1 In[2]:= v = e[1]+e[2]+e[3]; e1 e2 + e2 e3 In[3]:= plane = OuterProduct[e[1],e[2]]/ Magnitude[OuterProduct[e[1],e[2]]] 0.5 Out[3]= e[1]e[2] e 3 0 The operator U is now defined (U is the reverse of U): 1 -0.5 In[4]:= u = Cos[/4] + planee Sin[Pi/4]; In[5]:= vprime = GeometricProduct[Turn[u], 0 -1 e GeometricProduct[v,u]] 2 Out[5]= -e[1]+e[2]+e[3] -1 -0.5 0 -1 So we get a counterclockwise rotation where the vec- ′ e1 0.5 tor v = (1, 1, 1) becomes v = (−1, 1, 1). The imple- 1 mentation in Mathematica of this rotation is the function Rotation[v,a,b]. Figure 1: A vector, a bivector (plane) and the pseu- 5 Drawing multivectors in the 3- doscalar (cube) drawn with the aid of the function dimensional space. GADraw. The elements of the Clifford algebra can be visualized Cl3,0 If[OuterProduct[ToBasis[p], e[3]] === 0, in the 3-dimensional space, providing geometrical insights. = The package include a function to draw multivectors be- Table[Array[ToVector[mat[#],3] &,3] + longing to Cl3,0, called GADraw, that will be described in p-ToVector[mat[3],3],{t,0.25,2*Pi,0.25}], what follows. elms = GADraw includes embedded functions to draw vec- Array[sc*ToVector[Grade[Rotation[ tors, bivectors and the pseudoscalar of Cl3,0. For example mat[#],e[3], ToBasis[p]],1],3]&,3]; let us draw the multivector e3 + e1e2 + e2e3 + e1e2e3: cone= Table[elms+p-res[[3]],{t,0.25,2*Pi,0.25}]]; In[1]:= << Clifford.m In[2]:= A = e[3] + e[1]e[2] + = Graphics3D[{FaceForm[color], e[2]e[3]+e[1]e[2]e[3]; EdgeForm[], /@ cone}] In[3]:= GADraw[A]; Out[3]= Where ToBasis and ToVector are functions, de- fined on the same package Clifford; the former changes The result is shown in Fig. 1. The bivector is repre- from the coordinates of a vector to the basis notation (12) sented by an area and the pseudoscalar as a scalable cube. and the last one does the opposite. In the particular case of the vector (0, 0, 1), the arrow in its We must emphasize that the above code was included tip was generated by the following code [22]: with the aim to show that operations, rotations in this case, can be carried out by using the elements of mat[1] = Sin[t]*(e[1]/14)+Cos[t]*(e[2]/14), the Clifford algebra without requiring matrices. This al- mat[2] = Sin[t+0.25]*(e[1]/14) + Cos[t+0.25]*(e[2]/14), gebra provides a consistent computational framework with mat[3] = e[3]/5, significant applications in , vision and robotics [5]. This arrow is then translated and rotated (in this case to the tip of the vector (0, 0, 1)) with the aid of the function Rotation[mat,w,p], 6 Complex numbers where w = e3 and p is the vector that points the site where the tip of the arrow must be located. If Let us consider the Clifford algebra of the most simple sc=Sqrt[p[[1]]ˆ2 +p[[2]]ˆ2 +p[[3]]ˆ2]/2 space that has a geometrical structure: the plane R2,0. Tak- is a scale factor then all this procedure can be encoded as: ing the canonical basis {e1, e2}, a basis for the Clifford algebra Cl2,0 is {1, e1, e2, e1e2} and a general multivector In[10]:= MultivectorInverse[transform[w]] A ∈Cl2,0 has the form /. e[1]e[2] -> i

A = k0 + k1e1 + k2e2 + k3e1e2. a - bi + − Out[10]= ------We can decompose Cl2,0 as Cl2,0 = Cl2,0 ⊕Cl2,0, such 2 2 + − that Cl2,0 contains even grade elements and Cl2,0 contains a +b odd grade elements. Therefore, A can be expressed as the + − + + sum of two multivectors: A = A +A , where A ∈Cl2,0 − − 7 Quaternions and A ∈Cl2,0. That is

+ − Extending from the previous , we now develop A = A + A , the Clifford algebra of R3,0, equipped with the canon- + A = k0 + k3e1e2, ical basis {e1, e2, e3}. The Clifford algebra Cl3,0 − A = k1e1 + k2e2. is an eighth-dimensional vector space with the basis {1, e1, e2, e3, e1e2, e2e3, e1e3, e1e2e3}. A general mul- We focus our attention into Cl+ ; it is itself an algebra 2,0 tivector A ∈Cl3,0 is written as so that it is called the even of Cl2,0. By taking A = k0 + k1e1 + k2e2 + k3e3 + k4e1e2 + i = e1e2, (15) k5e2e3 + k6e1e3 + k7e1e2e3, + + − an element of Cl2,0 can be written as which can be also expressed as A = A + A , where + z = k0 + k3i. A = k0 + k4e1e2 + k5e2e3 + k6e1e3 − 2 A = k1e1 + k2e2 + k3e3 + k7e1e2e3. Since i = (e1e2)(e1e2) = −(e1e2e2e1) = −1, and i + + is itself a of rotations [7], we see that Cl2,0 is The even-grade elements A form the subalgebra + equivalent to the algebra of complex numbers. Cl3,0 of Cl3,0, equivalent to the algebra of quaternions. The algebraic operations of complex numbers can Hence, we have: therefore be worked out with Clifford. In orderto geta more standard notation we firstly define the function i = −e2e3, j = e1e3 (16) In[6]:= transform[x]:= x /. i -> e[1]e[2] k = −e1e2, which makes the identification (15). Here we have two complex numbers: leading to the famous equations 2 2 2 In[7]:= w = a + b i; i = j = k = −1, (17) In[8]:= z = c + d i; ijk = −1. The product (a + bi)(c + di) becomes With the identifications given in (16), an element of Cl+ can be written now as In[9]:= GeometricProduct[transform[w], 3,0 transform[z]] /. e[1]e[2] -> i Q = q0 + q1i + q2j + q3k, Out[9]:= a c - b c + b c i + a d i which, in view of the properties (17), is a . The equivalence between some built-in basic opera- The algebra of quaternions is therefore comprised in tions of complex numbers in Mathematica and those of a the same package. The basic operations of this algebra Clifford algebra defined the package is shown in the fol- are carried out by the function already defined, such lowing table: as GeometricProduct, MultivectorInverse, Magnitude and Turn. To simplify the operations, Built-in Objects Clifford.m Objects we have incorporated the definitions (16) and redefined some functions to work only with quaternions and complex numbers. The new functions begin with the Re[z] Grade[z,0] word Quaternion, namely, QuaternionProduct, Im[z] GeometricProduct[ QuaternionInverse, QuaternionMagnitude Grade[z,2],-e[1]e[2]] and QuaternionTurn. So, for instance the inverse of the quaternion q = a +3i +6j − 10k is Conjugate[z] Turn[z] In[11]:= q = a + 3 i + 6 j - 10 k; Abs[z] Magnitude[z] In[12]:= QuaternionInverse[q]

a-3i-6j+10k Out[12]= ------The inverse of the complex w can be calcu- 2 lated with MultivectorInverse: 145 + a 8 Grassmann algebra of Cl2,1. In three dimensions, the Gaussian of a surface f(x1, x2, x3)=0 can be written as [21]: The outer product (OuterProduct) defined in (7) is as- sociative and the identity 1, in a Clifford algebra Cl 0, is 1 2 2 n, k = n · ∇ n + (∇ · n) , also the identity for the outer product. Consequently, the 2 h i Rp,0 vector space with the outer product already defined is n n where = ∇f(x1, x2, x3)/ |∇f(x1, x2, x3)| is the an algebra of dimension 2 , which is called the Grassmann to the surface. In a three-dimensional space with metrics Rp,0 algebra of . Notice that it does not depend on the inner non positive definite, the of a scalar function φ product of the vector space, but just on the alternation of and the and Laplacian of a vector function f = the outer product. (f1,f2,f3) are defined as Grassmann algebra has relevance in modern theoreti- cal [14] and has the right structure for the theory ∂φ ∂φ ∇φ = (e1 · e1) e1 + (e2 · e2) e2 + of . The structure of this algebra contained in ∂x1 ∂x2 Clifford algebra allows us to reformulate Grassmann calcu- ∂φ (e3 · e3) e3, lus [14], and to give an extensive treatment of determinants ∂x3 [8], both in terms of Clifford algebra. 2 ∂f1 2 ∂f2 ∇ · f = (e1 · e1) + (e2 · e2) + ∂x1 ∂x2 2 ∂f3 9 The hyperbolic plane (e3 · e3) , ∂x3 Perhaps the simplest example of a problem involving non 2 2 2 3 ∂ 3 ∂ positive definite metrics is the Minkowsky model of the hy- ∇ f = (e1 · e1) 2 + (e2 · e2) 3 +  ∂x1 ∂x2 perbolic plane. Here we shall develop some basic ideas and 2 calculations just to give a flavor of this kind of application 3 ∂ (e3 · e3) 2 (f1e1 + f2e2 + f3e3) . of Clifford algebra and the use of the package Clifford ∂x3  for non positive definite metrics. In the next section, one We can use Clifford to evaluate all these expres- extra dimension is introduced and the resulting algebras sions: have great relevance in relativity theory and quantum me- chanics. In[1]:= << Clifford.m One can always visualize a surface of constant positive The adequate metrics is defined Gaussian curvature 1/R2 (see for instance [20] for con- In[2]:= $SetSignature = 2 cepts related to ) as a , with ra- dius R, embedded in a three dimensional . Here are the differential operators: 2 2 2 2 The surface is described by the equation x1+x2+x3 = R . In[3]:= var = {x1,x2,x3}; A surface of constant negative curvature, however, cannot In[4]:= GeoGrad[g_]:= be embedded in a Euclidean space, so alternative possibili- Sum[InnerProduct[e[k],e[k]] ties must be developed to visualize such surfaces. The sim- *D[g,var[[k]]]*e[k],{k,3}] plest surface of constant negative curvature is often called In[5]:= GeoDiv[v_]:= the hyperbolic plane, the Bolyai-Lobachevsky plane,or the Sum[InnerProduct[e[k],e[k]]ˆ2 pseudosphere. This surface can be globally embedded in a D[Coeff[v,e[k]],var[[k]]],{k,3}] space equipped with the Minkowsky metrics instead of the In[6]:= GeoLap[v_]:= Euclidean one. A three-dimensional Minkowsky space can Sum[(InnerProduct[e[k],e[k]]ˆ3)* D[v,{var[[k]],2}],{k,3}] be identified by the fact that if (x1, x2, x3) are the coordi- nates of a vector x in this space, then the to the The function Coeff[m,b], extracts the coefficient 2 2 2 2 is |x| = x1 + x2 − x3. of the blade b in the multivector m. The surface and their The equation normal are:

2 2 2 2 In[7]:= f := x1ˆ2 + x2ˆ2 - x3ˆ2 + Rˆ2; x + x − x = −R , (18) 1 2 3 In[8]:= = GeoGrad[f] / Magnitude[GeoGrad[f]]; defines a of two sheets intersecting the x3 axis at the points ±1. Either sheet (upper or lower) models an and, finally, the Gaussian curvature is: infinite surface without a boundary (the Minkowsky metric becomes positive definite upon it) that, as we shall see, has In[9]:= kGauss = (InnerProduct[norm,GeoLap[norm]]+ constant Gaussian curvature 2. −1/R (GeoDiv[norm])ˆ2)/2 // Simplify We can easily convince ourselves that Cl2,1 is indeed the three-dimensional Minkowsky space (the signature of 1 the bilinear form is 2). We shall proceed to calculate the Out[9]= ------Gaussian curvature of the hyperboloid (18) with the stan- 2 2 2 dard formulas of differential geometry but with the metrics x1 +x2 -x3 + Points in the surface fulfills: which are the familiar Pauli relations. Cl3,1 is also In[10]:= x3 = Sqrt[x1ˆ2 + x2ˆ2 + Rˆ2], called the Pauli algebra. Following the same reasoning, we can prove that the and therefore: even subalgebra of the Pauli algebra is isomorphic to the In[11]:= kGauss quaternions. The even subalgebra of the quaternions is iso- morphic to the complex numbers. The even subalgebra of -2 the complex numbers is R. Out[11]= -R which is the Gaussian curvature of the hyperboloid. Some considerations concerning the isometries 11 Conclusion (distance-preserving transformations) of the hyperbolic The basic ideas of the Clifford algebra of a vector space plane are pertinent before leaving this section. Like the Eu- are presented and a Mathematica package for calculations clidean ones, the isometries of the hyperbolic plane can be within this algebra is developed and demonstrated for com- described in terms of reflections about given axes. All these plex numbers, quaternions, the hyperbolic plane, Grass- isometries have simple expressions in terms of Clifford al- mann algebra and, Dirac and Pauli algebras. The relevance gebra. For instance, Eqn. (14) for rotations in a given plane of Clifford algebra in physics and mathematics lies in the remains valid in Cl2,1 but now is called a Lorentz trans- fact that it provides a complete algebraic framework of ge- formation. In general, given the vectors u1, u2,..., uk in ometric concepts such as directed lines, , volumes, Clp,q, such that (u1, u2,..., uk)(uk, uk−1,..., u1)=1, etc. (For this reason, Clifford algebra is also referred as the transformation [8]). such as vectors, com- k plex numbers, quaternions, Pauli and Dirac matrices, have v 7−→ (−1) (ukuk−1 ··· u1)v(u1u2 ··· uk) k been normally described by physicists with a mixture of = (−1) UvU, disjoint mathematical systems. All of them are naturally is an isometry [8]. If k ise even, the isometry is a rotation, contained in a Clifford algebra. It becomes therefore an ef- if k is odd, it is a reflection [2]. Now, if q = 0 (∈ Clp,q), ficient mathematical language in a vast of physics. transformations such as the previous one are orthogonal. Future work comprises extending our Mathematica pack- For q = 1 (as the case of the Minkoswky space) they are age to other high-level programming languages in order to Lorentz transformations. facilitate its adoption within the community. Acknowledgements: JLA wishes to thank UNAM- 10 Dirac and Pauli algebras DGAPA-PAPIIT for financially this research through grant IN106115. Now let us add one extra dimension to the space of the previous example and consider Cl3,1. This vector space is fifteen-dimensional with basis References: {1, e1, e2, e3, e4, e1e2, e1e3, e1e4, e2e3, e2e4, e3e4, [1] R. Abłamowicz and B. Fauser. Clifford/bigebra, e1e2e3, e1e3e4, e2e3e4, e1e2e3e4} . a maple package for clifford (co)algebra computa- tions, 2007. c 1996-2007, RA&BF. Available at The basis vectors e satisfy the relations: i www.math.tntech.edu/rafal/. 2 2 2 2 e1 = e2 = e3 = 1, e4 = −1, [2] G. Arag´on-Gonz´alez, J.L. Arag´on, and M.A. Rodr´ıguez. The decomposition of an orthogonal which is the algebra of the Dirac matrices in relativistic transformation as a product of reflections. J. Math. quantum theory. Due to this , is often Cl3,1 Phys. 47, 2006, Art. No. 013509 (10 pages). referred as the . + [3] E. Bayro-Corrochanoand G. Sobczyk. Geometric Al- The even subalgebra Cl3,1 has a basis gebra with Applications in Science and Engineering. 1 e e e e e e e e e e e e e e e e { , 1 2, 1 3, 1 4, 2 3, 2 4, 3 4, 1 2 3 4} Birkhauser, Boston 2001. and is equivalent to the algebra of the used 1 [4] R. Delanghe, F. Sommen, and V. Soucek. Clifford Al- in of - 2 particles. This can be gebra and -Valued Functions. D. Reidel Pub- seen with the identifications lishing Co., Holland 1992. σ1 = e1e4, σ2 = e2e4, σ3 = e3e4. [5] L. Dorst, D. Fontijne, and S. Mann. Geometric Alge- bra for Computer Science: An Object-Oriented Ap- By taking i = e1e2e3e4 = σ1σ2σ3, we get proach to Geometry. Morgan Kauffman, San Fran- 2 cisco, CA 2007. σi = 1, i =1, 2, 3 [6] S. Sangwine, and E. Hitzer. Clifford σ1σ2 = iσ3 Multivector Toolbox: A toolbox for com- σ2σ3 = iσ1 puting with Clifford algebras in Matlab. σ3σ1 = iσ2, http://clifford-multivector-toolbox.sourceforge.net. Created June 22, 1025. Last accessed December 1, 2015. [7] D. Hestenes. New Fundations for Classical Mechan- ics. D. Reidel Publishing Co., Holland 1987. [8] D. Hestenes and G. Sobczyk. Clifford Algebra to Ge- ometric Calculus. A unified Language for Mathemat- ics and Physics. D. Reidel Publishing Co., Holland 1985. [9] D. Hestenes and R. Ziegler. with clifford algebra. Acta Appl. Math., 23, 1991, 25–63. [10] N. Jacobson. Lectures in II: . Springer, New York 1984. [11] B. Jancewicz. Multivectors and Clifford Algebra in Electrodynamics. World Scientific, Singapore 1988. [12] K. Kanatani. Understanding Geometric Algebra: Hamilton, Grassmann, and Clifford for Computer Vi- sion and Graphics. A K Peters/CRC Press, Florida 2015. [13] S.Lang. Linear Algebra. Addison-Wesley, New York 1969. [14] A. Lasenby, C. Doran, and S. Gull. Grassmann cal- culus, pseudoclassical mechanics, and geometric al- gebra. J. Math. Phys. 34, 1993, pp. 3683–3712. [15] P. Lounesto. Clifford Algebras and . Cam- bridge University Press, Cambridge, 2001. [16] D. Park, R. Cabrera, and J.-F. Gouyet. Tensorial 4.0 - a mathematica package for calculus. MiER 12, 2097, pp. 109–122. [17] Ian Porteous. Clifford Algebras and . Cambridge University Press, Cambridge, 1995. [18] M.A. Rodr´ıguez, J.L. Arag´on, and L. Verde-Star. Clifford algebra approach to the coincidence prob- lem for planar lattices. Acta Crystallogr. A 61, 2005, pp. 173–184. [19] G. Sommer. Geometric Computing with Clifford Al- gebras Theoretical Foundations and Applications in and Robotics. Springer, Heidelberg 2001. [20] D.J. Struik. Differential Geometry. Addison-Wesley, New York 1961. [21] C.E. Weatherburn. Differential Geometry of Three Dimensions. Vol. 1. Cambridge University Press, Cambridge 1965. [22] T. Wickam-Jones. Mathematica Graphics: Tech- niques & Applications. Springer –Verlag, New York 1994.