Skip to main content
Fix name typo.
Source Link
Kirill
  • 11.5k
  • 2
  • 27
  • 51

Normally there are some principal reasons to prefer solve a linear system respect to use the inverse. Briefly:

  • problem with the conditional number (@GoHokies comment)
  • problem in the sparse case (@ChrisRackauckas answer)
  • efficiency (@Krill@Kirill comment)

Anyway, as @ChristianClason remarked in comments, can be some cases where the use of the inverse is a good option.

In the note/article by Alex Druinsky, Sivan Toledo, How Accurate is inv(A)*b? there are some consideration about this problem.

According with the paper the principal reason for the general preference to use solve the linear system is inside these two estimates ($x$ is the true solution): $$ \text{inverse} \quad || x_V - x || \leq O(\kappa^2(A) \epsilon_{machine})\\ \text{ backward stable (LU, QR,...)} \quad || x_{backward-stable} - x || \leq O(\kappa(A) \epsilon_{machine}) $$

Now the estimate for the inverse can be improve, under some condition over the inverse, see theorem 1 in the paper, but $x_V$ can be conditionally accurate and not backward stable.

The paper show the cases when this happens ($V$ is the inverse)

(1) $V$ is not a good right inverse, or

(2) $V$ is such a poor left inverse that $||x_V||$ is much smaller than $||x||$, or

(3) the projection of $b$ on the left singular vectors of $A$ associated with small singular values is small.

So the opportunity to use or not the inverse depend by the application, may you can check the article an see if you case satisfies the condition to obtain the backward stability or if you don't need of it.

In general, in my opinion, is more safe solve the linear system.

Normally there are some principal reasons to prefer solve a linear system respect to use the inverse. Briefly:

  • problem with the conditional number (@GoHokies comment)
  • problem in the sparse case (@ChrisRackauckas answer)
  • efficiency (@Krill comment)

Anyway, as @ChristianClason remarked in comments, can be some cases where the use of the inverse is a good option.

In the note/article by Alex Druinsky, Sivan Toledo, How Accurate is inv(A)*b? there are some consideration about this problem.

According with the paper the principal reason for the general preference to use solve the linear system is inside these two estimates ($x$ is the true solution): $$ \text{inverse} \quad || x_V - x || \leq O(\kappa^2(A) \epsilon_{machine})\\ \text{ backward stable (LU, QR,...)} \quad || x_{backward-stable} - x || \leq O(\kappa(A) \epsilon_{machine}) $$

Now the estimate for the inverse can be improve, under some condition over the inverse, see theorem 1 in the paper, but $x_V$ can be conditionally accurate and not backward stable.

The paper show the cases when this happens ($V$ is the inverse)

(1) $V$ is not a good right inverse, or

(2) $V$ is such a poor left inverse that $||x_V||$ is much smaller than $||x||$, or

(3) the projection of $b$ on the left singular vectors of $A$ associated with small singular values is small.

So the opportunity to use or not the inverse depend by the application, may you can check the article an see if you case satisfies the condition to obtain the backward stability or if you don't need of it.

In general, in my opinion, is more safe solve the linear system.

Normally there are some principal reasons to prefer solve a linear system respect to use the inverse. Briefly:

  • problem with the conditional number (@GoHokies comment)
  • problem in the sparse case (@ChrisRackauckas answer)
  • efficiency (@Kirill comment)

Anyway, as @ChristianClason remarked in comments, can be some cases where the use of the inverse is a good option.

In the note/article by Alex Druinsky, Sivan Toledo, How Accurate is inv(A)*b? there are some consideration about this problem.

According with the paper the principal reason for the general preference to use solve the linear system is inside these two estimates ($x$ is the true solution): $$ \text{inverse} \quad || x_V - x || \leq O(\kappa^2(A) \epsilon_{machine})\\ \text{ backward stable (LU, QR,...)} \quad || x_{backward-stable} - x || \leq O(\kappa(A) \epsilon_{machine}) $$

Now the estimate for the inverse can be improve, under some condition over the inverse, see theorem 1 in the paper, but $x_V$ can be conditionally accurate and not backward stable.

The paper show the cases when this happens ($V$ is the inverse)

(1) $V$ is not a good right inverse, or

(2) $V$ is such a poor left inverse that $||x_V||$ is much smaller than $||x||$, or

(3) the projection of $b$ on the left singular vectors of $A$ associated with small singular values is small.

So the opportunity to use or not the inverse depend by the application, may you can check the article an see if you case satisfies the condition to obtain the backward stability or if you don't need of it.

In general, in my opinion, is more safe solve the linear system.

Source Link
Mauro Vanzetto
  • 1.3k
  • 1
  • 11
  • 21

Normally there are some principal reasons to prefer solve a linear system respect to use the inverse. Briefly:

  • problem with the conditional number (@GoHokies comment)
  • problem in the sparse case (@ChrisRackauckas answer)
  • efficiency (@Krill comment)

Anyway, as @ChristianClason remarked in comments, can be some cases where the use of the inverse is a good option.

In the note/article by Alex Druinsky, Sivan Toledo, How Accurate is inv(A)*b? there are some consideration about this problem.

According with the paper the principal reason for the general preference to use solve the linear system is inside these two estimates ($x$ is the true solution): $$ \text{inverse} \quad || x_V - x || \leq O(\kappa^2(A) \epsilon_{machine})\\ \text{ backward stable (LU, QR,...)} \quad || x_{backward-stable} - x || \leq O(\kappa(A) \epsilon_{machine}) $$

Now the estimate for the inverse can be improve, under some condition over the inverse, see theorem 1 in the paper, but $x_V$ can be conditionally accurate and not backward stable.

The paper show the cases when this happens ($V$ is the inverse)

(1) $V$ is not a good right inverse, or

(2) $V$ is such a poor left inverse that $||x_V||$ is much smaller than $||x||$, or

(3) the projection of $b$ on the left singular vectors of $A$ associated with small singular values is small.

So the opportunity to use or not the inverse depend by the application, may you can check the article an see if you case satisfies the condition to obtain the backward stability or if you don't need of it.

In general, in my opinion, is more safe solve the linear system.