% vim: set ts=2 sw=2 et tw=80: \documentclass[12pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[margin=2cm]{geometry} \usepackage{amstext} \usepackage{amsmath} \usepackage{array} \newcommand{\lra}{\Leftrightarrow} \title{Howework 3 -- Introduction to Computational Science} \author{Claudio Maggioni} \begin{document} \maketitle \section*{Question 1} \[i=1 \hspace{1cm} l_1 = \begin{bmatrix}1\\1\\5\\-3\\\end{bmatrix} \hspace{1cm} u_1 = \begin{bmatrix} 2 & 1 & 1 & -2 \\\end{bmatrix}\] \[A_2 = \begin{bmatrix} 2 & 1 & 1 &-2 \\ 2 & 2 & -2 & -1 \\ 10 & 4 & 23 & -8 \\ -6 & -2 & 4 & 6 \\\end{bmatrix} - \begin{bmatrix} 2 & 1 & 1 & -2 \\ 2 &1& 1 &-2 \\ 10 & 5 & 5 & -10 \\ -6 & -3 & -3 & 6 \\\end{bmatrix} = \begin{bmatrix}\\& 1 & -3 & 1 \\ & -1 & 18 & 2 \\ & 1 & 7 & 0 \end{bmatrix}\] \[i = 2 \hspace{1cm} l_2 = \begin{bmatrix}\\1 \\-1 \\1\\\end{bmatrix} \hspace{1cm} u_2 = \begin{bmatrix} & 1& -3& 1\\\end{bmatrix}\] \[A_3 = \begin{bmatrix}\\& 1 & -3 & 1 \\ & -1 & 18 & 2 \\ & 1 & 7 & 0 \end{bmatrix} - \begin{bmatrix}\\&1 & -3 & 1 \\ & -1 & 3 & -1 \\ & 1 & -3 & 1 \\\end{bmatrix} = \begin{bmatrix} \\ \\ &&15&3\\&&10&-1\\\end{bmatrix}\] \[i = 3 \hspace{1cm} l_3 = \begin{bmatrix}\\\\1\\2/3\\\end{bmatrix} \hspace{1cm} u_3 = \begin{bmatrix}&& 15 & 3 \\ \end{bmatrix}\] \[A_4 = \begin{bmatrix} \\ \\ &&15&3\\&&10&-1\\\end{bmatrix} - \begin{bmatrix}\\\\&&15 & 3 \\&&10 & 2 \\\end{bmatrix} = \begin{bmatrix}\\\\\\&&&-3\\\end{bmatrix}\] \[i = 4 \hspace{1cm} l_4 = \begin{bmatrix}\\\\\\1\\\end{bmatrix} \hspace{1cm} u_4 = \begin{bmatrix}&&& -3 \\ \end{bmatrix}\] \[L = \begin{bmatrix}1\\1&1\\5&-1&1\\-3 &1 &2/3&1\\\end{bmatrix} \hspace{1cm} U = \begin{bmatrix}2 &1 &1&-2\\&1 &-3&1\\&&15&3\\&&&-3\\\end{bmatrix}\] \[Ly = B \Rightarrow \begin{bmatrix}1\\1&1\\5&-1&1\\-3 &1 &2/3&1\\\end{bmatrix} \begin{bmatrix}y_1\\y_2\\y_3\\y_4\\\end{bmatrix} = \begin{bmatrix}-1\\-3\\36\\18\\\end{bmatrix} \] \[y_1 = -1\] \[y_2 = -3 - (-1) \cdot 1 = -2\] \[y_3 = 36 - 1 \cdot 2 - (-1) \cdot 5 = 39\] \[y_4 = 18 - \frac{2}{3} \cdot 39 - (-2) - (-3) \cdot (-1) = -9\] \[Ux = Y \Rightarrow \begin{bmatrix}2 &1 &1&-2\\&1 &-3&1\\&&15&3\\&&&-3\\\end{bmatrix} \begin{bmatrix}x_1\\x_2\\x_3\\x_4\\\end{bmatrix} = \begin{bmatrix}-1\\-2\\39\\-9\\\end{bmatrix} \] \[x_4 = 3\] \[x_3 = \frac{39 - 3 - 3}{15} = 2\] \[x_2 = \frac{-2 -3 - (-3) \cdot 2}{1} = 1\] \[x_1 = \frac{ -1 - (-2) \cdot 3 - 1 \cdot 2 - 1 \cdot 1}{2} = 1\] \[x = \begin{bmatrix}1\\1\\2\\3\\\end{bmatrix}\] \section*{Question 2} \[i = 1 \hspace{1cm} k = 4 \hspace{1cm} \begin{bmatrix}4&2&3&1\\\end{bmatrix}\] \[ l_1 = \begin{bmatrix} 1/8 \\ 1/4 \\ 1/2 \\ 1 \\ \end{bmatrix} \hspace{1cm} u_1 = \begin{bmatrix} 32 & 24 & 10 & 11\end{bmatrix} \hspace{1cm} \]\[ A_2 = \begin{bmatrix}4 &3 &2& 1\\ 8& 8& 5& 2\\ 16& 12& 10& 5\\ 32& 24& 20 &11 \\\end{bmatrix} - \begin{bmatrix} 4 & 3 & 5/2 & 11/8 \\ 8 & 6 & 5 & 11/4 \\ 16 & 12 & 10 & 11/2 \\ 32 & 24 & 20 & 11 \\ \end{bmatrix} = \begin{bmatrix} 0 & 0 & -1/2 & -3/8 \\ 0 & 2 & 0 & -3/4 \\ 0 & 0 & 0 & -1/2 \\ 0 & 0 & 0 & 0 \\ \end{bmatrix} \] \[i = 2 \hspace{1cm} k = 2 \hspace{1cm} p = \begin{bmatrix}4&2&3&1\\\end{bmatrix}\] \[ l_2 =\begin{bmatrix} 0\\1\\0\\0\\ \end{bmatrix} \hspace{1cm} u_2 =\begin{bmatrix} 0 & 2 & 0 & -3/4 \end{bmatrix}\] \[ A_3 = \begin{bmatrix} 0 & 0 & -1/2 & -3/8 \\ 0 & 2 & 0 & -3/4 \\ 0 & 0 & 0 & -1/2 \\ 0 & 0 & 0 & 0 \\ \end{bmatrix} - \begin{bmatrix} 0 & 0 & 0 & 0 \\ 0 & 2 & 0 & -3/4 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ \end{bmatrix} = \begin{bmatrix} 0 & 0 & -1/2 & -3/8 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & -1/2 \\ 0 & 0 & 0 & 0 \\ \end{bmatrix} \] \[ i = 3 \hspace{1cm} k = 4 \hspace{1cm} p = \begin{bmatrix} 4&2&1&3\\ \end{bmatrix} \] \[ l_3 = \begin{bmatrix} 1 \\0\\0\\0\\ \end{bmatrix} \hspace{1cm} u_3 = \begin{bmatrix} 0 & 0& -1/2 & -3/8\\\end{bmatrix} \]\[ A_4 = \begin{bmatrix} 0 & 0 & -1/2 & -3/8 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & -1/2 \\ 0 & 0 & 0 & 0 \\ \end{bmatrix} - \begin{bmatrix} 0 & 0 & -1/2& -3/8\\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ \end{bmatrix} = \begin{bmatrix} 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & -1/2 \\ 0 & 0 & 0 & 0 \\ \end{bmatrix} \] \[ i =4 \hspace{1cm} k = 4 \hspace{1cm} p = \begin{bmatrix} 4&2&1&3\\ \end{bmatrix}\] \[l_4 = \begin{bmatrix} 0 \\0\\1\\0\\\end{bmatrix} u_4 = \begin{bmatrix}0&0&0&-1/2\end{bmatrix} \] \[ P = \begin{bmatrix} 0 & 0 & 0 & 1 \\ 0 & 1 & 0 & 0 \\ 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ \end{bmatrix} \] \[ L = P * \begin{bmatrix} 1/8 & 0 & 1 & 0 \\ 1/4 & 1 & 0 & 0 \\ 1/2 & 0 & 0 & 1 \\ 1 & 0 & 0 & 0 \\ \end{bmatrix} = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 1/4 & 1 & 0 & 0 \\ 1/8 & 0 & 1 & 0 \\ 1/2 & 0 & 0 & 1 \\ \end{bmatrix} \] \[ U = \begin{bmatrix} 32 & 24 & 20 & 11 \\ 0 & 2 & 0 & -3/4 \\ 0 & 0 & -1/2 & -3/8 \\ 0 & 0 & 0 & -1/2 \\ \end{bmatrix} \] \section*{Question 4} \[ A_1 = \begin{bmatrix} 1 & 4 & 8 & 3 \\ 4 & 20 & 40 & 28 \\ 8 & 40 & 89 & 71 \\ 3 & 28 & 71 & 114 \\ \end{bmatrix} \] \[ i = 1 \hspace{1cm} l_1 = \begin{bmatrix}1\\4\\8\\3\\\end{bmatrix}\] \[ A_2 = \begin{bmatrix} 1 & 4 & 8 & 3 \\ 4 & 20 & 40 & 28 \\ 8 & 40 & 89 & 71 \\ 3 & 28 & 71 & 114 \\ \end{bmatrix} - \begin{bmatrix} 1 & 4 & 8 & 3\\ 4 & 16 & 32 & 12\\ 8 & 32 & 64 & 24\\ 3 & 12 & 24 & 9\\ \end{bmatrix} = \begin{bmatrix} \\ & 4 & 8 & 16\\ & 8 & 25 & 47 \\ & 16 & 47 & 105 \\ \end{bmatrix} \] \[i=2 \hspace{1cm} l_2 = \begin{bmatrix}\\2\\4\\8\\\end{bmatrix}\] \[A_3 = \begin{bmatrix} \\ & 4 & 8 & 16\\ & 8 & 25 & 47 \\ & 16 & 47 & 105 \\ \end{bmatrix} - \begin{bmatrix} \\ & 4 & 8 & 16 \\ & 8 & 16 & 32 \\ & 16 & 32 & 64 \\ \end{bmatrix} = \begin{bmatrix}\\\\&& 9 & 15 \\&&15 & 41\\\end{bmatrix} \] \[i = 3 \hspace{1cm} l_3 = \begin{bmatrix}\\\\3\\5\\\end{bmatrix}\] \[A_4 = \begin{bmatrix}\\\\&& 9 & 15 \\&&15 & 41\\\end{bmatrix} - \begin{bmatrix} \\ \\ &&9&15\\ && 15 & 25\\ \end{bmatrix} = \begin{bmatrix} \\\\\\&&&16\\ \end{bmatrix} \] \[i = 4 \hspace{1cm} l_4 = \begin{bmatrix}\\\\\\4\\\end{bmatrix}\] \[L = \begin{bmatrix}1\\4&2\\8&4&3\\3&8&5&4\\\end{bmatrix}\] \section*{Question 5} \subsection*{Point a)} First of all, to show that $A_{1,1}$ is symmetric, we say: \[\begin{bmatrix}A_{1,1} & A_{1,2}\\A_{2,1} & A_{2,2}\\\end{bmatrix} = A = A^T = \begin{bmatrix}A_{1,1}^T & A_{2,1}\\A_{1,2} & A_{2,2}^T\\\end{bmatrix}\] Therefore we can say that $$A_{1,1} = A_{1,1}^T$$ and thus $A_{1,1}$ is shown to be symmetric. Then, since $A$ is positive definite, $x^TAx > 0$ for any vector $x \in R^n$. We choose a vector $x$ such that $x_k = 0$ for any $p < k \leq n$. Then: $$ x^TAx = \sum_{j=1}^n x_j \cdot \sum_{i=1}^n x_i a_{i,j} = \sum_{j=1}^p x_j \cdot \sum_{i=1}^n x_i a_{i,j} + \sum_{j=p+1}^n 0 \cdot \sum_{i=1}^n 0 a_{i,j} = \sum_{j=1}^p x_j \cdot (\sum_{i=i}^p x_i a_{i,j} + \sum_{i=p+1}^n 0 a_{i,j}) =$$ $$=\sum_{j=1}^p x_j \cdot \sum_{i=i}^p x_i a_{i,j} = \begin{bmatrix}x_1 & x_2 & \ldots & x_n\end{bmatrix} A_{1,1}\begin{bmatrix}x_1 & x_2 & \ldots & x_n\end{bmatrix}^T$$ Then: $$\begin{bmatrix}x_1 & x_2 & \ldots & x_n\end{bmatrix}A_{1,1}\begin{bmatrix}x_1 & x_2 & \ldots & x_n\end{bmatrix}^T>0$$ which is the definition of positive definiteness for $A_{1,1}$. \end{document}