5

I want Mathematica to recognize that

A.(-B.C)+A.B.C = 0

Yet FullSimplify and the like leaves the expression as it is. How do I get around this?

Sebastian
  • 3,479
  • 19
  • 23
  • 1
    C is not a good name for a variable. As you can see, C is in black, indicating that it means something specific to Mathematica. Look up C in the docs if you want. – Jacob Akkerboom May 15 '13 at 21:34
  • 3
    you could argue that capital anything is not a good name for either variables or functions in Mathematica! – SEngstrom May 15 '13 at 22:11

2 Answers2

5

Check the tutorial here.

a.(-b.c) + a.b.c // TensorExpand

(* ==> 0 *)
Szabolcs
  • 234,956
  • 30
  • 623
  • 1,263
1

You can teach Mathematica to factor out any number from inside a dot.

Unprotect[Dot];
x__.(c_?NumberQ y__) := c x.y
(c_?NumberQ x__).y__ := c x.y
Protect[Dot];
swish
  • 7,881
  • 26
  • 48