Message Boards Message Boards

GROUPS:

Product of matrix with sub block Matrix assumptions

Posted 18 days ago
163 Views
|
4 Replies
|
0 Total Likes
|

Dear all,

I am looking for the symbolic result of matrix product A.P.Transpose[A] while working with block matrix.

In the current version of the notebook (see below), Mathematica assumes the elements of the matrices as scalar and therefore output the result under scalar form and using commutative properties of the scalar (while it is not applicable when working with matrices)

A = ( {
    {ABgBg, 0, 0, 0, 0, 0},
    {0, ASgSg, 0, 0, 0, 0},
    {0, 0, AMgMg, 0, 0, 0},
    {0, 0, 0, ABaBa, 0, 0},
    {ATeBg, ATeSg, ATeMg, 0, ATeTe, ATeDv},
    {0, 0, 0, ADvBa, ADvTe, ADvDv}
   } );
P = ( {
    {PBgBg, PBgSg, PBgMg, PBgBa, PBgTe, PBgDv},
    {PBgSg\[Transpose], PSgSg, PSgMg, PSgBa, PSgTe, PSgDv},
    {PBgMg\[Transpose], PSgMg\[Transpose], PMgMg, PMgBa, PMgTe, PMgDv},
    {PBgBa\[Transpose], PSgBa\[Transpose], PMgBa\[Transpose], PBaBa, 
     PBaTe, PBaDv},
    {PBgTe\[Transpose], PSgTe\[Transpose], PMgTe\[Transpose], 
     PBaTe\[Transpose], PTeTe, PTeDv},
    {PBgDv\[Transpose], PSgDv\[Transpose], PMgDv\[Transpose], 
     PBaDv\[Transpose], PTeDv\[Transpose], PDvDv}
   } );

Res = A.P.A\[Transpose];
Res // MatrixForm

However, I would like to get the symbolic result of A.P.Transpose[A] but doing assumptions that each elements of the matrix A and P are themselves a matrix of dimensions {3,3}

For instance, with the current notebook the output of APAT[[1,1]] is ABgBg² PBgBg while it should be ABgBg.PBgBgTranspose[ABgBg].

I tried to add assumptions (see below) but the product A.P.Transpose[A] results in Tensor errors...

$Assumptions = 
  Element[ABgBg | ABgBg | ASgBg | ASgSg | PBgBg | PBgSg | PSgSg, 
   Matrices[{3, 3}, Reals]];

Thanks for your help and do not hesitate if not clear.

4 Replies

What about doing it yourself?

Res = Table[
Sum[A[[i, my]].P[[my, ny]].A[[k, ny]], {my, 1, 6}, {ny, 1, 6}],
{i, 1, 6}, {k, 1, 6}]
Posted 17 days ago

Hi Hans, thank you, indeed this would be now easier for me even if this is not direct minimal result.

To get rid of all the terms containing the 0 ( - Matrix) you should try

Res1 = Res /. 0 -> Null /. Null.x_ -> Null /. x__.Null -> Null /.     a_ Null + x_ -> x /. Transpose -> trp;
Res1 // MatrixForm
Posted 17 days ago

Thanks a lot Hans.

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