Skip to main content
edited tags
Link
Tweeted twitter.com/StackMma/status/849219942130089987
Source Link
user32416
  • 1.2k
  • 8
  • 16

Dimensions --- counter-intuitive?

Perhaps I'm misunderstanding the meaning of Dimensions in Mathematica, but the following two examples seem very counter-intuitive to me.

If we define

a = {1,2,3} 
b = {4,5,6} 

then we compute the dimension of its dot product Dimension[ a . b ], I get the "empty" result

{} 

But if I consider instead,

aa = {a1, a2, a3}
bb = {b1, b2, b3} 

and compute the same thing Dimension[ aa . bb ], I get the result

{3} 

Is this behavior to be expected? I understand that the first case has known constants, and while the second case has unknown constants. But regardless, both are simply scalars, and I would expect Dimensions would return the same answer in both cases.