Numerical Algorithms

, Volume 34, Issue 1, pp 13–26

Computing the Matrix Cosine

  • Nicholas J. Higham
  • Matthew I. Smith

DOI: 10.1023/A:1026152731904

Cite this article as:
Higham, N.J. & Smith, M.I. Numerical Algorithms (2003) 34: 13. doi:10.1023/A:1026152731904


An algorithm is developed for computing the matrix cosine, building on a proposal of Serbin and Blalock. The algorithm scales the matrix by a power of 2 to make the ∞-norm less than or equal to 1, evaluates a Padé approximant, and then uses the double angle formula cos (2A)=2cos (A)2I to recover the cosine of the original matrix. In addition, argument reduction and balancing is used initially to decrease the norm. We give truncation and rounding error analyses to show that an [8,8] Padé approximant produces the cosine of the scaled matrix correct to machine accuracy in IEEE double precision arithmetic, and we show that this Padé approximant can be more efficiently evaluated than a corresponding Taylor series approximation. We also provide error analysis to bound the propagation of errors in the double angle recurrence. Numerical experiments show that our algorithm is competitive in accuracy with the Schur–Parlett method of Davies and Higham, which is designed for general matrix functions, and it is substantially less expensive than that method for matrices of ∞-norm of order 1. The dominant computational kernels in the algorithm are matrix multiplication and solution of a linear system with multiple right-hand sides, so the algorithm is well suited to modern computer architectures.

matrix function matrix cosine matrix exponential Taylor series Padé approximation double angle formula rounding error analysis Schur–Parlett method MATLAB 

Copyright information

© Kluwer Academic Publishers 2003

Authors and Affiliations

  • Nicholas J. Higham
    • 1
  • Matthew I. Smith
    • 1
  1. 1.Department of MathematicsUniversity of ManchesterManchester

Personalised recommendations