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 \(x_k\) for the k-th right-hand side vector \(b_k\) is found by two triangular solves, \(Ly_k = b_k\) and \(Ux_k = y_k\).