Using the following global assumptions

$Assumptions = Element[n, Integers] && Element[a, Vectors[n, Reals]] && b == 0 && Element[c, Reals]

I assumed that Refine[a.b]

returns 0. Instead, it returns [a.0], which again according to my knowledge should be a vector of n zeros.


works as expected and returns zero.

  • $\begingroup$ Welcome to Mathematica.SE! I suggest that: 1) You take the introductory Tour now! 2) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! 3) As you receive help, try to give it too, by answering questions in your area of expertise. $\endgroup$ – bbgodfrey May 8 '15 at 21:43

You've used the dot product operator (.) instead of the times operator (*). In some languages like Matlab, * is the dot operator, but in Mathematica they are different.

{1,2,3} * 0 == {0,0,0}
{1,2,3} * {0,0,0} == {0,0,0}
{1,2,3} . {0,0,0} == 0

Since you are refining a vector dotted with 0, Mathematica doesn't know how to simplify this, so it simply returns the expression a.0.


Refine[a*0, Assumptions -> Element[a, Vectors[n, Reals]]] 


Refine[a*b, Assumptions -> {Element[a, Vectors[n, Reals]], b==0}] 

both yield 0 as well, even if n is replaced by a number like 10; I suspect that this is due to a shortcut Mathematica takes in seeing a*0 passed to Refine, but I'm not sure why this particular instance yields 0.

  • $\begingroup$ TensorExpand[Refine[a.b]] $\endgroup$ – chuy May 8 '15 at 22:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.