# Workshop 1 - SLIAL
## Exercise 1

### Question 1
#### 1.1

$\begin{bmatrix}
1& t & \dots & t^{n-1} & \vert & y_1\\
1& t & \dots & t^{n-1} & \vert & y_2\\
& & \ddots & & \vert & \\
1& t & \dots & t^{n-1} & \vert & y_n
\end{bmatrix}$
Each equation would be done like this example for and arbitrary k, 0<k<n:
$q_0 + q_1*t_k + ... + q_{n-1}*t_k^{n-1} = y_k$
The total matrix of a system consists of the coefficient matrix with an added column containing the constants from the right sides of the equations.
#### 1.2

Points (1,4), (2,0), (3,12) will be inserted into our total matrix by first writing the corresponding equations.
$q_0 + q_1*1 + q_2*1^2 = 4$
$q_0 + q_1*2 + q_2*2^2 = 0$
$q_0 + q_1*3 + q_2*3^2 = 12$
$\begin{bmatrix}
1 & 1 & 1^2 & \vert & 4\\
1 & 2 & 2^2 & \vert & 0\\
1 & 3 & 3^2 & \vert & 12\\
\end{bmatrix}$
simplified:
$\begin{bmatrix}
1& 1 & 1 & \vert & 4\\
1& 2 & 4 & \vert & 0\\
1& 3 & 9 & \vert & 12\\
\end{bmatrix}$
$r_2 - r_1$
$\begin{bmatrix}
1& 1 & 1 & \vert & 4\\
0& 1 & 3 & \vert & -4\\
1& 3 & 9 & \vert & 12\\
\end{bmatrix}$
$r_3 - 2*r_2$
$\begin{bmatrix}
1& 1 & 1 & \vert & 4\\
0& 1 & 3 & \vert & -4\\
1& 1 & 3 & \vert & 20\\
\end{bmatrix}$
$r_3 - r_1$
$\begin{bmatrix}
1& 1 & 1 & \vert & 4\\
0& 1 & 3 & \vert & -4\\
0& 0 & 2 & \vert & 16\\
\end{bmatrix}$
Not nessesary but:
To get to reduced row echelon form the diagonal must all be 1s
$r_3 / 2$
$\begin{bmatrix}
1& 1 & 1 & \vert & 4\\
0& 1 & 3 & \vert & -4\\
0& 0 & 1 & \vert & 8\\
\end{bmatrix}$
these are the resulting equations.
$q_0 + q_1 + q_2 = 4$
$q_1 + q_2*3 = -4$
$q_2 = 8$
now we will find the polinomial using backwards substitution.
we know that $q_2$ is 8
$q_2 = 8$
$q_1 + 8*3 = -4$
$q_1 + 24 = -4$
$q_1 = -28$
$q_0 -28 + 8 = 4$
$q_0 -20 = 4$
$q_0 = 24$
Now the values for q will be substituted into the starting function to find the polynomial.
$p(t) = 24 - 28*t + 8*t^2$
$A=(1,4)$ $B=(2,0)$ $C=(3,12)$

#### 1.3

Points (-2,3), (-1,5), (0,1), (1,4) and (2,10) will be inserted into our total matrix by first writing the corresponding equations.
$q_0 + q_1*(-2) + q_2*(-2)^2 q_3*(-2)^3 + q_4*(-2)^4= 3$
$q_0 + q_1*(-1) + q_2*(-1)^2 q_3*(-1)^3 + q_4*(-1)^4= 5$
$q_0 + q_1*0 + q_2*0^2 + q_3*0^3 + q_4*0^4= 1$
$q_0 + q_1*1 + q_2*1^2 + q_3*1^3 + q_4*1^4= 4$
$q_0 + q_1*2 + q_2*2^2 + q_3*2^3 + q_4*2^4= 10$
$\begin{bmatrix}
1 & -2 & -2^2 & -2^3 & -2^4 & \vert & 3\\
1 & -1 & -1^2 & -1^3 & -1^4 & \vert & 5\\
1 & 0 & 0 & 0 & 0 & \vert & 1\\
1 & 1 & 1 & 1 & 1 & \vert & 4\\
1 & 2 & 2^2 & 2^3 & 2^4 & \vert & 10\\
\end{bmatrix}$
Simplified:
$\begin{bmatrix}
1 & -2 & 4 & -8 & 16 & \vert & 3\\
1 & -1 & 1 & -1 & 1 & \vert & 5\\
1 & 0 & 0 & 0 & 0 & \vert & 1\\
1 & 1 & 1 & 1 & 1 & \vert & 4\\
1 & 2 & 4 & 8 & 16 & \vert & 10\\
\end{bmatrix}$
$r_3 \leftrightarrow r_1$
$\begin{bmatrix}
1 & 0 & 0 & 0 & 0 & \vert & 1\\
1 & -1 & 1 & -1 & 1 & \vert & 5\\
1 & -2 & 4 & -8 & 16 & \vert & 3\\
1 & 1 & 1 & 1 & 1 & \vert & 4\\
1 & 2 & 4 & 8 & 16 & \vert & 10\\
\end{bmatrix}$
$r_4 \leftrightarrow r_2$
$\begin{bmatrix}
1 & 0 & 0 & 0 & 0 & \vert & 1\\
1 & 1 & 1 & 1 & 1 & \vert & 4\\
1 & -2 & 4 & -8 & 16 & \vert & 3\\
1 & -1 & 1 & -1 & 1 & \vert & 5\\
1 & 2 & 4 & 8 & 16 & \vert & 10\\
\end{bmatrix}$
$r_2 - r_1$
$\begin{bmatrix}
1 & 0 & 0 & 0 & 0 & \vert & 1\\
0 & 1 & 1 & 1 & 1 & \vert & 3\\
1 & -2 & 4 & -8 & 16 & \vert & 3\\
1 & -1 & 1 & -1 & 1 & \vert & 5\\
1 & 2 & 4 & 8 & 16 & \vert & 10\\
\end{bmatrix}$
$r_3 - r_1$
$\begin{bmatrix}
1 & 0 & 0 & 0 & 0 & \vert & 1\\
0 & 1 & 1 & 1 & 1 & \vert & 3\\
0 & -2 & 4 & -8 & 16 & \vert & 2\\
1 & -1 & 1 & -1 & 1 & \vert & 5\\
1 & 2 & 4 & 8 & 16 & \vert & 10\\
\end{bmatrix}$
$r_3 + 2*r_2$
$\begin{bmatrix}
1 & 0 & 0 & 0 & 0 & \vert & 1\\
0 & 1 & 1 & 1 & 1 & \vert & 3\\
0 & 0 & 6 & -6 & 18 & \vert & 8\\
1 & -1 & 1 & -1 & 1 & \vert & 5\\
1 & 2 & 4 & 8 & 16 & \vert & 10\\
\end{bmatrix}$
$r_4 - r_1$
$\begin{bmatrix}
1 & 0 & 0 & 0 & 0 & \vert & 1\\
0 & 1 & 1 & 1 & 1 & \vert & 3\\
0 & 0 & 6 & -6 & 18 & \vert & 8\\
0 & -1 & 1 & -1 & 1 & \vert & 4\\
1 & 2 & 4 & 8 & 16 & \vert & 10\\
\end{bmatrix}$
$r_4 + r_2$
$\begin{bmatrix}
1 & 0 & 0 & 0 & 0 & \vert & 1\\
0 & 1 & 1 & 1 & 1 & \vert & 3\\
0 & 0 & 6 & -6 & 18 & \vert & 8\\
0 & 0 & 2 & 0 & 2 & \vert & 7\\
1 & 2 & 4 & 8 & 16 & \vert & 10\\
\end{bmatrix}$
$r_4 - r_3/3$
$\begin{bmatrix}
1 & 0 & 0 & 0 & 0 & \vert & 1\\
0 & 1 & 1 & 1 & 1 & \vert & 3\\
0 & 0 & 6 & -6 & 18 & \vert & 8\\
0 & 0 & 0 & 2 & -4 & \vert & \frac{13}{3}\\
1 & 2 & 4 & 8 & 16 & \vert & 10\\
\end{bmatrix}$
$r_5 - r_1$
$\begin{bmatrix}
1 & 0 & 0 & 0 & 0 & \vert & 1\\
0 & 1 & 1 & 1 & 1 & \vert & 3\\
0 & 0 & 6 & -6 & 18 & \vert & 8\\
0 & 0 & 0 & 2 & -4 & \vert & \frac{13}{3}\\
0 & 2 & 4 & 8 & 16 & \vert & 9\\
\end{bmatrix}$
$r_5 - 2*r_2$
$\begin{bmatrix}
1 & 0 & 0 & 0 & 0 & \vert & 1\\
0 & 1 & 1 & 1 & 1 & \vert & 3\\
0 & 0 & 6 & -6 & 18 & \vert & 8\\
0 & 0 & 0 & 2 & -4 & \vert & \frac{13}{3}\\
0 & 0 & 2 & 6 & 14 & \vert & 3\\
\end{bmatrix}$
$r_5 - r_3/3$
$\begin{bmatrix}
1 & 0 & 0 & 0 & 0 & \vert & 1\\
0 & 1 & 1 & 1 & 1 & \vert & 3\\
0 & 0 & 6 & -6 & 18 & \vert & 8\\
0 & 0 & 0 & 2 & -4 & \vert & \frac{13}{3}\\
0 & 0 & 0 & 8 & 8 & \vert & \frac{1}{3}\\
\end{bmatrix}$
$r_5 - 4*r_4$
$\begin{bmatrix}
1 & 0 & 0 & 0 & 0 & \vert & 1\\
0 & 1 & 1 & 1 & 1 & \vert & 3\\
0 & 0 & 6 & -6 & 18 & \vert & 8\\
0 & 0 & 0 & 2 & -4 & \vert & \frac{13}{3}\\
0 & 0 & 0 & 0 & 24 & \vert & - \frac{51}{3}\\
\end{bmatrix}$
To get to row echelon form the diagonal must all be 1s
$r_3/6$
$\begin{bmatrix}
1 & 0 & 0 & 0 & 0 & \vert & 1\\
0 & 1 & 1 & 1 & 1 & \vert & 3\\
0 & 0 & 1 & -1 & 3 & \vert & \frac{4}{3}\\
0 & 0 & 0 & 2 & -4 & \vert & \frac{13}{3}\\
0 & 0 & 0 & 0 & 24 & \vert & - \frac{51}{3}\\
\end{bmatrix}$
$r_4/2$
$\begin{bmatrix}
1 & 0 & 0 & 0 & 0 & \vert & 1\\
0 & 1 & 1 & 1 & 1 & \vert & 3\\
0 & 0 & 1 & -1 & 3 & \vert & \frac{4}{3}\\
0 & 0 & 0 & 1 & -2 & \vert & \frac{13}{6}\\
0 & 0 & 0 & 0 & 1 & \vert & - \frac{51}{3}\\
\end{bmatrix}$
r_5/24
$\begin{bmatrix}
1 & 0 & 0 & 0 & 0 & \vert & 1\\
0 & 1 & 1 & 1 & 1 & \vert & 3\\
0 & 0 & 1 & -1 & 3 & \vert & \frac{4}{3}\\
0 & 0 & 0 & 1 & -2 & \vert & \frac{13}{6}\\
0 & 0 & 0 & 0 & 1 & \vert & - \frac{17}{24}\\
\end{bmatrix}$
These are the resulting equations.
$q_0 = 1$
$q_1 + q_2 + q_3 + q_4 = 3$
$q_2 - 1*q_3 + 3*q_4= \frac{4}{3}$
$q_3 - 2*q_4 = \frac{13}{6}$
$q_4 = -\frac{17}{24}$
Using backwards substitution we can find the q values.
q0 and q4 are known.
$q_0 = 1$
$q_4 = -\frac{17}{24}$
isolating q3.
$q_3 + 2*\frac{17}{24} = \frac{13}{6}$
$q_3 = \frac{13}{6} - 2*\frac{17}{24}$
$q_3 = \frac{3}{4}$
isolating q2.
$q_2 - \frac{3}{4} - 3*\frac{17}{24} = \frac{4}{3}$
$q_2 - \frac{18}{24} - 3*\frac{17}{24} = \frac{4}{3}$
$q_2 = \frac{4}{3} + \frac{69}{24}$
$q_2 = \frac{32}{24} + \frac{69}{24}$
$q_2 = \frac{101}{24}$
isolating q1.
$q_1 + \frac{101}{24} + \frac{3}{4} - \frac{17}{24} = 3$
$q_1 + \frac{101}{24} + \frac{18}{24} - \frac{17}{24} = 3$
$q_1 + \frac{102}{24} = 3$
$q_1 = 3 - \frac{102}{24}$
$q_1 = - \frac{5}{4}$
The polynomial is then constructed using these values.
$p(t) = 1 - \frac{5}{4}*t + \frac{101}{24}*t^2 + \frac{3}{4}*t^3 -\frac{17}{24}*t^4$
$A=(-2,3)$ $B=(-1,5)$ $C=(0,1)$ $D=(1,4)$ $E=(2,10)$

## Exercise 2



### Question 2
#### 2.1

This is the definition of a linear transformation:

These 2 rules must be applicable to our transformation for it to be linear. The first rule is applied as seen here:
*(NOTE that these 2 rules always apply with matrix\*vector multiplication!)*
$T_{\omega}(O_1 + O_2) =
T_{\omega}(O_1) + T_{\omega}(O_2)$
Substituting $O_1 + O_2$ and $O_1$ and $O_2$ seperately into the function:
$\begin{align}T_{\omega}(O_1+O_2) =
\sum_{\zeta=\max\{y-k,1\}}^{\min\{y+k,N\}}
\sum_{\xi=\max\{x-k,1\}}^{\min\{x+k,M\}}
\omega_{y-\zeta+k+1,x-\xi+k+1}\,
(O_1+O_2)_{\zeta,\xi}\end{align}$
$\begin{align}T_{\omega}(O_1) + T_{\omega}(O_2) &=
\sum_{\zeta=\max\{y-k,1\}}^{\min\{y+k,N\}}
\sum_{\xi=\max\{x-k,1\}}^{\min\{x+k,M\}}
\omega_{y-\zeta+k+1,x-\xi+k+1}\,
(O_1)_{\zeta,\xi}+
\omega_{y-\zeta+k+1,x-\xi+k+1}\,
(O_2)_{\zeta,\xi}\end{align}$
We use factorization to prove that they are the same, in other words one matrix transformation can be expressed as 2 seperate transformations that are done after each other to give the same result as the original matrix transformation.
Here weighing the pixel in the first image and afterwards weighing the pixel in the other image, whereafter they are added gives the same result as weighing the 2 pixels at the same time by adding them together first and doing the same with the weights next to them, and then weighing the result as a whole:
$\begin{align}T_{\omega}(O_1) + T_{\omega}(O_2) &=
\sum_{\zeta=\max\{y-k,1\}}^{\min\{y+k,N\}}
\sum_{\xi=\max\{x-k,1\}}^{\min\{x+k,M\}}
\omega_{y-\zeta+k+1,x-\xi+k+1}\,
(O_1)_{\zeta,\xi}+
\omega_{y-\zeta+k+1,x-\xi+k+1}\,
(O_2)_{\zeta,\xi}\\
&= \sum_{\zeta=\max\{y-k,1\}}^{\min\{y+k,N\}}
\sum_{\xi=\max\{x-k,1\}}^{\min\{x+k,M\}}
\omega_{y-\zeta+k+1,x-\xi+k+1}\,
(O_1+O_2)_{\zeta,\xi}\end{align}$
The second rule is:
$T_{\omega}(c \cdot O) =
c \cdot T_{\omega}(O)$
$\begin{align}T_{\omega}(c \cdot O) = \sum_{\zeta=\max\{y-k,1\}}^{\min\{y+k,N\}}
\sum_{\xi=\max\{x-k,1\}}^{\min\{x+k,M\}}
\omega_{y-\zeta+k+1,x-\xi+k+1}\,
(c\cdot O)_{\zeta,\xi}\end{align}$
$\begin{align}c \cdot T_{\omega}(O) &= c \cdot \left(\sum_{\zeta=\max\{y-k,1\}}^{\min\{y+k,N\}}
\sum_{\xi=\max\{x-k,1\}}^{\min\{x+k,M\}}
\omega_{y-\zeta+k+1,x-\xi+k+1}\,
O_{\zeta,\xi}\right)\end{align}$
We prove that these are the same by multiplying $c$ into the parentheses. This just multiplies the factor $c$ to every term, here the only term is $O$:
$\begin{align}c \cdot T_{\omega}(O) &= c \cdot \left(\sum_{\zeta=\max\{y-k,1\}}^{\min\{y+k,N\}}
\sum_{\xi=\max\{x-k,1\}}^{\min\{x+k,M\}}
\omega_{y-\zeta+k+1,x-\xi+k+1}\,
O_{\zeta,\xi}\right)\\
&= \sum_{\zeta=\max\{y-k,1\}}^{\min\{y+k,N\}}
\sum_{\xi=\max\{x-k,1\}}^{\min\{x+k,M\}}
\omega_{y-\zeta+k+1,x-\xi+k+1}\,
(c\cdot O)_{\zeta,\xi}
\end{align}$
We have shown for an arbitrary element that it is a linear transformation.
$T_{\omega}(vec(O)) + T_{\omega}(vec(P)) = T_{\omega}(vec(O) + vec(P))$
$c \cdot T_{\omega}(vec(O)) = T_{\omega}(c \cdot vec(O))$
Because we have shown that this is true for any individual element, it is true for all elements.
We are treating O as a vector as it should in a linear transformation.
#### 2.2

$i = M(y-1) + x, 1 < x < M \text{ and } 1 < y < N$
$j = M(\zeta - 1) + \xi, 1 < \xi < M \text { and } q < \zeta < N$
<!-- In case 1 we have $\vert x - \xi \vert ≤ k$ and $\vert y - \zeta \vert ≤ k$
In case 2 we have $\vert x - \xi \vert > k$ and $\vert y - \zeta \vert > k$ -->
$\begin{align}A_{ij} =
\sum_{\zeta=\max\{i-k,1\}}^{\min\{i+k,N\}}
\sum_{\xi=\max\{j-k,1\}}^{\min\{j+k,M\}}
\omega_{i-\zeta+k+1,j-\xi+k+1}\,
O_{\zeta,\xi}\end{align}$
If it should be more speciffic then:
There are several possible functions to describe $A_{ij}$ since the 2 summations each have a max and a min function to determine if the matrix $w$ with the weights would go outside the bounds of the image and correct this and there are several logically possible combinations of these max and min functions depending on where in the image $A_{ij}$ is located (omitting the unlikely possibility that the image is smaller than matrix $w$).
The possibilities for the inner summation is:
from $\xi=x-k$ to $x+k$ , if $j-k≥1$ and $j+k≤M$
from $\xi=x-k$ to $M$ , if $j-k≥1$ and $j+k>M$
from $\xi=1$ to $x+k$ , if $j-k<1$ and $j+k≤M$
The possibilities for the outer summation is:
from $\zeta=y-k$ to $y+k$ , if $i-k≥1$ and $i+k≤N$
from $\zeta=y-k$ to $N$ , if $i-k≥1$ and $i+k>N$
from $\zeta=1$ to $y+k$ , if $i-k<1$ and $i+k≤N$
According to where $A_{ij}$ is located exactly one possibility from each summation apply. These values could then be substituted into the the summations as well as the rest of the function. We would also still substitute $x$ with the value of $j$ and substitute $y$ with the value of $i$.
---
*Don't know if this is relevant but here i determine the standard matrix:*
We start by determining the standard matrix for this transformation.
This is done by representing the $vec(O)$ as a sum of $MN$ basis vectors in $ℝ^{MN}$.
$\begin{align} vec(O) = \begin{bmatrix}
x_1\\
x_2\\
\vdots\\
x_{MN}\\
\end{bmatrix} = x_1*e_1 + x_2*e_2 +\dots+ x_{MN}*e_{MN}\end{align}$
consequently, since T is a linear transformation:
$\begin{align} T(x) = x_1*T(e_1) + x_2*T(e_2) +\dots+ x_{MN}*T(e_{MN})\end{align}$
We can express this as the matrix-vector product, where the matrix has the dimensions $MN*MN$ and is the standard matrix:
$\begin{align} T(x) = \begin{bmatrix}T(e_1) & T(e_2) &\dots &T(e_{MN})\end{bmatrix}*x\end{align}$
element $A_{ij}$ of the standard matrix would therefore be:
$A_{ij} =$ the $i$'th element of $T(e_j)$
### Question 3

#### 3.1

When $\epsilon$ nears $0$, the two vectors represented by the two columns in $A$ become closer to parallel. Them being parallel would make them linearly dependent, so them being almost parallel would make them "almost linearly dependent".

#### 3.2

$A = \begin{bmatrix}
1 & 1\\
1 & 1 + \epsilon
\end{bmatrix}$
$b = \begin{bmatrix}
2\\
2 + \delta
\end{bmatrix}$
$Ax = b$
This written in total matrix form:
$\begin{bmatrix}
1 & 1 & \vert & 2\\
1 & 1 + \epsilon & \vert & 2 + \delta
\end{bmatrix}$
Gaussian elimination:
$r_2 = r_2 - r_1$
$\begin{bmatrix}
1 & 1 & \vert & 2\\
0 & 1 + \epsilon - 1 & \vert & 2 + \delta - 2
\end{bmatrix}$
Reduction
$\begin{bmatrix}
1 & 1 & \vert & 2\\
0 & \epsilon & \vert & \delta
\end{bmatrix}$
The parameters:
$\epsilon \cdot x_1 = \delta$
$x_1 = \frac{\delta}{\epsilon}$
$x_0 + \frac{\delta}{\epsilon} = 2$
$x_0 = 2 - \frac{\delta}{\epsilon}$
$\mathbf{x}=\begin{bmatrix}
2 - \frac{\delta}{\epsilon}\\
\frac{\delta}{\epsilon}
\end{bmatrix}$
#### 3.3

$\mathbf{x}=\begin{bmatrix}
2 - \frac{\delta}{\epsilon}\\
\frac{\delta}{\epsilon}
\end{bmatrix}$
Since $\delta$ is devided by $\epsilon$ which is close to zero. Dividing by 0.1 would be the same as multiplying by 10, dividing by 0.01 would be the same as multiplying by 100 which is already 10 times bigger. Therefore these small changes makes a big difference in the outcome.
## Exercise 3



### Question 4
#### 4.1

$A=\begin{bmatrix}
-12 & 4 & 0 & -6\\
6 & 14 & 3 & -3\\
-5 & -8 & 24 & 8\\
1 & -4 & 10 & 16\\
\end{bmatrix}$
$L=\begin{bmatrix}
-12 & 0 & 0 & 0\\
6 & 14 & 0 & 0\\
-5 & -8 & 24 & 0\\
1 & -4 & 10 & 16\\
\end{bmatrix}$
$U=A-L=\begin{bmatrix}
0 & 4 & 0 & -6\\
0 & 0 & 3 & -3\\
0 & 0 & 0 & 8\\
0 & 0 & 0 & 0\\
\end{bmatrix}$
#### 4.2

$x^{(0)}=\begin{bmatrix}1\\2\\3\\4\end{bmatrix}$
$Lx^{(k+1)} = b-Ux^{(k)}$
$L^{-1}Lx^{(k+1)} = L^{-1}(b-Ux^{(k)})$
$x^{(k+1)} = L^{-1}(b-Ux^{(k)})$
$x^{(k+1)} = L^{-1}b-L^{-1}(Ux^{(k)})$
We start by finding $L^{-1}$
$\begin{bmatrix}
-1/12 & 0 & 0 & 0\\
1/28 & 1/14 & 0 & 0\\
-11/2016 & 1/42 & 1/24 & 0\\
283/16128 & 1/336 & -5/192 & 1/16\\
\end{bmatrix}$
$Ux^{(k)} =
\begin{bmatrix}
-16 \\ -3 \\ -32 \\ 0
\end{bmatrix}$
$Ux^{(k)} = \begin{bmatrix}
0 & 4 & 0 & -6\\
0 & 0 & 3 & -3\\
0 & 0 & 0 & 8\\
0 & 0 & 0 & 0\\
\end{bmatrix} \cdot \begin{bmatrix}
1\\2\\3\\4\\
\end{bmatrix}=
\begin{bmatrix}
-16 \\ -3 \\ -32 \\ 0
\end{bmatrix}$
$\begin{align}L^{-1}Ux^{(k)} &=
\begin{bmatrix}
-1/12 & 0 & 0 & 0\\
1/28 & 1/14 & 0 & 0\\
-11/2016 & 1/42 & 1/24 & 0\\
283/16128 & 1/336 & -5/192 & 1/16\\
\end{bmatrix}
\cdot \begin{bmatrix}
-16 \\ -3 \\ -32 \\ 0
\end{bmatrix}\\ &=
\begin{bmatrix}
-4/3 \\ -11/14 \\ -83/63 \\ 137/252
\end{bmatrix}\end{align}$
$\begin{align}L^{-1}b &= \begin{bmatrix}
-1/12 & 0 & 0 & 0\\
1/28 & 1/14 & 0 & 0\\
-11/2016 & 1/42 & 1/24 & 0\\
283/16128 & 1/336 & -5/192 & 1/16\\
\end{bmatrix} \cdot
\begin{bmatrix}
-8 \\ 47\\ -93\\ -13
\end{bmatrix} \\&=
\begin{bmatrix}
2/3 \\ 43/14\\ -1367/504 \\ 6487/4032
\end{bmatrix}\end{align}$
$\begin{align}L^{-1}b - L^{-1}Ux^{(k)} &=
\begin{bmatrix}
-4/3 \\ -11/14 \\ -83/63 \\ 137/252
\end{bmatrix} -
\begin{bmatrix}
2/3 \\ 43/14\\ -1367/504 \\ 6487/4032
\end{bmatrix}\\ &= \begin{bmatrix}-2\\ -27/7 \\ 703/504 \\ -4295/4032\end{bmatrix}\end{align}$
##### Other solution
$Lx^{(1)} = b - Ux^{(0)}$
Calculates the right side of the equation:
$Ux^{(0)} = \begin{bmatrix}
0 & 4 & 0 & -6\\
0 & 0 & 3 & -3\\
0 & 0 & 0 & 8\\
0 & 0 & 0 & 0\\
\end{bmatrix} \cdot \begin{bmatrix}
1\\2\\3\\4\\
\end{bmatrix}=
\begin{bmatrix}
-16 \\ -3 \\ -32 \\ 0
\end{bmatrix}$
$b - Ux^{(0)} =
\begin{bmatrix}
-8 \\ 47\\ -93\\ -13
\end{bmatrix} -
\begin{bmatrix}
-16 \\ -3 \\ -32 \\ 0
\end{bmatrix} =
\begin{bmatrix}
8 \\ 50 \\ -61 \\ -13
\end{bmatrix}$
$\begin{bmatrix}
-12 & 0 & 0 & 0 & \vert & 8\\
6 & 14 & 0 & 0 & \vert & 50\\
-5 & -8 & 24 & 0 & \vert & -61\\
1 & -4 & 10 & 16 & \vert & -13\\
\end{bmatrix}$
$-12x_1 = 8$
$x_1 = -8/12$
$x_1 = -2/3$
$6(-2/3) + 14x_2 = 50$
$x_2 = \frac{50 - 6(8/12)}{14} = 27/7$
$-5(-8/12) - 8(27/7) + 24x_3 = -61$
$x_3 = \frac{-61 + 578/21}{24}$
$x_3 = -703/504$
$(-8/12) - 4(27/7) + 10(-703/504) + 16x_4 = -13$
$-7571/252 + 16x_4 = -13$
$x_4 = \frac{-13+7571/252}{16}$
$x_4 = 4295/4032$