Multiplication of (2,2)matrices of (2,2)matrices
matmul2[a_, b_] := Module[{},
res = Table[
Sum[a[[i, k]].b[[k, j]], {k, 1, 2}], {i, 1, 2}, {j, 1, 2}];
FullSimplify[res]
]
A-matrix
ma = {
{1, 0},
{0, 1}
} ;
mb = {
{-1, 0},
{0, -1}
} ;
mc = {
{-Zout2, m},
{m, -Yout2}
} ;
md = {
{Zin1, m},
{m, Yin1}
} ;
mA = {
{ma, mb},
{mc, md}
} ;
% // MatrixForm
Its (Left)inverse
mp = Inverse[mc - md.Inverse[mb].ma];
mr = Inverse[md - mc.Inverse[ma].mb];
mo = -mp.md.Inverse[mb];
mq = -mr.mc.Inverse[ma];
LinvA = {
{mo, mp},
{mq, mr}
} ;
check this
matmul2[LinvA, mA];
% // MatrixForm
The B-matrix
mB = {{{{Zin, 0}, {0, Zin}}, {{-Zin, 0}, {0, -Zin}}},
{{{-Zin Zout1, m Zin},{m Zin, -Yout1 Zin}}, {{Zin Zin2, m Zin}, {m Zin, Yin2 Zin}}}};
% // MatrixForm
and the result
matmul2[LinvA, mB];
% // MatrixForm