       Re: Product command with matrices

• To: mathgroup at smc.vnet.net
• Subject: [mg87861] Re: Product command with matrices
• From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
• Date: Fri, 18 Apr 2008 07:13:23 -0400 (EDT)
• Organization: Uni Leipzig
• References: <fu9ft7\$ce2\$1@smc.vnet.net>

```Hi,

Times[] is not Dot[] and Product[] and no equivalent to use
Dot[] instedad of Times[] and there is no (easy) way to
tell Mathematica that f is a matrix and what may be A
a scalar ? a vector or a matrix too ? Even I can't find it out
and Mathematica can't know it.

You mean

DotProduct[mtx_, {i_, i1_, in_}] := Dot @@ Table[mtx, {i, i1, in}]

Phi := Id;
Phi[n_] := DotProduct[Id + f[i] ** A, {i, 0, n - 1}]

and

Phi gives

(Id + f ** A).(Id + f ** A).(Id + f ** A)

Regards
Jens

J Davis wrote:
> I want to define a matrix valued function such as the following (in
> LaTeX lingo):
>
> \$\$
> X(0)=Id,
> X(n)=\prod_{i=0}^{n-1} (Id + f[i] A)
> \$\$
>
> where A and f have already been defined and Id is the identity matrix
> of appropriate size.
>
> I tried the following:
>
> Id=IdentityMatrix;
> Phi:=Id;
> Phi[n_]:= Product[Id + f[i] A,{i,0,n-1}]
>
> However, Phi and (Id+fA).(Id+fA).(Id+fA) do not agree.
>
> Any help around this would be appreciated.
>

```

• Prev by Date: Re: Scaling Plot inside Row
• Next by Date: Re: Indefinite numbers of arguments in a function
• Previous by thread: Re: Product command with matrices
• Next by thread: Re: Product command with matrices