Re:Powers of a 2×2 matrix in closed form
by naillo on Sunday June 11, 2023 @10:38AM
(#36281832)
A less formula driven approach that I expected this to use is just eigenvalue decompose the matrix (with complex eigenvalues that always exists) then raise each eigenvalue to the power you want and then combine the eigenvectors and eigenvalues together again to get the Nth power. (Requires computing a matrix matrix product but only once and that could be expressed in closed form and it's overall a cheap operation vs actually multiplying the matrix by itself N times.)
Re:Powers of a 2×2 matrix in closed form
by xyzzyz on Sunday June 11, 2023 @12:05PM
(#36282626)
In practice, all matrices are diagonalizable, because the set of non-diagonalizable matrices is very small. Concretely, a random matrix is almost surely diagonalizable (ie. with probability 1).
Re:Powers of a 2×2 matrix in closed form
by FooBarBizBazz on Sunday June 11, 2023 @01:09PM
(#36283242)
This "with zero probability" statement hides that there's a probability distribution assumed. It's really saying that any matrix can be perturbed to be diagonalizable. Which is true. But matrices in that set have a way of showing up a lot in models that the human mind conceives. For example, if you model a point mass accelerating without drag, you will end up with a matrix that isn't diagonalizable. If all matrices were diagonalizable, every linear ODE would be solved by a bunch of exponentials and sinusoids; there'd be no polynomials. But we see things like "1/2 a t^2" all the time.
Re:Powers of a 2×2 matrix in closed form
by JadeNB on Sunday June 11, 2023 @12:35PM
(#36282864)
> It sounds like you're assuming diagonalizability, which is stronger than "eigen values defined over the field".
> Even over the complex numbers there are matrices that aren't diagonalizable, like [[2,1],[0,2]].
While that's completely true, and I'm glad someone said it, it's not much of an issue for 2×2 matrices. You can tell quickly when it's happened, because the characteristic polynomial is a square (itself easily tested by computing the gcd with the derivative … or just because it's easy to recognize when a quadratic is a perfect square) but the matrix isn't scalar; and then we have that the semisimple part S is scalar, the nilpotent part N satisfies N^2 = 0, and so (S + N)^n equals S^n + n S N^{n - 1} for n > 1.
Re:Powers of a 2×2 matrix in closed form
by JadeNB on Sunday June 11, 2023 @12:39PM
(#36282902)
> That would be less interesting, since it's the method taught in every first course of linear algebra, right?
But it would be interesting to mention that that's what this method is doing, just using that, in the distinct-eigenvalues case, A - \beta I maps onto the \alpha-eigenspace, so you can simply apply it instead of explicitly finding eigenvectors. (In fact, every time I teach linear algebra, one of my students discovers this trick, though usually accidentally thinking that they are finding \beta-eigenvectors, rather than \alpha-eigenvectors, by applying A - \beta I instead of computing its kernel.)
Re:Powers of a 2×2 matrix in closed form
by JadeNB on Sunday June 11, 2023 @12:37PM
(#36282882)
> A less formula driven approach that I expected this to use is just eigenvalue decompose the matrix (with complex eigenvalues that always exists) then raise each eigenvalue to the power you want and then combine the eigenvectors and eigenvalues together again to get the Nth power.
That's actually what's happening here for the distinct-eigenvalues case: (A - \beta I)/(\alpha - \beta) is the projection on the \alpha-eigenspace, where A^n acts by \alpha^n, with kernel the \beta-eigenspace; and similarly with \alpha and \beta switched. In general, pursuing this same line of attack underlies the proof that the semisimple part of A can be written as a polynomial in A. (Sadly, the polynomial itself depends on A, so this is probably more usefully stated as that the semisimple part of A lies in k[A] if k is perfect.)
Re:Powers of a 2×2 matrix in closed form
by nonenobody on Sunday June 11, 2023 @11:25AM
(#36282238)
I did not read the OP, but I imagine that Hamilton theorem for 2x2 matrix gives us a recurrent relation for computing A^n. For example A^2 = 2A+BI. So this seems to be a very trivial result or formula.
For example (1)
Another way is to obtain the remainder of dividing x^n by the characteristic polynomial of the matrix A.
Re:Powers of a 2×2 matrix in closed form
by yxhuvud on Sunday June 11, 2023 @01:24PM
(#36283375)
I must be missing something as this seems very basic.
Assume A = vEv^T , where E is a diagonal matrix of eigenvalues and v is the transformation from A to E. Then A^n = vEv^TvEv^T..vEv^T. vv^T equals the identity matrix and will cancel out. So A^n = vE^nv^T. The closed form in the article is then just inlining the computation of v and v^T to how they apply to alpha and beta.
Oh, and to understand what happens in the more complex case where not all eigenvalues are different, see Jordan Normal Form. That is less basic and not as well covered in the basic courses as the above is.
Even over the complex numbers there are matrices that aren't diagonalizable, like [[2,1],[0,2]].
> Even over the complex numbers there are matrices that aren't diagonalizable, like [[2,1],[0,2]].
While that's completely true, and I'm glad someone said it, it's not much of an issue for 2×2 matrices. You can tell quickly when it's happened, because the characteristic polynomial is a square (itself easily tested by computing the gcd with the derivative … or just because it's easy to recognize when a quadratic is a perfect square) but the matrix isn't scalar; and then we have that the semisimple part S is scalar, the nilpotent part N satisfies N^2 = 0, and so (S + N)^n equals S^n + n S N^{n - 1} for n > 1.
(All real symmetric, or more generally Hermitian matrices are diagonalizable, which is the Spectral Theorem.)
But it would be interesting to mention that that's what this method is doing, just using that, in the distinct-eigenvalues case, A - \beta I maps onto the \alpha-eigenspace, so you can simply apply it instead of explicitly finding eigenvectors. (In fact, every time I teach linear algebra, one of my students discovers this trick, though usually accidentally thinking that they are finding \beta-eigenvectors, rather than \alpha-eigenvectors, by applying A - \beta I instead of computing its kernel.)
That's actually what's happening here for the distinct-eigenvalues case: (A - \beta I)/(\alpha - \beta) is the projection on the \alpha-eigenspace, where A^n acts by \alpha^n, with kernel the \beta-eigenspace; and similarly with \alpha and \beta switched. In general, pursuing this same line of attack underlies the proof that the semisimple part of A can be written as a polynomial in A. (Sadly, the polynomial itself depends on A, so this is probably more usefully stated as that the semisimple part of A lies in k[A] if k is perfect.)
For example (1) Another way is to obtain the remainder of dividing x^n by the characteristic polynomial of the matrix A.
(1) https://dl.acm.org/doi/10.1145/355769.355772
there are many ways to do it
Assume A = vEv^T , where E is a diagonal matrix of eigenvalues and v is the transformation from A to E. Then A^n = vEv^TvEv^T..vEv^T. vv^T equals the identity matrix and will cancel out. So A^n = vE^nv^T. The closed form in the article is then just inlining the computation of v and v^T to how they apply to alpha and beta.
Oh, and to understand what happens in the more complex case where not all eigenvalues are different, see Jordan Normal Form. That is less basic and not as well covered in the basic courses as the above is.
[0] https://en.wikipedia.org/wiki/Sylvester%27s_formula
Function in a matrix of A can be expressed in products of A with its eigenvalues.