# Is it possible to simplify an expression in vector form, which involves crossproduct and dot product?

I often need to simplify expressions involving cross product and dot product, for example:

f = Dot[Cross[Cross[p1 - p, e1], Cross[p2 - p, e2]], Cross[p3 - p, e3]]


where the symbols in the RHS are all 3-dimensional vectors, but it's undesired to refer to their components, because it's rather difficult to find useful information from the results. This simplification is very often required in fields such as kinematics and dynamics, and I believe many people have encountered this problem, but my search didn't return very relevant results.

Is there some way to handle this type of simplification? A possible solution I think that may work is that we may define some customized operators or functions to represent the cross product and dot product, then define a set of rules for these operators (or for the Simplify commend) to reflect the possible simplifications such as the mixed product expansion, etc. But I'm quite new to Mathematica, and don't know how to do this, and don't know if this is the best way, either.

Could someone help? Any answer with be greatly appreciated! Thanks!

Follow Up 1

Thanks to march, I found the command $Assumptions = {p1 [Element] Vectors[3, Reals]}, which transforms the problem into a tensor problem. I tried this command for all the vectors, and the f function does show the correct expression, but after that, Expand, Simplification, Collect don't seem to work, only TensorExpand and TensorReduce work for these tensors. The expression seems kind of complicated, since Simplify won't work now. So far I haven't found a way to handle this. Still, I think the way of defining customized operators (or functions) or rules (in Simplify) that can define those operations such as mixed product or double cross product may help. Does anyone have experience with this type of stuff? Thanks! Follow Up 2 Thanks for all the replies! It would be great if some of you could help me implement a small piece of code to realize some of the relations below, and I will follow your strategy to finish the rest of code. Basically I think there are two key operations that are relevant: 1. the mixed-product, Dot[Cross[a, b], c] = Dot[Cross[b, c], a] = Dot[Cross[c, a], b] 2. the double cross-product: Cross[Cross[a, b], c] = Dot[a, c] b - Dot[b, c] a Besides, there are some basic relations, including: 1. Cross[a, b] = -Cross[b, a] 2. Dot[a, b] =Dot[b, a] 3. Cross[(a + b), c] = Cross[a, c] + Cross[b, c] 4. Dot[(a + b), c] = Dot[a, c] + Dot[b, c] And the criteria are that there should be as few monomials as possible, and each monomial should be simple as well, just like what I will get after a series of Expand, Collect and Simplify. I'm listing these relations which I guess are to be used as rules for the Simplify command? Thanks again for any help! • You might check out SymbolicTensors tutorial. I haven't used it, so I can't say anything about it, but at least it's there to look at. Oct 21, 2015 at 20:49 • Hi March, thanks for your reply! I looked at the page, and found the command$Assumptions = {p1 [Element] Vectors[3, Reals]}, this command seems quite related, I tried this command for all the vectors, and the f function does show the correct expression, but after that, the command of Expand, Simplification, Collect seems won't work, only the TensorExpand and TensorReduce work for these tensors, the expression seems kind of complicated, since the Simplify command won't work now, I'm trying to see if there is anyway to handle this, thanks again! Oct 21, 2015 at 21:18
• I might think on this and come up with something (I'm extremely busy at the moment, so might never be able to follow through, but I will try). In the meantime, it would be useful to write down the kinds of simplifications you think should be made. One person's simplified expression is another person's annoying-to-plug-into-a-calculator expression. Oct 21, 2015 at 23:11
• To start, at least write down what you think the simplified form of your sample expression should be. Oct 21, 2015 at 23:27
• Thanks for your comments, please see the edits of the question. Besides, the sample expression is too complicated for me to come up with a simplified form. Basically what I want is to get rid of cross product where possible, especially the double cross product. And for the mixed product, I'd like it to cancel those that are equal to each other, utilizing the relations I just added in the question. Thanks for your help! Oct 22, 2015 at 2:21