6.7. Matrix decomposition exercises#

Answer the following exercises based on the content from this chapter. The solutions can be found in the appendices.

Exercise 6.1

Using pen and paper, solve the following systems of linear equations using LU decomposition.

(a)   \( \begin{align*} 2 x_1 + 3 x_2 - x_3 &= 4,\\ 4 x_1 + 9 x_2 - x_3 &= 18,\\ 3 x_2 + 2 x_3 &= 11. \end{align*} \)

(b)   \( \begin{align*} 3 x_1 + 9 x_2 + 5 x_3 &= 20,\\ x_1 + 2 x_2 + 2 x_3 &= 3,\\ 2 x_1 + 4 x_2 + 5 x_3 &= 4. \end{align*} \)


(c)   \( \begin{align*} x_1 + 3 x_3 + 2 x_4 &= 21,\\ 3 x_1 - 2 x_2 + 5 x_3 + x_4 &= 28,\\ 4 x_1 - x_2 - 2 x_3 - 3 x_4 &= -12,\\ 2 x_2 + 3 x_4 &= 13. \end{align*} \)


(d)   \( \begin{align*} x_1 + 5 x_2 + 2 x_3 + 2 x_4 &= -10,\\ - 2 x_1 - 4 x_2 + 2 x_3 &= 10,\\ 3 x_1 + x_2 - 2 x_3 - x_4 &= -2,\\ - 3 x_1 - 3 x_2 + 4 x_3 - x_4 &= 4. \end{align*} \)

Exercise 6.2

Using pen and paper, solve the systems from Exercise 6.1 using LU decomposition with partial pivoting.

Exercise 6.3

Using pen and paper, solve the following systems of linear equations using Cholesky decomposition.

(a)   \( \begin{align*} 16x_1 +16x_2 +4x_3 &=-8,\\ 16x_1 +25x_2 +10x_3 &=-47,\\ 4x_1 +10x_2 +6x_3 &=-30. \end{align*} \)

(b)   \( \begin{align*} 4x_1 +2x_2 +8x_3 &=36,\\ 2x_1 +17x_2 +20x_3 &=50,\\ 8x_1 +20x_2 +41x_3 &=122. \end{align*} \)


(c)   \( \begin{align*} 9x_1 -9x_2 -6x_4 &=12,\\ -9x_1 +25x_2 +8x_3 -10x_4 &=-116,\\ 8x_2 +8x_3 -2x_4 &=-58,\\ -6x_1 -10x_2 -2x_3 +33x_4 &=91. \end{align*} \)

Exercise 6.4

Using pen and paper, calculate the QR decomposition using the Gram-Schmidt process of the following matrices:

(a)   \( \begin{pmatrix} 1 & 1 \\ -1 & 0 \end{pmatrix}\);

(b)   \(\begin{pmatrix} 6 & 6 & 1 \\ 3 & 6 & 1 \\ 2 & 1 & 1 \end{pmatrix}\);

(c)   \(\begin{pmatrix} 1 & 2 & 1 \\ 1 & 4 & 3 \\ 1 & -4 & 6 \\ 1 & 2 & 1 \end{pmatrix}\).

Exercise 6.5

Using pen and paper, calculate the QR decomposition using the Householder transformations of the following matrices:

(a)   \( \begin{pmatrix} 3 & 0 \\ 4 & 5 \end{pmatrix}\);

(b)   \(\begin{pmatrix} 1 & 2 & 4 \\ 0 & 0 & 5 \\ 0 & 3 & 6 \end{pmatrix}\);

(c)   \(\begin{pmatrix} 2 & -2 & 18 \\ 2 & 1 & 0 \\ 1 & 2 & 0 \end{pmatrix}\).