\documentclass[12pt, letterpaper]{article}

\usepackage{graphicx}
\usepackage{epsfig}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{geometry}
\usepackage{setspace}

\title{Homework 4}
\author{Menyoung Lee}
\geometry{margin=1in}
%\doublespacing

\begin{document}
\maketitle

\subsection*{2.3 P15}
\[ A =
\begin{pmatrix}
10 & 20 & 1 \\
1 & 1.99 & 6 \\
0 & 50 & 1
\end{pmatrix}
=
\begin{pmatrix}
1 & 0 & 0 \\
0.1 & 1 & 0 \\
0 & -5000 & 1
\end{pmatrix}
\begin{pmatrix}
10 & 20 & 1 \\
0 & -0.01 & 5.9 \\
0 & 0 & 29501
\end{pmatrix} \]
As we can see, the largest needed multiplier is $-5000$.

\subsection*{2.3 CP1}
\[ A^{(6)} = 
\begin{pmatrix}
    2.5000 &  1.2500 &  0.8333 &  0.6250 &  0.5000 &  0.4167 \\
    1.6667 &  1.0000 &  0.7143 &  0.5556 &  0.4545 &  0.3846 \\
    1.2500 &  0.8333 &  0.6250 &  0.5000 &  0.4167 &  0.3571 \\
    1.0000 &  0.7143 &  0.5556 &  0.4545 &  0.3846 &  0.3333 \\
    0.8333 &  0.6250 &  0.5000 &  0.4167 &  0.3571 &  0.3125 \\
    0.7143 &  0.5556 &  0.4545 &  0.3846 &  0.3333 &  0.2941 \\
\end{pmatrix}, \]
\[ x^{(6)} = \begin{pmatrix} 1\\1\\1\\1\\1\\1\end{pmatrix}
b^{(6)} = A^{(6)}x^{(6)} = 
\begin{pmatrix}
6.12500000000000\\
4.77566877566878\\
3.98214285714286\\
3.44233544233544\\
3.04464285714286\\
2.73645308939427\\
\end{pmatrix} \]
According to naive LU,
\[ x_c^{(6)} = 
\begin{pmatrix}
   1.00000000000045\\
   0.99999999998005\\
   1.00000000017316\\
   0.99999999946842\\
   1.00000000066090\\
   0.99999999971509\\
\end{pmatrix},
||x - x_c||_\infty = 6.608962266341223\times 10^{-10} \]
Going backward,
\[b' = A x_c = 
\begin{pmatrix}
6.12500000000000\\
4.77566877566878\\
3.98214285714286\\
3.44233544233544\\
3.04464285714286\\
2.73645308939427\\
\end{pmatrix}, ||b - b'||_\infty = 8.881784197001252\times 10^{-16} \]
Relative error was $4.557630875000000\times 10^6$
while the condition number was $3.914178445941294\times 10^7$.
\[ x_c^{(10)} = 
\begin{pmatrix}
   0.99999999953694\\
   1.00000008176117\\
   0.99999724666152\\
   1.00003470142767\\
   0.99978801671753\\
   1.00070821249588\\
   0.99863891215581\\
   1.00149967645247\\
   0.99912054102433\\
   1.00021262473560\\
\end{pmatrix},
||x - x_c||_\infty = 0.00149967645247 \]
Relative error was $8.242534426059205\times 10^{12}$
while the condition number was $6.688889384173640\times 10^{13}$.

\subsection*{2.3 P9}
\subsubsection*{1-Norm}
\paragraph{Zero}
\[x = 0 \rightarrow x_i = 0 \rightarrow ||x||_1 = \sum_{i=1}^n |x_i| = 0.\]
\[x \neq 0 \rightarrow \exists i : x_i \neq 0 \rightarrow |x_i| > 0 \rightarrow ||x||_1 = \sum_{i=1}^n |x_i| > 0.\]
\paragraph{Multiple}
\[||kx||_1 = \sum_{i=1}^n |k x_i| = |k| \sum_{i=1}^n |a_i| = |k| ||x||_1.\]
\paragraph{Triangle Inequality}
\[||x+y||_1 = \sum_{i=1}^n |x_i+y_i| \leq \sum_{i=1}^n |x_i|+|y_i| = ||x||_1+||y||_1.\]
\subsubsection*{$\infty$-Norm}
\paragraph{Zero}
\[x = 0 \rightarrow x_i = 0 \rightarrow ||x||_\infty = \max{|x_i|} = 0.\]
\[x \neq 0 \rightarrow \exists i : x_i \neq 0 \rightarrow |x_i| > 0 \rightarrow ||x||_\infty = \max{|x_i|} > 0.\]
\paragraph{Multiple}
\[||kx||_\infty = \max{|k x_i|} = |k| \max{|a_i|} = |k| ||x||_\infty.\]
\paragraph{Triangle Inequality}
\[||x+y||_\infty = \max{|x_i+y_i|} \leq \max{|x_i|+|y_i|} \leq \max{|x_i|}+\max{|y_i|} = ||x||_\infty+||y||_\infty.\]


\end{document}


