Can I solve a system of massive linear equations faster if I know the solution to a system with the same matrix $A$.

72 Views Asked by At

Given the vector $x$ which is the solution to the linear equations $Ax=b$, i.e. $x=A^{-1}b$, can we solve the linear equations $Ay=c$ with the given $x$ so that we don't need to repeat the tedious process for calculating $x$ from $Ax=b$.

In other words, can we express $y$ as a function of $x$, $y=f(x, A, b, c)$. Note that $A^{-1}$ can't appear in the function.

1

There are 1 best solutions below

0
On

It all depends on how you solved it.

Let's say one uses an LU factorization (with pivoting) to solve A x = b. This means one computes permutation matrix $ P $, unit lower triangular matrix $ L $, and upper triangular matrix $ U $ so that $ P A = LU $. Then, one solves $ L z = P b $ followed by $ U x = z $ to find the solution $ x $. Now, since you have already computed $ P $, $ L $, and $ U$, you don't have to recompute them when a new right-hand side comes along. And the bulk of the computation is in computing the LU factorization.