Message Boards Message Boards

0
|
4798 Views
|
4 Replies
|
1 Total Likes
View groups...
Share
Share this post:

[?] Write a matrix multiplication with indefinite limits?

Posted 6 years ago

Hello, I need to find an answer to this problem. Let G(t) be a nxn matrix. I need to calculate G(t-1)xG(t-2)x...xG(2)xG(1) where x is the usual matrix multiplication. I can't use the function Product[G(i),{i,t-1,1}] because it uses the usual multiplication of real numbers. Any Idea of how can I solve this?

4 Replies

The matrix multiplication is Dot in Mathematica. If you need your product for display only, you can inactivate it:

Inactive[Dot][g[t - 1], g[t - 2], \[Ellipsis], g[2], g[1]]

If you need it for actual calculation you can use the infix form of Dot:

g[5].g[4].g[3].g[2].g[1]

or generate the terms with Table:

Dot @@ Table[g[k], {k, 5, 1, -1}]
POSTED BY: Gianluca Gorni

Hmmm. What do you mean by "closed expression"?

Smile, make one of your own. Say your procuct is called U[t] and according to Gianlucas proposal you can write

U[t_?NumericQ] := Dot @@ Table[g[j], {j, 1, t - 1}]

You can use it everywhere:

In[7]:= U[t]

Out[7]= U[t]

Whenever you need it mor explicit give it a t ( element of Integers)

In[6]:= U[4]

Out[6]= g[1].g[2].g[3]
POSTED BY: Hans Dolhaine

Let me try to explain with an example:

In[249]:= Product[x - i, {i, 0, t - 1}]

Out[249]= (1 - t + x) Pochhammer[2 - t + x, -1 + t]

what I need is the expression in "Out[249]", this is what I mean by "closed expression". Look that the boundary I've used is an unapropriate bound to a Table or to a loop, but it's not to the function "Product". I'm looking for a function that would do the same thing as the function Product but instead of using the usual multiplication of real numbers, it uses the usual matrix product.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract