It may be informative to consider an expression under Hold and FullForm :
a = 1; b = 2; SameQ[Dot[a, b], ab]] //Hold //FullForm
Hold [SameQ [Dot [a, b], Dot [a, b]]]
Using this combination of commands, Mathematica parses, but does not evaluate, the expression ( Hold ), and then displays the long pseudo-internal form of the expression ( FullForm ).
In this case, you can see that the second term ab parsed as Dot[a, b] before any evaluation occurs.
When . appears with numbers, as in 1.2 , it is interpreted specifically as a decimal point. This is similar to other numerical record formats, such as: 1*^6 , which is recognized directly as 1000000 :
1*^6 //Hold //FullForm
Compare the input attempt:
a = 1; a*^6
source share