The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Inactive » comp.soft-sys.math.mathematica

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Working with arrays
Replies: 6   Last Post: Jun 19, 2013 1:20 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Roland Franzius

Posts: 586
Registered: 12/7/04
Re: Working with arrays
Posted: Jun 17, 2013 6:18 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.