Coding in Quaternions and Matrices

  • Thread starter leon1127
  • Start date
  • #1
486
0
I am currently doing some research in Clifford Algebra. My topic is to find explicit representation of its basis through matrices with entries in clifford algebra itself. At this moment I am trying to write code in mathematica to do KroneckerProduct and Quaternion multiplication. Now I have encounter a coding problem about mathematica.
In the package of << Algebra`Quaternions`, quaternion multiplication is defined with ** instead of *, where in matrix multiplication product of entries are defined with *. Thus when I use quaternion entries in my matrix multiplication, its matrix product will give me, say, Quaternion[0,1,0,0]Quaternion[0,0,1,0] instead of Quaternion[0,0,0,1]
where Quaternion[a,b,c,d] = a + b i + c j + d k.
Does any one have any idea to override this function.

Thank you.
 

Answers and Replies

  • #2
486
0
I have rewritten my problem due to my horrible english. PLease forgive me.



I am currently doing some research in Clifford Algebra. My topic is to find explicit representation of its basis through matrices with entries in clifford algebra itself. At this moment I am trying to write code in mathematica to do KroneckerProduct and Quaternion multiplication. Now I have encounter a coding problem about mathematica.
In the package of << Algebra`Quaternions`, quaternion multiplication is defined with ** (non-commutative multiplicative operator) instead of *, where matrix multiplication assumes communtivity of elements. Of course this is not the case when I use non-commutative ring on my matrices.

for examples
When I do {{0,Quaternion[0,0,1,0]},{Quaternion[0,0,1,0],0}} * {{0,-Quaternion[0,1,0,0]},{Quaternion[0,1,0,0],0}}, it will give me {{0, 0, Quaternion[0, 0, 1, 0] Quaternion[0, 1, 0, 0], 0}, {0, 0, 0, Quaternion[0, -1, 0, 0] Quaternion[0, 0, 1, 0]},{Quaternion[0, 0, 1,0] Quaternion[0, 1, 0, 0], 0, 0, 0}, {0, Quaternion[0, -1, 0, 0] Quaternion[0, 0, 1, 0], 0, 0}}

My main problem is that when I try to define the following operation Quaternion[a_, b_, c_, d_]Quaternion[e_, f_, g_, h_] := Quaternion[a, b, c, d] ** Quaternion[e, f, g, h]. It automatically assumes commutativity, i.e Quaternion[0,1,0,0]Quaternion[0,0,1,0] = Quaternion[0,0,1,0]Quaternion[0,1,0,0]. But we know they should anticommute instead.

Does any one have any idea to override this function.

Thank you.
 

Related Threads on Coding in Quaternions and Matrices

  • Last Post
Replies
9
Views
5K
  • Last Post
Replies
1
Views
4K
  • Last Post
Replies
2
Views
3K
  • Last Post
Replies
10
Views
3K
Replies
3
Views
3K
  • Last Post
Replies
12
Views
4K
  • Last Post
Replies
11
Views
3K
  • Last Post
Replies
14
Views
5K
  • Last Post
Replies
15
Views
3K
  • Last Post
Replies
10
Views
2K
Top