# Eigenvalues and inverse of matrix which has matrix entries

Suppose I have a $$2\times2$$ matrix which contains $$2\times2$$ matrices as entries, is there a clean way to find the inverse of such object and compute its eigenvalues/vectors?

My code is

entry1 = {{0, 0}, {0, 0}};

entry2 = (N + L)/(2 LN)*{{1, 0}, {0, 1}} + (N - L)/(2 LN)*{{Cos[2 x],
Sin[2 x]}, {Sin[2 x], -Cos[2 x]}};

entry3  = rho*{{1, 0}, {0, 1}};

entry4 = {{0, 0}, {0, 0}};

M = MatrixForm[{{entry1, entry2}, {entry3, entry4}}];


Then

Det[M]


doesn't work as expected, it gives no result. Can this be done in mathematica? (Yes I know I shouln't be using these variable names)

• First, you should not do M = MatrixForm[...]; followed by Det[M] since M is wrapped in MatrixForm. Second, should not use N since that means something else in Mathematica. Third, what is L and LN? do these have numerical values? Fourth: Det takes a square matrix as input. Not a matrix of matrices. So you would need to convert that to a normal 2D matrix. Jul 19, 2019 at 11:54
• Use ArrayFlatten[{{entry1, entry2}, {entry3, entry4}}], then Det will compute the result.
– Alx
Jul 19, 2019 at 11:56

Try

entry1 = {{0, 0}, {0, 0}};

entry2 = (n + L)/(2 LN)*{{1, 0}, {0, 1}} + (n - L)/(2 LN)*{{Cos[2 x],
Sin[2 x]}, {Sin[2 x], -Cos[2 x]}};

entry3 = rho*{{1, 0}, {0, 1}};

entry4 = {{0, 0}, {0, 0}};
(M = ArrayFlatten[{{entry1, entry2}, {entry3, entry4}}]) // MatrixForm
Det[M] 