MathGroup Archive 1997

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

Search the Archive

Re: Q: implementation of Dot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg7965] Re: Q: implementation of Dot
  • From: murray at math.umass.edu (Murray Eisenberg)
  • Date: Wed, 30 Jul 1997 02:37:29 -0400
  • Organization: University of Massachusetts, Amherst
  • Sender: owner-wri-mathgroup at wolfram.com

Andreas Unterkircher (unterkir at ifu.bepr.ethz.ch) wrote:
:Now I try

: In[4]= m = {{},{}};
:  
: In[5]= mm = {};

: In[6]= m . mm

: Out[6]= {0}

: I would have expected that either the operation m . mm (In[6]) is not
: allowed at all or that Out[6] gives something like "{,}". I would
: appreciate it very much if anybody can explain this behaviour to me. 

I don't fully understand the result either -- one of many cases where
I would like to see precise definitions of Mathematica operations.
But consider the following:

In[1]= {} . {}
Out[1]= 0

In[2]= {{}} . {}
Out[2]= {0}

I can understand In/Out[1] clearly (it's just like in APL and some
other array-processing languages): the sum of an empty list has to be
0 (in order for associativity of addition to hold in full generality).

Then In/Out[2] should follow by doing {}.{}, giving 0, then putting
that into a one-element list {0} due to the nested list that is the
left argument of Dot here.

But I'd still like to see a definitive answer to the result for
{{},{}}.{}.  I'd expect to get {0,0}.  After all, {{2},{3}}.{4} gives
{8, 12}, since the first argument is, in effect, a 2-row matrix.
Likewise, {{},{}} could be interpreted as a 2-row matrix each of whose
rows has length 0, and so a 2-element list ought to result from
dotting that with a flat list.

Is there some convention about _tensor_ products at work here?

--
  Murray Eisenberg                       Internet:  murray at math.umass.edu
  Mathematics & Statistics Dept.            Voice:  413-545-2859 (W)
  University of Massachusetts                       413-549-1020 (H)
  Amherst, MA 01003                           Fax:  413-545-1801


  • Prev by Date: Re: Plotting two functions on different y-axes
  • Next by Date: Re: How to select unique elements in a list?
  • Previous by thread: Q: implementation of Dot
  • Next by thread: Hamming Method, Algorithm 8, help massage data?