Easy way to calculate inverse of an LU decomposition.

28.9k Views Asked by At

I have a matrix A and a lower triangular matrix L (with 1's along the diagonal) and an upper triangular matrix U. These are constructed such that $A=LU$. I know that $A^{-1} = L^{-1}U^{-1}$ and I know that the inverse of L is simply the non-diagonal entries with their signs flipped.

Question: Is there an easy way to find the inverse of U?

example: $$\begin{bmatrix}8 & 1 &6\\3 & 5 & 7\\4&9&2\end{bmatrix}^{-1} = \begin{bmatrix}1 & 0 &0\\-.5 & 1 & 0\\-.375 & -.544 & 1\end{bmatrix}\begin{bmatrix}8 & 1 &6\\0 & 8.5 & -1\\0&0&5.294\end{bmatrix}^{-1}$$

I need to find an algorithm for computing the inverse of the far right upper triangular matrix.

2

There are 2 best solutions below

2
On

A better aproach might be the following.

\begin{equation} \tag{1} \label{inverse} A \cdot A^{-1} = I_3 \end{equation}

Consider $A = L \cdot U$ the $LU$ decomposition of $A$. Then, because of \eqref{inverse},

\begin{equation*} L \cdot U \cdot A^{-1} = I \end{equation*}

or

\begin{equation*} \begin{bmatrix} 1 & 0 & 0 \\ -.5 & 1 & 0 \\ -.375 & -5.44 & 1 \end{bmatrix} \cdot \begin{bmatrix} 8 & 1 & 6 \\ 0 & 8.5 & -1 \\ 0 & 0 & 5.294 \end{bmatrix} \cdot \begin{bmatrix} v_1 & v_2 & v_3 \end{bmatrix} = \begin{bmatrix} e_1 & e_2 & e_3 \end{bmatrix} \end{equation*}

Where

  • $v_i$ are the colum vectors of $A^{-1}$
  • $e_i$ are standard unit vectors so that the right hand side of the equation represents the identity matrix.

Now you know you can easily calculate $v_i$ in the equation $L \cdot U \cdot v_i = e_i$ for every $i$ and you will have calculated $A^{-1}$.

0
On

There is no general "easy" way to compute the inverse of a triangular matrix. Here is one way to do it for a lower triangular matrix. For an upper triangular matrix, you can apply this to take the inverse of its (lower triangular) transpose (which can then be transposed again to give the inverse of the original matrix).