https://www.johndcook.com/blog/2023/06/03/matrix-powers/ John D. Cook Skip to content * MATH + PROBABILITY + SIGNAL PROCESSING + NUMERICAL COMPUTING + SEE ALL ... * STATS + EXPERT TESTIMONY + FORECASTING + RNG TESTING + SEE ALL ... * PRIVACY + HIPAA + CRYPTOGRAPHY + DIFFERENTIAL PRIVACY * WRITING + BLOG + TWITTER + ARTICLES + TECH NOTES + SUBSCRIBE + NEWSLETTER * ABOUT + CLIENTS + ENDORSEMENTS + TEAM + SERVICES (832) 422-8646 Contact Powers of a 2x2 matrix in closed form Posted on 3 June 2023 by John Here's something I found surprising: the powers of a 2x2 matrix have a fairly simple closed form. Also, the derivation is only one page [1]. Let A be a 2x2 matrix with eigenvalues a and b. (3Blue1Brown made a nice jingle for finding the eigenvalues of a 2x2 matrix.) If a = b then the nth power of A is given by A^n = \alpha^{n-1}\left( nA - (n-1)\alpha I\right) If a [?] b then the nth power of A is given by A^n = \frac{\alpha^n}{\alpha - \beta} (A - \beta I) + \frac{\beta^n} {\beta-\alpha}(A - \alpha I) Example Let's do an example with A = \begin{bmatrix} 6 & 3 \\ 20 & 23 \end{bmatrix} The eigenvalues are 26 and 3. I chose the matrix entries based on today's date, not to have integer eigenvalues, and was surprised that they turned out so simple [2]. (More along those lines here.) Here's a little Python code to show that the formula above gives the same result as directly computing the cube of A. import numpy as np A = np.matrix([[6, 3], [20, 23]]) m = (6 + 23)/2 p = 6*23 - 3*20 a = m + (m**2 - p)**0.5 b = m - (m**2 - p)**0.5 print(a, b) I = np.eye(2) direct = A*A*A formula = a**3*(A - b*I)/(a - b) + b**3*(A - a*I)/(b - a) print(direct) print(formula) [1] Kenneth S. Williams. The nth Power of a 2x2 Matrix. Mathematics Magazine, Dec., 1992, Vol. 65, No. 5, p. 336. [2] I wrote a script to find out how often this happens, and it's more often than I would have guessed. There are 31 dates this year that would give integer eigenvalues if arranged as in the example. Categories : Math Tags : Linear algebra Bookmark the permalink Post navigation Previous PostProductive productivity Next PostSimilar triangles and complex numbers 2 thoughts on "Powers of a 2x2 matrix in closed form" 1. Michael Scharrer 11 June 2023 at 04:29 Interesting. It looks like the a[?]b version splits up the matrix A into two rank-1 matrices, each corresponding to an eigenvector. From then on it's simple to appropriately scale those rank-1 components. Is there a similar intuitive explanation for the a=b version? Also, both formulae seem to work with n=-1 to give the inverse of non-singular matrices. 2. Nick Craig-Wood 11 June 2023 at 10:43 Thank you for an interesting article. I just realized that you can use this result along with the 2x2 generator matrix for Fibonacci numbers [ 1 1 ] [ 1 0 ] to prove Binet's formula in a very straightforward way. The eigenvalues of that matrix are 1/2 (1 +/- sqrt(5)) so Binet's formula appears quite neatly. Leave a Reply Your email address will not be published. Required fields are marked * [ ] [ ] [ ] [ ] [ ] [ ] [ ] Comment * [ ] Name * [ ] Email * [ ] Website [ ] [Post Comment] [ ] [ ] [ ] [ ] [ ] [ ] [ ] D[ ] Search for: [ ] [Search] John D. Cook John D. Cook, PhD My colleagues and I have decades of consulting experience helping companies solve complex problems involving data privacy, math, statistics, and computing. Let's talk. We look forward to exploring the opportunity to help your company too. [ ] [ ] [ ] [ ] [ ] [Send] [ ] [ ] [ ] [ ] [ ] [ ] [ ] D[ ] John D. Cook (c) All rights reserved. Search for: [ ] [Search] (832) 422-8646 EMAIL