2076 12

MTH168 · 2076 · 5 marks

Find the QR factorization of the matrix beginbmatrix 2 & 1 3 & -1 endbmatrix

Find the QR factorization of the matrix $\begin{bmatrix} 2 & 1 \ 3 & -1 \end{bmatrix}$ [5]

Mathematics IIChapter 8: Orthogonality and Least SquaresThe Gram-Schmidt processNumerical: QR factorization

QR Factorization of $A = \begin{bmatrix} 2 & 1 \ 3 & -1 \end{bmatrix}$

Given

$$A = \begin{bmatrix} 2 & 1 \ 3 & -1 \end{bmatrix}$$

Columns: $$\mathbf{a_1} = \begin{bmatrix} 2 \ 3 \end{bmatrix}, \qquad \mathbf{a_2} = \begin{bmatrix} 1 \ -1 \end{bmatrix}$$

Goal: find orthogonal $Q$ and upper-triangular $R$ with $A = QR$.

Solution

First orthogonal vector

$$\mathbf{u_1} = \mathbf{a_1} = \begin{bmatrix} 2 \ 3 \end{bmatrix}, \qquad |\mathbf{u_1}| = \sqrt{4+9} = \sqrt{13}$$

$$\mathbf{q_1} = \frac{1}{\sqrt{13}}\begin{bmatrix} 2 \ 3 \end{bmatrix}$$

Second orthogonal vector

$$\mathbf{a_2}\cdot\mathbf{u_1} = (1)(2)+(-1)(3) = -1, \qquad \mathbf{u_1}\cdot\mathbf{u_1} = 13$$

$$\mathbf{u_2} = \mathbf{a_2} - \frac{-1}{13}\mathbf{u_1} = \begin{bmatrix} 1 \ -1 \end{bmatrix} + \frac{1}{13}\begin{bmatrix} 2 \ 3 \end{bmatrix} = \begin{bmatrix} \tfrac{15}{13} \ -\tfrac{10}{13} \end{bmatrix}$$

$$|\mathbf{u_2}| = \frac{1}{13}\sqrt{225+100} = \frac{\sqrt{325}}{13} = \frac{5\sqrt{13}}{13} = \frac{5}{\sqrt{13}}$$

$$\mathbf{q_2} = \frac{\mathbf{u_2}}{|\mathbf{u_2}|} = \frac{1}{\sqrt{13}}\begin{bmatrix} 3 \ -2 \end{bmatrix}$$

Matrix Q

$$Q = \frac{1}{\sqrt{13}}\begin{bmatrix} 2 & 3 \ 3 & -2 \end{bmatrix}$$

Matrix R

$$R = Q^{T}A = \frac{1}{\sqrt{13}}\begin{bmatrix} 2 & 3 \ 3 & -2 \end{bmatrix}\begin{bmatrix} 2 & 1 \ 3 & -1 \end{bmatrix}$$

Compute the entries:

  • $(1,1): \frac{1}{\sqrt{13}}(2\cdot2 + 3\cdot3) = \frac{13}{\sqrt{13}} = \sqrt{13}$
  • $(1,2): \frac{1}{\sqrt{13}}(2\cdot1 + 3\cdot(-1)) = \frac{-1}{\sqrt{13}}$
  • $(2,1): \frac{1}{\sqrt{13}}(3\cdot2 + (-2)\cdot3) = 0$
  • $(2,2): \frac{1}{\sqrt{13}}(3\cdot1 + (-2)(-1)) = \frac{5}{\sqrt{13}}$

$$\boxed{R = \begin{bmatrix} \sqrt{13} & -\dfrac{1}{\sqrt{13}} \[2mm] 0 & \dfrac{5}{\sqrt{13}} \end{bmatrix}}$$

Final Answer

$$Q = \frac{1}{\sqrt{13}}\begin{bmatrix} 2 & 3 \ 3 & -2 \end{bmatrix}, \qquad R = \begin{bmatrix} \sqrt{13} & -\tfrac{1}{\sqrt{13}} \ 0 & \tfrac{5}{\sqrt{13}} \end{bmatrix}$$

Verification

$$QR = \frac{1}{\sqrt{13}}\begin{bmatrix} 2 & 3 \ 3 & -2 \end{bmatrix}\cdot\frac{1}{\sqrt{13}}\begin{bmatrix} 13 & -1 \ 0 & 5 \end{bmatrix} = \frac{1}{13}\begin{bmatrix} 26 & 13 \ 39 & -13 \end{bmatrix} = \begin{bmatrix} 2 & 1 \ 3 & -1 \end{bmatrix} = A \checkmark$$

The completed values are $R_{11}=\sqrt{13}$, $R_{12}=-1/\sqrt{13}$, $R_{21}=0$ and $R_{22}=5/\sqrt{13}$.

Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.