MathGroup Archive 2013

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

Search the Archive

Re: Working with arrays

  • To: mathgroup at
  • Subject: [mg131200] Re: Working with arrays
  • From: Bill Rowe <readnews at>
  • Date: Mon, 17 Jun 2013 06:26:11 -0400 (EDT)
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:

On 6/16/13 at 5:19 AM, Anthony.J.Mannucci at (amannucci)

>I thought I understood variables. This sequence completely mystifies

>Clear[lA, xtest]
>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}

>How do I force matrix multiplication to actually occur, as in the
>second answer? Why does Mathematica do the matrix multiply in the
>second case but not the first?

You seem to want Mathematica to treat two separate symbols (Dot,
CenterDot) as being the same out of the box. This simply isn't
how Mathematica is designed. CenterDot is used in Mathematica to
represent an action not something that performs an action.

It is possible to create definitions for CircleDot so that it
will behave as you appear to want using the Notations package.
But in my opinion, this isn't worth the effort required.

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