WOLFRAM COMMUNITY
Connect with users of Wolfram technologies to learn, solve problems and share ideas
Join
Sign In
Dashboard
Groups
People
Message Boards
Answer
(
Unmark
)
Mark as an Answer
WOLFRAM COMMUNITY
Dashboard
Groups
People
0
|
1501 Views
|
1 Reply
|
0 Total Likes
View groups...
Follow this post
Share
Share this post:
GROUPS:
Mathematica
Algebra
Wolfram Language
How to multiply several matrices?
abdelalj
abdelalj
Posted
11 years ago
The code Sum[(Cos)^2 - (Cos
)^2, {i, 1, n}] provides one with a sum from 1 to n. Similarly, Product[] gives a sum from 1 to n.
I would be interested in a similar command for a product of n matrices; I have to specify that I really wanna use the Dot multiplication, not the componentwise one. And n is not specified, so I am exactly in the same situation as for Sum and Product.
Does anybody know how to do this?
Many thanks in advance!
POSTED BY:
abdelalj
Reply
|
Flag
1 Reply
Sort By:
Replies
Likes
Recent
0
Frank Kampas
Frank Kampas, Physicist at Large Consulting
Posted
11 years ago
In[2]:= mat[n_] := {{n, n + 1}, {n + 2, n + 3}}
In[8]:= mat[1].mat[2].mat[3]
Out[8]= {{95, 118}, {211, 262}}
In[9]:= Dot[Sequence @@ Table[mat[i], {i, 3}]]
Out[9]= {{95, 118}, {211, 262}}
POSTED BY:
Frank Kampas
Reply
|
Flag
Reply to this discussion
in reply to
Add Notebook
Community posts can be styled and formatted using the
Markdown syntax
.
Tag limit exceeded
Note: Only the first five people you tag will receive an email notification; the other tagged names will appear as links to their profiles.
Publish anyway
Cancel
Reply Preview
Attachments
Remove
Add a file to this post
Follow this discussion
or
Discard
Group Abstract
Be respectful. Review our
Community Guidelines
to understand your role and responsibilities.
Community Terms of Use
Feedback