Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


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

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 ]
Kevin J. McCann

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

Use a period instead of a CenterDot, as you did in the "Second case".

Cheers,
Kevin

On 6/16/2013 5:12 AM, 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
>





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

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.