2
$\begingroup$

I have as input values the matrices $A,B\in\mathbb{R}^{n\times n}$, where $B$ is invertible, vector $\vec{b}\in\mathbb{R}^n$, and $\alpha\in\mathbb{R}$. Denoting the identity matrix by $I_d$, I am computing the value of

$$(\alpha A+I_d)(A+B^{-1})\vec{b}.$$

However, as computing the value of $B^{-1}$ is quite expensive, I wish to instead solve a system of linear equations. Letting $\vec{x}:=(\alpha A+I_d)(A+B^{-1})\vec{b}$, I tried

$$\vec{x}=(\alpha A+I_d)B^{-1}B(A+B^{-1})\vec{b}=(\alpha AB^{-1}+B^{-1})(BA+I_d)\vec{b}.$$

Then, multiplying by $B$ on the left for both sides I obtain

$$B\vec{x}=(3BAB^{-1}+I_d)(BA+I_d)\vec{b}.$$

However, I cannot figure out a way to remove this troublesome $B^{-1}$. Is there any way to do so, or am I stuck computing this inverse?

2 Answers 2

4

If you want to avoid computing $B^{-1}$, you can just compute $B^{-1}\vec b$ separately:

  1. Compute $B^{-1}\vec b$ by solving system of linear equations given by matrix $B$ with RHS $\vec b$.
  2. Compute $A\vec b$.
  3. Add 1.+2. You get $(A+B^{-1})\vec b$.
  4. Multiply 3. by $(\alpha A+I_d)$. You get $(\alpha A+I_d)(A+B^{-1})\vec b$.
1

A year late, but here is another solution (copied from a cornell '04 homework assignment):

Manipulate the given equation as follow:

$$ x = B^{-1} (2A + I)(C^{-1} + A)b $$ $$ Bx = (2A + I)C^{-1}b + (2A + I)Ab $$ To compute y ≡ C^-1b, solve Cy = b for y. The right-hand-side of the above equation is now known so can use GEPP to solve for x (i.e, now we don't need to calculate matrix inverse).