# Non-commutative multiplication in Mathematica

• Mathematica
• topsquark
In summary, Dan is looking for a way to do calculations with non-Abelian groups, specifically quaternions, in Mathematica. He also wants to know if it's possible to define arbitrary group definitions. Ackbach suggests defining a function and finding a matrix representation for these groups, but Dan is unsure how to proceed with this. He then jokes about his difficulty with searching and mentions his ex-fiancee doing it for him. Ackbach suggests using 2x2 matrices to represent $D_6$ and quaternions, but Dan wonders if there are non-abelian groups that cannot be represented by matrices. He jokes about his counseling group not being able to be represented by matrices.
topsquark
Gold Member
MHB
Does anyone know if it's possible to tell Mathematica to do calculations with non-Abelian groups, such as the quaternions? For example, how do you tell it to do (3 + j)(4 - i)? I would like to extend this beyond quaternions so is there is a way to define arbitrary group definitions?

Thanks!

-Dan

topsquark said:
Does anyone know if it's possible to tell Mathematica to do calculations with non-Abelian groups, such as the quaternions? For example, how do you tell it to do (3 + j)(4 - i)? I would like to extend this beyond quaternions so is there is a way to define arbitrary group definitions?

Thanks!

-Dan

Hey Dan!

I don't know about arbitrary, but you can define any function you want, like I did with my LabVIEW quaternion library. You define the data structures you need, and the functions on those data structures.

I like Serena said:
Hey Dan!

Go figure. All I had to do was search Mathematica for quaternions. I suck at doing searches. (My ex-fiancee used to do all that for me.)

Thanks. Now if I could just get it to do $$\displaystyle D_6$$ or others. I haven't the foggiest idea how to follow up on Ackbach's suggestion. There's got to be a way to do the Mathematica thing but I have an old copy and I don't think I can get modules for that anymore.

-Dan

Addendum: You know, if I could find a matrix representation I could probably do it. Have to see about that.

topsquark said:
Go figure. All I had to do was search Mathematica for quaternions. I suck at doing searches. (My ex-fiancee used to do all that for me.)

Thanks. Now if I could just get it to do $$\displaystyle D_6$$ or others. I haven't the foggiest idea how to follow up on Ackbach's suggestion. There's got to be a way to do the Mathematica thing but I have an old copy and I don't think I can get modules for that anymore.

-Dan

Addendum: You know, if I could find a matrix representation I could probably do it. Have to see about that.

Defining a function in Mathematica works like this:

Code:
f[x_, y_]=x^2 * y

That's obviously not all you need, but that's a fundamental piece.

topsquark said:
Thanks. Now if I could just get it to do $$\displaystyle D_6$$ or others. I haven't the foggiest idea how to follow up on Ackbach's suggestion. There's got to be a way to do the Mathematica thing but I have an old copy and I don't think I can get modules for that anymore.

-Dan

Addendum: You know, if I could find a matrix representation I could probably do it. Have to see about that.

Indeed. We can represent $D_6$ with 2x2 rotation and reflection matrices.
And we can also represent the quaternions with 2x2 matrices, which is a bit more straight forward.
Now I wonder which non-abelian group cannot be represented by matrices... (Wondering)

I like Serena said:
Now I wonder which non-abelian group cannot be represented by matrices... (Wondering)
Probably my counseling group. (Emo)

-Dan

## 1. What is non-commutative multiplication in Mathematica?

Non-commutative multiplication in Mathematica is a type of multiplication operation where the order of the factors affects the result. In other words, the product of two expressions is not the same if the order of the factors is reversed. This type of multiplication is commonly used in algebra and physics, where the order of operations is important.

## 2. How is non-commutative multiplication different from regular multiplication in Mathematica?

In regular multiplication, the order of the factors does not affect the result. For example, in regular multiplication, 2 x 3 and 3 x 2 both equal 6. However, in non-commutative multiplication, these expressions would result in different values. In Mathematica, non-commutative multiplication is denoted by the symbol ** or by using the NonCommutativeMultiply function.

## 3. What are some common uses of non-commutative multiplication in Mathematica?

Non-commutative multiplication is often used in mathematical and scientific fields, such as algebra, quantum mechanics, and group theory. It is also commonly used in computer programming languages like Mathematica to perform calculations involving non-commutative operations.

## 4. How do I perform non-commutative multiplication in Mathematica?

To perform non-commutative multiplication in Mathematica, you can use the ** symbol or the NonCommutativeMultiply function. For example, to multiply the expressions a and b in non-commutative order, you can use a ** b or NonCommutativeMultiply[a, b].

## 5. Can non-commutative multiplication be applied to more than two factors in Mathematica?

Yes, non-commutative multiplication can be applied to any number of factors in Mathematica. For example, you can use a ** b ** c to multiply the expressions a, b, and c in non-commutative order. The order in which the factors are written will affect the result.

Replies
2
Views
2K
Replies
4
Views
1K
Replies
5
Views
4K
Replies
2
Views
2K
Replies
1
Views
2K
Replies
4
Views
3K
Replies
5
Views
5K
Replies
1
Views
2K
Replies
5
Views
2K
Replies
2
Views
3K