MathGroup Archive 2013

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Working with arrays

  • To: mathgroup at
  • Subject: [mg131211] Re: Working with arrays
  • From: Roland Franzius <roland.franzius at>
  • Date: Mon, 17 Jun 2013 06:29:52 -0400 (EDT)
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • References: <kpjvhm$9n8$>

Am 16.06.2013 11:12, schrieb amannucci:
> lA = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}};
> xtest = {4, 5, 6};
> lA\[CenterDot]xtest (* First case *)
> {{a, b}, {c, d}} . {x, y} (* Second case *)
> The output is:
> {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}\[CenterDot]{4, 5, 6}
> {a x + b y, c x + d y}

The Dot-multiplication operator is overloaded with conventional physical 

In the mathematical sense you may declare matrix multiplication from the 
left with row vectors


or multiplication from the right with column vectors


But since the most common three bilinear procedures on higher 
dimensional objects of maximal tensor rank 2:

1) scalar multiplication with implicitely assumed euclidean metrics,
2) applying forms on vectors and tensors of rank 2
3) matrix multiplication procedures

are obcsured in physics textbooks, completely, Mathematica, as a user 
friendly package, deliberately is guessing if a given Dot product may 
make any sense.

A hint to the background of this strange behavour is given in the "more 
information" statement in the Help for Dot:

" When its arguments are not lists or sparse arrays, Dot remains 


is working as expected.

Take it as a hint that Dot is a generic name for a library of highly 
specialized subfunctions, that will be called with the arguments by name 
and not by value or on the stack.

It is the same reason why Plot or Integrate do not Evaluate the 
functional arguments. If needed, the values explicitely have to be 
handed over with an Evaluate beforehand in order to replace the name by 
its value in an argument at a Hold position.

But this behaviour is not documented for Dot.

Attributes[Dot]  ...

Perhaps this behaviour may force numerical linear programmers to use the 
correct mathematical tensor categories even in case of simple numerics 
with numerical arrays -- or perhaps they will use other  packages not so 


Roland Franzius

  • Prev by Date: Re: Working with arrays
  • Next by Date: Re: Working with arrays
  • Previous by thread: Re: Working with arrays
  • Next by thread: Re: Working with arrays