Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Re: Matrix Dot Product

  • To: mathgroup at smc.vnet.net
  • Subject: [mg52200] Re: [mg52159] Matrix Dot Product
  • From: yehuda ben-shimol <benshimo at bgu.ac.il>
  • Date: Sun, 14 Nov 2004 04:31:15 -0500 (EST)
  • References: <200411130940.EAA00971@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

You have a special function for that Dot[ ]
please look below

In[3]:=
?Dot

\!\(\*
RowBox[{"\<\"a.b.c or Dot[a, b, c] gives products of vectors, matrices and \
tensors.\"\>", " ",
ButtonBox[
StyleBox["More?",
"SR"],
ButtonData:>"Dot",
Active->True,
ButtonStyle->"RefGuideLink"]}]\)



yehuda

MacDonald, Calum (MAT) wrote:

>Hi
>
>I was wondering if someone could please help me with a command for
>calculating the dot product of two (NxN) matrices. 
>
>For example, for  two (2x2) matrices, A and B, we define the dot product
>as:
>
>A(1,1)*B(1,1) + A(2,1)*B(2,1) + A(1,2)*B(1,2) + A(2,2)*B(2,2)
>
>i.e. we multiply corresponding entries of the matrices and sum these
>values.
>
>It is easy to write this in a loop but for large matrices the
>calculation is rather slow.
>
>Is there a Mathematica function that I can call that will allow me to do
>this faster?
>
>Thanks
>
>Calum
>
>
>
>  
>


  • References:
  • Prev by Date: Re: Challenge: Fastest method to convert positive integers to 1 in a long list
  • Next by Date: Re: TraditionalForm of expressions WITHOUT evaluating.
  • Previous by thread: Matrix Dot Product
  • Next by thread: Re: Matrix Dot Product