A NOTE ON THE EVALUATION OF MATRIX POLYNOMIALS by Charles Van Loan Department of Computer Science Cornell University Ithaca, New York 14853 TR78--H353 A NOTE ON THE EVALUATION OF NATRIX POLYNONIALS Charles Van Loan Abstract: The problem of evaluating a polynomial p(x) in a matrix A arises in many applications, e.g. the Taylor approximation of e . O(? n3) A The algorithm of Paterson and Stoc?meyer has the drawbac? that it requires O( ? n2) storage, where q is the degree of p and n is the dimension of A. An algorithm which greatly reduces this storage requirement without undue loss of speed is presented. Author?s Current Address: Department of Computer science Cornoll Univorsity Ithaca, Now York l4?53 A NOTE ON THE EVALUATION OF NATRIX POLYNOMIALS Charles Van Loan One method for evaluating the matrix pelynomial p(A) = b01 + b1A + ... + b q is to use Homer's rule: R , A RflXfl - 1 = bql For k = 1,2g 5k = ASk?l + bg?kI whereupon 5 =?p(A). Ignoring low order terms in n, this algorithm re- q quires 2n2 storage and (q-l)n3 multiplications. In an interesting paper by Paterson and Stockmeyer 21 , it is shown how this computation can be rearranged so that only O[?q n31 multiplications are needed. The main idea behind their algorithm is to apply Homer's rule to p(A) regarded as a polynomial in AS where a . For exanple, if q = 9 , then p(A) = (b9I) (A33 + (b8A2+ b7A + b6I) (A32 + 2 + + (A3) + (b2A2 + b1A + b0I) (b5A b4A b3I) Onco A2 and A3 aro computod, then only 2n3 multiplications are 2- required to evaluate p(A) an evidenced by the followin(j "l?rner regrouping" p(A) = A3 A3[ b9A3 + (b8A2 + b7A + b61)] + (b5A2 + b4A + b31)] + (b2A + b1A + b01) 3 Hence, by this technique, only 4n nultiplications are required- to evaluate p(A). This is in contrast to the count of Sn3 as- sociated with the "ordinary" application of Homer's rule. In general, if 5 is any integer satisfying l