# Inverse::luc Badly conditioned matrix may contain significant numerical errors. Why?

I want to find the inverse of the following matrix, which is given in terms of the following constants:

D1=D3=0.0278201; A1=A3=0.745015+0. i; B1=B3=0.665311+0. i ;
C1=C3=0.0392378 +0. i; D2=D4=0.685188; A2=A4=0.0430005 +0. i;
B2=B4=0.0233588 +0. i;  C2=C4=0.726721 +0. i;

s = 1.0;
\[Phi] = ArcTan[kx/ky];\[Beta] = Sqrt/(1 + Exp[2*I*\[Phi]]);
\[Alpha] = Sqrt/(1 + Exp[-2*I*\[Phi]]);\[Gamma] = Sqrt/(1 + s*Exp[-I*\[Phi]]);
\[Eta] = Sqrt/(1 + s*Exp[I*\[Phi]]);

Dyo = {{\[Beta]*(A1 + B1*Exp[I*\[Phi]]/s), \[Beta]*(A2 +
B2*Exp[I*\[Phi]]/s), \[Beta]*(A3 +
B3*Exp[I*\[Phi]]/s), \[Beta]*(A4 + B4*Exp[I*\[Phi]]/s)}, {(C1 +
D1*Exp[I*\[Phi]]/s), (C2 + D2*Exp[I*\[Phi]]/s), (C3 +
D3*Exp[I*\[Phi]]/s), (C4 +
D4*Exp[I*\[Phi]]/s)}, {\[Alpha]*(A1 -
B1*Exp[-I*\[Phi]]/s), \[Alpha]*(A2 -
B2*Exp[-I*\[Phi]]/s), \[Alpha]*(A3 -
B3*Exp[-I*\[Phi]]/s), \[Alpha]*(A4 -
B4*Exp[-I*\[Phi]]/s)}, {\[Gamma]*(C1 - D1), \[Gamma]*(C2 -
D2), \[Gamma]*(C3 - D3), \[Gamma]*(C4 - D4)}};


When I take the inverse of this matrix with;

u=Inverse[Dyo]


Mathematica shows the following message:

Inverse::luc: Result for Inverse of badly conditioned matrix {{....}} may contain significant numerical errors.

I'm new using Mathematica. I really don't understand why this is happening. Some of you guys can help me?

• Wellcome here! The answer is in your question: the matrix badly conditioned. This means its determinant is close to zero. So the inversion procedure contains a division by zero somewhere. But you can multiply the result with the original matrix to see how accurately the identity matrix is reproduced. – yarchik Feb 22 '20 at 16:45
• Quick note: "badly conditioned" and "determinant near zero" are not really closely related. – Daniel Lichtblau Feb 22 '20 at 23:46
• @yarchik, as Daniel notes, ill-conditioning has completely nothing to do with tiny determinants. See e.g. this. – J. M.'s ennui Mar 19 '20 at 1:36