AAE-NA-Labs/01_Direct-Methods-for-Solving-Linear-Systems/Report/problems/Problem7.tex
Sergiusz Warga a3fa9eb91d refac
2023-03-11 20:08:05 +01:00

21 lines
1.3 KiB
TeX

\subsection{Problem 7}
Let $\mathbf{A} = \left[a_{ij}\right] \in\mathbb{R}^{N\times N}$ with, $a_{ij} = \frac{1}{i + j - 1}$ (Hilbert matrix). For $N=5$, perform the LU factorization of the matrix $\mathbf{A}$. Then, compute det($\mathbf{A}$).
\subsubsection*{Mathematics}
Hilbert matrices are an example of ill-conditioned matrices, which -- with their high $\kappa$ -- makes the numerical computations highly unstable. For our $\mathbf{H} = \left[h_{ij}\right] \in\mathbb{R}^{5\times 5}$:
\begin{equation*}
\matr{H} =
\begin{bmatrix}
1 & \frac{1}{2} & \frac{1}{3} & \frac{1}{4} & \frac{1}{5} \\
\frac{1}{2} & \frac{1}{3} & \frac{1}{4} & \frac{1}{5} & \frac{1}{6} \\
\frac{1}{3} & \frac{1}{4} & \frac{1}{5} & \frac{1}{6} & \frac{1}{7} \\
\frac{1}{4} & \frac{1}{5} & \frac{1}{6} & \frac{1}{7} & \frac{1}{8} \\
\frac{1}{5} & \frac{1}{6} & \frac{1}{7} & \frac{1}{8} & \frac{1}{9}
\end{bmatrix}
\end{equation*}
$\kappa(\matr{H})\approx4.7\cdot10^5$ which is a huge value similar to this in the Problem 4.
\subsubsection*{Solution}
\lstinputlisting[style=Matlab-editor]{problems/Problem7.m}
The above results may look promising, but a determinant calculated both by \MATLAB and our algorithms is of the order of $4\cdot10^{-12}$, which for numerical computations is highly not useful.