DragginMath: Factoring
You can distribute things in DragginMath. You can also un-distribute them, but a better name for this is factoring. It comes in different forms, depending on what you want to factor, and what you want to factor it out of.
Enter x+x. Now drag either one of the xs up to deliberately enter Blue Mode, then drop one x onto the other x. The result is 2x. If you aren’t in Blue Mode, you will commute the xs, which is not the goal here. This is a common mistake.
Enter ax+ax+ax+ax+ax. Drag the bottom-left ∗ onto the topmost ∗. In this example, you don’t have to deliberately enter Blue Mode: it will just happen if you make the direct motion. The result is 5ax. Inside DragginMath, this is called factoring by counting.
What if you want to factor x out of xa+xb? Inside DragginMath, this is done by a completely different process: factoring by extraction, but it is invoked the same way. Drag the bottom-left x up into Blue Mode, then drop it onto the other x. The result is x(a+b).
What about xa+xb–xc+xd? Drag the bottom-left x onto the topmost x. The result is x(a+b–c+d). Notice that the xb and xc terms were factored also, even though you didn’t actually interact with them. That’s because they were between the two terms you did interact with. If DragginMath encounters a term that does not contain the factor you asked to extract, factoring fails and the parts go back where they came from.
DragginMath can factor expressions much more complicated than this.
Paying attention to details can prevent frustration later on. To invoke factoring, you must be in Blue Mode when you drop. That might mean you have to drag up deliberately, if only to enter the mode. Also, the path between the dragged node and the target node must be level or upward. If the drag path slopes downward, factoring won’t happen.