2.3-exam1-2008-strang¶
Quiz 1, 2008 (strang) · Section 2.3: Matrix Computations and A = LU Source: exam1_1.pdf, pp. 195-196
Problem¶
2 (24 pts.) Elimination on \(A\) leads to \(U\):
\[
Ax = \begin{bmatrix} 1 & 1 & 1 \\ 1 & 3 & 3 \\ 1 & 3 & 7 \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix} \quad \text{leads to} \quad Ux = \begin{bmatrix} 1 & 1 & 1 \\ 0 & 2 & 2 \\ 0 & 0 & 4 \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix}.
\]
(a) Factor the first matrix \(A\) into \(A = LU\) and also into \(A = LDL^T\).
(b) Find the inverse of \(A\) by Gauss-Jordan elimination on \(AA^{-1} = I\) or by inverting \(L\) and \(D\) and \(L^T\).
(c) If \(D\) is diagonal, show that \(LDL^T\) is a symmetric matrix for every matrix \(L\) (square or rectangular).
Solution
(a) Since \(A\) is symmetric, we have an \(LDL^T\) decomposition, and we find this first. Since \[ U = \begin{bmatrix} 1 & 1 & 1 \\ 0 & 2 & 2 \\ 0 & 0 & 4 \end{bmatrix}, \] we must have \[ D = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 4 \end{bmatrix} \] and so \[ L^T = D^{-1}U = \begin{bmatrix} 1 & 1 & 1 \\ 0 & 1 & 1 \\ 0 & 0 & 1 \end{bmatrix}. \] Of course, this means that \[ L = \begin{bmatrix} 1 & 0 & 0 \\ 1 & 1 & 0 \\ 1 & 1 & 1 \end{bmatrix}, \] which we could have calculated directly. Together with the displayed \(U\), this also gives the factorization \(A = LU\). (b) If we did it using Gauss-Jordan elimination: \[ \begin{bmatrix} 1 & 1 & 1 & 1 & 0 & 0 \\ 1 & 3 & 3 & 0 & 1 & 0 \\ 1 & 3 & 7 & 0 & 0 & 1 \end{bmatrix} \rightsquigarrow \begin{bmatrix} 1 & 1 & 1 & 1 & 0 & 0 \\ 0 & 2 & 2 & -1 & 1 & 0 \\ 0 & 2 & 6 & -1 & 0 & 1 \end{bmatrix} \] \[ \rightsquigarrow \begin{bmatrix} 1 & 1 & 1 & 1 & 0 & 0 \\ 0 & 2 & 2 & -1 & 1 & 0 \\ 0 & 0 & 4 & 0 & -1 & 1 \end{bmatrix} \] (This is \(L^{-1}\) on the right hand side, so we can multiply and solve. We may also continue.) \[ \begin{bmatrix} 1 & 1 & 1 & 1 & 0 & 0 \\ 0 & 2 & 2 & -1 & 1 & 0 \\ 0 & 0 & 4 & 0 & -1 & 1 \end{bmatrix} \rightsquigarrow \begin{bmatrix} 1 & 1 & 1 & 1 & 0 & 0 \\ 0 & 1 & 1 & -1/2 & 1/2 & 0 \\ 0 & 0 & 1 & 0 & -1/4 & 1/4 \end{bmatrix} \] \[ \rightsquigarrow \begin{bmatrix} 1 & 1 & 0 & 1 & 1/4 & -1/4 \\ 0 & 1 & 0 & -1/2 & 3/4 & -1/4 \\ 0 & 0 & 1 & 0 & -1/4 & 1/4 \end{bmatrix} \] \[ \rightsquigarrow \begin{bmatrix} 1 & 0 & 0 & 3/2 & -1/2 & 0 \\ 0 & 1 & 0 & -1/2 & 3/4 & -1/4 \\ 0 & 0 & 1 & 0 & -1/4 & 1/4 \end{bmatrix} \] So \(A^{-1} = \begin{bmatrix} 3/2 & -1/2 & 0 \\ -1/2 & 3/4 & -1/4 \\ 0 & -1/4 & 1/4 \end{bmatrix}\). (c) We show a matrix is symmetric by showing that it is equal to its transpose. If \(D\) is diagonal, then of course \(D = D^T\). Thus: \[ \begin{aligned} (LDL^T)^T &= (L^T)^T D^T L^T \\ &= LDL^T \end{aligned} \]Keywords: LU factorization, LDL^T factorization, symmetric matrix, Gauss-Jordan, inverse matrix