Message Boards Message Boards

[✓] Write a matrix multiplication with indefinite limits?


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?

23 days ago

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:


or generate the terms with Table:

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

I'm sorry, I guess I've not been clear. I need to calculate (not only for display) G(t-1)xG(t-2)x...xG(2)xG(1) without setting any value to t. For instance, the product x(x-1)...*(x-t) is equal to Gamma(x+1)/Gamma(x-t). I want to find a closed expression that would depend on t.

22 days ago

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
21 days ago

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.

21 days ago

Group Abstract Group Abstract