## Linear Algebra and Its Applications, Exercise 1.7.6

Exercise 1.7.6. Given the 3 by 3 Hilbert matrix $A = \begin{bmatrix} 1&\frac{1}{2}&\frac{1}{3} \\ \frac{1}{2}&\frac{1}{3}&\frac{1}{4} \\ \frac{1}{3}&\frac{1}{4}&\frac{1}{5} \end{bmatrix}$

find its inverse (i) using an exact calculation and (ii) rounding off all values to three digits.

Answer: (i) We first multiply the first row times $\frac{1}{2}$ and subtract it from the second row, and then multiply the first row times $\frac{1}{3}$ and subtract it from the third row: $\begin{bmatrix} 1&\frac{1}{2}&\frac{1}{3}&\vline&1&0&0 \\ \frac{1}{2}&\frac{1}{3}&\frac{1}{4}&\vline&0&1&0 \\ \frac{1}{3}&\frac{1}{4}&\frac{1}{5}&\vline&0&0&1 \end{bmatrix} \rightarrow \begin{bmatrix} 1&\frac{1}{2}&\frac{1}{3}&\vline&1&0&0 \\ 0&\frac{1}{12}&\frac{1}{12}&\vline&-\frac{1}{2}&1&0 \\ 0&\frac{1}{12}&\frac{4}{45}&\vline&-\frac{1}{3}&0&1 \end{bmatrix}$

We then multiply the second row by 1 and subtract it from the third row: $\begin{bmatrix} 1&\frac{1}{2}&\frac{1}{3}&\vline&1&0&0 \\ 0&\frac{1}{12}&\frac{1}{12}&\vline&-\frac{1}{2}&1&0 \\ 0&\frac{1}{12}&\frac{4}{45}&\vline&-\frac{1}{3}&0&1 \end{bmatrix} \rightarrow \begin{bmatrix} 1&\frac{1}{2}&\frac{1}{3}&\vline&1&0&0 \\ 0&\frac{1}{12}&\frac{1}{12}&\vline&-\frac{1}{2}&1&0 \\ 0&0&\frac{1}{180}&\vline&\frac{1}{6}&-1&1 \end{bmatrix}$

This completes forward elimination. We start backward elimination by multiplying the third row by 15 and subtracting it from the second row, and multiplying the third row by 60 and subtracting it from the first row: $\begin{bmatrix} 1&\frac{1}{2}&\frac{1}{3}&\vline&1&0&0 \\ 0&\frac{1}{12}&\frac{1}{12}&\vline&-\frac{1}{2}&1&0 \\ 0&0&\frac{1}{180}&\vline&\frac{1}{6}&-1&1 \end{bmatrix} \rightarrow \begin{bmatrix} 1&\frac{1}{2}&0&\vline&-9&60&-60 \\ 0&\frac{1}{12}&0&\vline&-3&16&-15 \\ 0&0&\frac{1}{180}&\vline&\frac{1}{6}&-1&1 \end{bmatrix}$

We then multiply the second row by 6 and subtract it from the first row: $\begin{bmatrix} 1&\frac{1}{2}&0&\vline&-9&60&-60 \\ 0&\frac{1}{12}&0&\vline&-3&16&-15 \\ 0&0&\frac{1}{180}&\vline&\frac{1}{6}&-1&1 \end{bmatrix} \rightarrow \begin{bmatrix} 1&0&0&\vline&9&-36&30 \\ 0&\frac{1}{12}&0&\vline&-3&16&-15 \\ 0&0&\frac{1}{180}&\vline&\frac{1}{6}&-1&1 \end{bmatrix}$

This completes backward elimination. We then multiply the second row by 12 and the third row by 180: $\begin{bmatrix} 1&0&0&\vline&9&-36&30 \\ 0&\frac{1}{12}&0&\vline&-3&16&-15 \\ 0&0&\frac{1}{180}&\vline&\frac{1}{6}&-1&1 \end{bmatrix} \rightarrow \begin{bmatrix} 1&0&0&\vline&9&-36&30 \\ 0&1&0&\vline&-36&192&-180 \\ 0&0&1&\vline&30&-180&180 \end{bmatrix}$

By exact calculation we therefore have $A^{-1} = \begin{bmatrix} 9&-36&30 \\ -36&192&-180 \\ 30&-180&180 \end{bmatrix}$

(ii) We start by rounding all values of the matrix $A$ to three digits: $\begin{bmatrix} 1&\frac{1}{2}&\frac{1}{3} \\ \frac{1}{2}&\frac{1}{3}&\frac{1}{4} \\ \frac{1}{3}&\frac{1}{4}&\frac{1}{5} \end{bmatrix} \rightarrow \begin{bmatrix} 1&.500&.333 \\ .500&.333&.250 \\ .333&.250&.200 \end{bmatrix}$

We start forward elimination by multiplying the first row times .500 and subtracting it from the second row, and then multiplying the first row times .333 and subtracting it from the third row: $\begin{bmatrix} 1&.500&.333&\vline&1&0&0 \\ .500&.333&.250&\vline&0&1&0 \\ .333&.250&.200&\vline&0&0&1 \end{bmatrix} \rightarrow \begin{bmatrix} 1&.500&.333&\vline&1&0&0 \\ 0&.083&.084&\vline&-.500&1&0 \\ 0&.084&.089&\vline&-.333&0&1 \end{bmatrix}$

We continue by multiplying the second row times 1.01  (0.84/0.83 rounded to three digits) and subtracting it from the third row: $\begin{bmatrix} 1&.500&.333&\vline&1&0&0 \\ 0&.083&.084&\vline&-.500&1&0 \\ 0&.084&.089&\vline&-.333&0&1 \end{bmatrix} \rightarrow \begin{bmatrix} 1&.500&.333&\vline&1&0&0 \\ 0&.083&.084&\vline&-.500&1&0 \\ 0&0&.004&\vline&.172&-1.01&1 \end{bmatrix}$

At this point forward elimination is complete, and we start reverse elimination by multiplying 21 (.084/.004) times the third row and subtracting it from the second, and multiplying 83.2 (.333/.004 rounded to three digits) times the third row and subtracting it from the first: $\begin{bmatrix} 1&.500&.333&\vline&1&0&0 \\ 0&.083&.084&\vline&-.500&1&0 \\ 0&0&.004&\vline&.172&-1.01&1 \end{bmatrix} \rightarrow \begin{bmatrix} 1&.500&0&\vline&-13.3&84.0&-83.2 \\ 0&.083&0&\vline&-4.11&22.2&-21 \\ 0&0&.004&\vline&.172&-1.01&1 \end{bmatrix}$

We then multiply the second row by 6.02 (.500/.083 rounded to three digits) and subract it from the first: $\begin{bmatrix} 1&.500&0&\vline&-13.3&84.0&-83.2 \\ 0&.083&0&\vline&-4.11&22.2&-21 \\ 0&0&.004&\vline&.172&-1.01&1 \end{bmatrix} \rightarrow \begin{bmatrix} 1&0&0&\vline&11.4&-50&42.8 \\ 0&.083&0&\vline&-4.11&22.2&-21 \\ 0&0&.004&\vline&.172&-1.01&1 \end{bmatrix}$

At this point reverse elimination is complete, and we divide the second row by .083 and the third row by .004: $\begin{bmatrix} 1&0&0&\vline&11.4&-50&42.8 \\ 0&.083&0&\vline&-4.11&22.2&-21 \\ 0&0&.004&\vline&.172&-1.01&1 \end{bmatrix} \rightarrow \begin{bmatrix} 1&0&0&\vline&11.4&-50&42.8 \\ 0&1&0&\vline&-49.5&267&-253 \\ 0&0&1&\vline&43&-252&250 \end{bmatrix}$

We then have the approximated value of the inverse of $A$ as $A^{-1} = \begin{bmatrix} 11.4&-50&42.8 \\ -49.5&267&-253 \\ 43&-252&250 \end{bmatrix} \quad \rm vs. \quad A_{-1} = \begin{bmatrix} 9&-36&30 \\ -36&192&-180 \\ 30&-180&180 \end{bmatrix}$

Note that the approximated values are roughly 25% to 50% off compared to the exact values.

NOTE: This continues a series of posts containing worked out exercises from the (out of print) book Linear Algebra and Its Applications, Third Edition by Gilbert Strang.

If you find these posts useful I encourage you to also check out the more current Linear Algebra and Its Applications, Fourth Edition , Dr Strang’s introductory textbook Introduction to Linear Algebra, Fourth Edition and the accompanying free online course, and Dr Strang’s other books .

This entry was posted in linear algebra. Bookmark the permalink.