Raising a matrix to a high power quickly
Question
What is an efficient way to compute for a square matrix and large integer ?
Short answer
Repeated squaring: about matrix multiplications. Write in binary, square repeatedly and multiply into the result whenever the current bit is ; each multiply costs for a matrix. Alternatively, if is diagonalisable, needs only scalar powers.
Adapted from Joshi, Denson & Downes, Quant Job Interview Questions and Answers, Q5.6, p.158; question and answer rewritten by SelfMadeQuant.com.
See the hint and the full worked solution in the question bank (free account).
Open the worked solution