Compute Inverse of Matrix with given pivoted LU decomposition

inverselinear algebramatrices

It has been some time since I listened to the lectures about linear algebra and therefor I need to ask here.

I have given a square non-symmetric Matrix $A$ and successfully decomposed it into a lower and an upper triangular matrix $L$ and $U$. To reduce numerical errors as well as ensuring that there is such a decomposition, I used pivoting.

$$P\cdot A = L \cdot U$$

The main reason I am doing this is so that I can efficiently compute the determinant as well as the inverse. Computing the determinant would be:

$$det(P) \cdot det(A) = det(L) \cdot det(U) $$
$$\rightarrow det(A) = det(U) $$

An option would be to do this:

$$A^{-1} = (P^T \cdot L \cdot U)^{-1}$$
$$A^{-1} = U^{-1} \cdot L^{-1} \cdot P$$

Computing $U^{-1}$ and $L^{-1}$ is not hard but I am afraid of the computational overhead from the multiplications. What other solution is there?

Best Answer

Usually, the purpose of doing LU decomposition is to avoid having to compute an inverse at all, because an upper-triangular system can be solved easily via back-substitution.

A simple way to obtain the inverse would be to just complete the Gauss-Jordan elimination the rest of the way, instead of stopping at the halfway point as one does with LU decomposition.

Related Question