MathGroup Archive 2013

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

Search the Archive

Re: Working with arrays

  • To: mathgroup at smc.vnet.net
  • Subject: [mg131204] Re: Working with arrays
  • From: David Bailey <dave at removedbailey.co.uk>
  • Date: Mon, 17 Jun 2013 06:27:32 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-outx@smc.vnet.net
  • Delivered-to: mathgroup-newsendx@smc.vnet.net
  • References: <kpjvhm$9n8$1@smc.vnet.net>

On 16/06/2013 10:12, amannucci wrote:
> I thought I understood variables. This sequence completely mystifies me:
> 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?
>
> Thanks for any help.
>
> -Tony
>
In the first example, you used CenterDot, which is an operator with no 
built in meaning. In the second case you used Dot, which will do 
vector/matrix multiplication!

I must say, I never use these operators, because they can be confused 
with each other, and a decimal point, and dots also mean repetition in 
patterns!

David Bailey
http://www.dbaileyconsultancy.co.uk




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