Solve set of poorly conditioned linear equations in block matrix form

138 Views Asked by At

I would like to solve the following set of linear equations where A, B, C and D are each 4x4 matrices. K is then an 8x8 matrix

The values in A and D have magnitudes of $\approx 10^{17}$, B has magnitudes of $\approx 10^{3}$ and C magnitudes of $\approx 10^{32}$.

I am having difficulty in calculating $K_3$ where I am subtracting 2 very large numbers and expecting something similar in magnitude to $K_2$ as a result.

\begin{equation} \left[\begin{array}{cc} -B&0\\ -D&-I\\ \end{array}\right] \left[\begin{array}{cc} K_1&K_2\\ K_3&K_4\\ \end{array}\right] = \left[\begin{array}{cc} -A&I\\ -C&0\\ \end{array}\right] \end{equation}

\begin{equation} -BK_1 = -A \quad \quad K_1 = B^{-1}A \end{equation} \begin{equation} -BK_2 = I \quad \quad K_2 = -B^{-1} \end{equation} \begin{equation} -D K_1 -I K_3 = -C \quad \quad K_3 = C - D B^{-1}A \end{equation} \begin{equation} -D K_2 -I K_4 = 0 \quad \quad K_4 = D B^{-1} \end{equation}

\begin{equation} K = \left[\begin{array}{cc} B^{-1}A& - B^{-1}\\ C-DB^{-1}A&DB^{-1}\\ \end{array}\right] \end{equation}

I don't know if it helps but I can factor K out in the following form:

\begin{equation} K = \left[\begin{array}{cc} -I & 0\\ D & C\\ \end{array}\right] \left[\begin{array}{cc} B^{-1} & 0\\ 0 & I\\ \end{array}\right] \left[\begin{array}{cc} -A & I\\ I & 0 \\ \end{array}\right] = \left[\begin{array}{cc} B^{-1}A& - B^{-1}\\ C-DB^{-1}A&DB^{-1}\\ \end{array}\right] \end{equation}

Given the information above is there a nicer way to calculate $K_3$ that would produce more accurate results?

Some specific matrices I am working with are:

\begin{equation} A = \left[\begin{array}{cccc} -9.43455e+17 &-1.12771e+18 &-1.41432e+17 & 8.21904e+18\\ 1.52418e+18 & 1.62684e+18 & 1.96647e+17 &-1.62275e+19\\ -3.16525e+18 &-7.81854e+18 &-1.13337e+18 &-3.34572e+19\\ 1.53908e+17 & 2.89234e+17 & 4.02606e+16 & 2.51396e+17\\ \end{array}\right] \end{equation} \begin{equation} B = \left[\begin{array}{cccc} -4378.11& -7221.58& 11613.3& 633.99\\ 7221.58& 11144.1& -35042.1& -1460.19\\ -11613.3& -35042.1& -297926& -6894.17\\ 633.99& 1460.19& 6894.17& 131.919\\ \end{array}\right] \end{equation} \begin{equation} C = \left[\begin{array}{cccc} -2.01973e+32& -2.33282e+32& -2.89492e+31& 1.88254e+33\\ 2.33282e+32& 2.19587e+32& 2.52959e+31& -2.92849e+33\\ 2.89492e+31& 2.52959e+31& 2.82007e+30& -3.92963e+32\\ 1.88254e+33& 2.92849e+33& 3.92963e+32& -6.14072e+33\\ \end{array}\right] \end{equation} \begin{equation} D = \left[\begin{array}{cccc} -9.43455e+17& -1.52418e+18& 3.16525e+18& 1.53908e+17\\ 1.12771e+18& 1.62684e+18& -7.81854e+18& -2.89234e+17\\ 1.41432e+17& 1.96647e+17& -1.13337e+18& -4.02606e+16\\ 8.21904e+18& 1.62275e+19& 3.34572e+19& 2.51396e+17\\ \end{array}\right] \end{equation}

1

There are 1 best solutions below

0
On

@ user2235373 , each matrix is known with $6$ significant digits. Unfortunately, $cond(B)\approx 6.10^8$, that implies that $B^{-1}$ is known with $0$ significant digits !

Conclusion: $K$ is absolutely unknown.