Message Boards Message Boards

How do I tell mathematica that the entries in a matrix is also matrices?

Posted 5 years ago

Hello,

I am new to Mathematica and I failed at finding a way to tell Mathematica that the entries in a matrix is also matrices and I would like to ask for help doing this. As example

M ={{A, B},{C, D}};

but A,B,C and D are also 2 by 2 matrices and hence do not commute. I need to find the eigenvalues of the matrix but treating A,B,C,D as matrices and not numbers.

Thanks in advance.

POSTED BY: Sophie Møller
2 Replies
Posted 5 years ago

Thank you very much for your answer, but what if I need the eigenvalues in terms of a,b,c,d and not the individual components of a,b,c,d? What I mean is

M={{0,b},{c,d}}

with the eigenvalues

eigenvalues=Eigenvalues[M]

which is equal to:

{1/2 (d - Sqrt[4 b c + d^2]), 1/2 (d + Sqrt[4 b c + d^2])}

Where I now need to expand one of the eigenvalues in a taylor series,

Normal[Simplify[
  Series[eigenvalues[[2]], {b, 0, 1}, {c, 0, 1}], {b > 0, c > 0, 
   d > 0}]]

which has the result:

(b c)/d + d

But here and also when I do this for more complicated matrices, the answer is expressed in the wrong order, because mathematica does not know that b,c,d is matrices and does not commute. What I need is the answer in terms of b,c,d but in the correct order as it would be if b,c,d are matrices.

POSTED BY: Sophie Møller

Let us create some 2x2 matrices:

a = {{a11, a12}, {a21, a22}};
b = {{b11, b12}, {b21, b22}};
c = {{c11, c12}, {c21, c22}};
d = {{d11, d12}, {d21, d22}};

You can visualize the combined object of depth four using

MatrixForm[{{a, b}, {c, d}}]

A possible way to construct the matrix by blocks is

m = ArrayFlatten[{{a, b}, {c, d}}]

Visualize it again with

MatrixForm[m]

Or compute eigenvalues with

Eigenvalues[m]
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