Multiple Right-Hand Sides

Consider the case where a system of linear equations has more than one right-hand side vector. It is most economical to find the solution vectors by first factoring the coefficient matrix A into products of triangular matrices. Then, the resulting triangular systems of linear equations are solved for each right-hand side. When A is a general matrix, access to the LU factorization of A is computed by creating an instance of class imsl.linalg.LU and calling the imsl.linalg.LU.solve() method of this instance for the first time. The LU factorization is then saved internally, so that it can be re-used in further invocations of the imsl.linalg.LU.solve() method with different right-hand sides. The solution xk for the k-th right-hand side vector bk is found by two triangular solves, Lyk=bk and Uxk=yk.