# 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!

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. – march Oct 21 '15 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! – larry Oct 21 '15 at 21:18