Matrix Powers: Methods and Practical Techniques | 矩阵幂运算:方法与实用技巧

📚 Matrix Powers: Methods and Practical Techniques | 矩阵幂运算:方法与实用技巧

Computing powers of a matrix, denoted Aⁿ, is a fundamental skill in linear algebra with applications ranging from Markov chains to population dynamics and graph theory. This article explores the most effective methods for evaluating matrix powers, from direct computation to elegant theoretical approaches.

计算矩阵的幂(记为 Aⁿ)是线性代数中的一项基本技能,其应用涵盖马尔可夫链、种群动力学和图论等多个领域。本文将探讨计算矩阵幂的最有效方法,从直接计算到优雅的理论方法。


1. Why Matrix Powers Matter | 为什么矩阵幂很重要

Consider a simple example: a population of rabbits that doubles each year. If the transition is described by a matrix A, then after n years, the population is given by Aⁿx₀, where x₀ is the initial state. Computing Aⁿ efficiently allows us to predict the far future without multiplying step by step.

考虑一个简单的例子:一个每年翻倍的兔子种群。如果转变过程用矩阵 A 描述,那么 n 年后种群数量为 Aⁿx₀,其中 x₀ 是初始状态。高效地计算 Aⁿ 使我们无需逐步相乘即可预测远期结果。

Similarly, in graph theory, the (i, j) entry of Aⁿ (where A is the adjacency matrix) gives the number of paths of length n from vertex i to vertex j. In Markov chains, Aⁿ describes the n-step transition probabilities. These applications demand efficient computation methods.

类似地,在图论中,Aⁿ 的 (i, j) 元素(A 为邻接矩阵)给出从顶点 i 到顶点 j 长度为 n 的路径数量。在马尔可夫链中,Aⁿ 描述 n 步转移概率。这些应用都需要高效的矩阵幂计算方法。


2. The Definition and First Principles | 定义与基本原理

For a square matrix A and a positive integer n, we define Aⁿ = A × A × … × A (n times), with A⁰ = I (the identity matrix). For a 2 × 2 matrix, we can verify that the standard laws of exponents hold: AᵐAⁿ = Aᵐ⁺ⁿ and (Aᵐ)ⁿ = Aᵐⁿ.

对于方阵 A 和正整数 n,我们定义 Aⁿ = A × A × … × A(共 n 次),并规定 A⁰ = I(单位矩阵)。对于 2 × 2 矩阵,我们可以验证标准指数法则成立:AᵐAⁿ = Aᵐ⁺ⁿ 以及 (Aᵐ)ⁿ = Aᵐⁿ。

The naive approach of repeated multiplication is impractical for large n. Even for modest sizes like 3 × 3 matrices and n = 100, direct multiplication involves 99 matrix products — each requiring 27 multiplications and 18 additions. We need smarter strategies.

直接重复相乘的方法对于大的 n 来说不切实际。即使是 3 × 3 矩阵和 n = 100 这样适中的规模,直接相乘也需要 99 次矩阵乘法——每次涉及 27 次乘法和 18 次加法。我们需要更聪明的策略。


3. Method Comparison Overview | 方法对比总览

Before diving into each method, let us summarise the key strategies with a comparison table. This will help you decide which approach suits a given problem.

在深入每种方法之前,让我们用对比表格总结关键策略,以帮助您判断哪种方法适合给定的问题。

Method Best for Key Requirement
Binary Exponentiation Numerical computation Only needs multiplication
Diagonalisation n is symbolic or large n distinct eigenvalues
Cayley-Hamilton 2 × 2 or 3 × 3 matrices Known characteristic polynomial
Binomial Expansion A = I + N (N nilpotent) Nⁿ = 0 for small n
Jordan Form Non-diagonalisable matrices Generalised eigenvectors

In this table, “symbolic n” means the power is an algebraic variable rather than a fixed number. The choice of method significantly affects computational effort and insight.

表中”符号 n”表示幂是一个代数变量而非固定数值。方法的选择显著影响计算工作量和洞见深度。


4. Direct Computation for Small n | 小 n 的直接计算

For small values of n (say n = 2, 3, or 4), simply multiplying the matrix by itself is often the fastest and most reliable approach. This is especially true in exam settings where n is small and the matrix entries are simple integers.

对于较小的 n(如 n = 2、3 或 4),直接将矩阵自乘往往是最快最可靠的方法。在考试中当 n 较小且矩阵元素为简单整数时尤其如此。

For example, let A = [[2, 1], [0, 3]]. Then A² = [[2, 1], [0, 3]] × [[2, 1], [0, 3]] = [[4, 5], [0, 9]]. The key is to be systematic: compute each entry carefully, row by column, and verify your result.

例如,令 A = [[2, 1], [0, 3]]。则 A² = [[2, 1], [0, 3]] × [[2, 1], [0, 3]] = [[4, 5], [0, 9]]。关键在于系统化:逐行逐列仔细计算每个元素,并核验结果。

One useful check is that for triangular matrices, the diagonal entries of Aⁿ are simply the nth powers of the diagonal entries of A. This follows from induction and can catch many careless errors.

一个有用的检验是:对于三角矩阵,Aⁿ 的对角线元素就是 A 对角线元素的 n 次幂。这可以通过归纳法证明,并且能发现许多粗心错误。


5. Binary Exponentiation: The Divide-and-Conquer Method | 二进制幂法:分治策略

For numerical computation where n is very large (say n = 10⁹), binary exponentiation reduces the number of matrix multiplications from n − 1 to about log₂(n). The idea is to repeatedly square the matrix and combine results based on the binary representation of n.

对于 n 非常大(如 n = 10⁹)的数值计算,二进制幂法将矩阵乘法次数从 n − 1 次减少到约 log₂(n) 次。其思想是重复对矩阵平方,并根据 n 的二进制表示组合结果。

Suppose n = 13. In binary, 13 = 1101₂ = 8 + 4 + 1. Therefore, A¹³ = A⁸ × A⁴ × A¹. We compute A², A⁴, and A⁸ by successive squaring:

假设 n = 13。在二进制中,13 = 1101₂ = 8 + 4 + 1。因此 A¹³ = A⁸ × A⁴ × A¹。我们通过连续平方计算 A²、A⁴ 和 A⁸:

A² = A × A, A⁴ = A² × A², A⁸ = A⁴ × A⁴

Then A¹³ = A⁸ × A⁴ × A. This requires only 5 multiplications (3 squarings + 2 extra) instead of 12. This algorithm is easy to implement in code and is the backbone of modern computational linear algebra libraries.

然后 A¹³ = A⁸ × A⁴ × A。这只需要 5 次乘法(3 次平方加 2 次额外乘法),而非 12 次。该算法易于用代码实现,是现代计算线性代数库的骨干。


6. Diagonalisation: The Standard Approach | 对角化:标准方法

If a matrix A is diagonalisable, we can write A = P D P⁻¹, where D is a diagonal matrix of eigenvalues and P is a matrix of corresponding eigenvectors. Then Aⁿ = P Dⁿ P⁻¹, and Dⁿ is simply computed by raising each diagonal entry to the nth power.

如果矩阵 A 可对角化,我们可以写成 A = P D P⁻¹,其中 D 是特征值构成的对角矩阵,P 是对应特征向量构成的矩阵。则 Aⁿ = P Dⁿ P⁻¹,而 Dⁿ 只需将每个对角元素升至 n 次幂即可。

Let us illustrate with A = [[2, 1], [0, 3]]. The eigenvalues are λ₁ = 2 and λ₂ = 3, with eigenvectors v₁ = [1, 0]ᵀ and v₂ = [1, 1]ᵀ. Thus P = [[1, 1], [0, 1]] and D = diag(2, 3). We compute:

让我们用 A = [[2, 1], [0, 3]] 来说明。特征值为 λ₁ = 2 和 λ₂ = 3,对应特征向量 v₁ = [1, 0]ᵀ 和 v₂ = [1, 1]ᵀ。因此 P = [[1, 1], [0, 1]],D = diag(2, 3)。我们计算:

Aⁿ = P Dⁿ P⁻¹ = [[1, 1], [0, 1]] × [[2ⁿ, 0], [0, 3ⁿ]] × [[1, −1], [0, 1]]

Multiplying gives Aⁿ = [[2ⁿ, 3ⁿ − 2ⁿ], [0, 3ⁿ]]. This closed-form expression is valid for all n ≥ 0, making it far more powerful than computing A⁵⁰ by hand.

相乘得到 Aⁿ = [[2ⁿ, 3ⁿ − 2ⁿ], [0, 3ⁿ]]。这个闭合表达式对所有 n ≥ 0 有效,远比手工计算 A⁵⁰ 强大。


7. The Cayley-Hamilton Theorem Approach | 凯莱-哈密顿定理方法

The Cayley-Hamilton theorem states that every square matrix satisfies its own characteristic equation. For a 2 × 2 matrix A with characteristic equation λ² − (trace)λ + (determinant) = 0, we have A² = (trace)A − (determinant)I.

凯莱-哈密顿定理指出:每个方阵都满足自身的特征方程。对于 2 × 2 矩阵 A,其特征方程为 λ² − (迹)λ + (行列式) = 0,因此有 A² = (迹)A − (行列式)I。

This gives a powerful recurrence: Aⁿ = c₁A + c₀I for n ≥ 2, where the coefficients can be found by solving a linear recurrence. For A = [[2, 1], [0, 3]], the characteristic equation is λ² − 5λ + 6 = 0, so A² = 5A − 6I.

这给出了一个强大的递推关系:对于 n ≥ 2,Aⁿ = c₁A + c₀I,其中系数可通过求解线性递推关系得到。对于 A = [[2, 1], [0, 3]],特征方程为 λ² − 5λ + 6 = 0,因此 A² = 5A − 6I。

Assume Aⁿ = aₙA + bₙI. Since A satisfies λ² = 5λ − 6, the eigenvalues also satisfy λₖⁿ = aₙλₖ + bₙ. Substituting λ = 2 and λ = 3 gives two equations:

假设 Aⁿ = aₙA + bₙI。由于 A 满足 λ² = 5λ − 6,特征值也满足 λₖⁿ = aₙλₖ + bₙ。代入 λ = 2 和 λ = 3 得到两个方程:

2ⁿ = 2aₙ + bₙ, 3ⁿ = 3aₙ + bₙ ⇒ aₙ = 3ⁿ − 2ⁿ, bₙ = 3·2ⁿ − 2·3ⁿ

Therefore Aⁿ = (3ⁿ − 2ⁿ)A + (3·2ⁿ − 2·3ⁿ)I, which agrees with the diagonalisation result after expansion. This method often requires less computation than finding eigenvectors.

因此 Aⁿ = (3ⁿ − 2ⁿ)A + (3·2ⁿ − 2·3ⁿ)I,展开后与对角化结果一致。此方法通常比求特征向量计算量更小。


8. Binomial Expansion for I + N Form | I + N 形式的二项式展开

When a matrix can be written as A = I + N, where N is a nilpotent matrix (Nᵏ = 0 for some positive integer k), the binomial theorem provides an elegant solution. Since I and N commute, we have:

当一个矩阵可以写成 A = I + N 的形式,其中 N 是幂零矩阵(对某个正整数 k 有 Nᵏ = 0),二项式定理提供了优雅的解法。由于 I 和 N 可交换,我们有:

Aⁿ = (I + N)ⁿ = Σₖ₌₀ⁿ C(n, k) Nᵏ = I + nN + [n(n−1)/2]N² + …

All terms beyond Nᵏ⁻¹ vanish, so the series terminates. For example, if N² = 0, then Aⁿ = I + nN exactly. Consider A = [[1, 2], [0, 1]] = I + N, where N = [[0, 2], [0, 0]] and N² = 0. Hence Aⁿ = [[1, 2n], [0, 1]].

所有超过 Nᵏ⁻¹ 的项都为零,因此级数终止。例如,如果 N² = 0,则 Aⁿ = I + nN 精确成立。考虑 A = [[1, 2], [0, 1]] = I + N,其中 N = [[0, 2], [0, 0]] 且 N² = 0。因此 Aⁿ = [[1, 2n], [0, 1]]。

This method extends naturally to Jordan blocks and is particularly valuable when the power n is a symbolic variable. The binomial coefficients provide the pattern for entries that grow polynomially in n.

此方法自然推广到 Jordan 块,并且当幂 n 为符号变量时特别有价值。二项式系数提供了随 n 呈多项式增长的元素的模式。


9. The Minimal Polynomial Approach | 最小多项式方法

The minimal polynomial of A is the monic polynomial of least degree that annihilates A. While the Cayley-Hamilton approach uses the characteristic polynomial (degree equal to matrix size), the minimal polynomial often has smaller degree, reducing the algebra substantially.

矩阵 A 的最小多项式是湮灭 A 的首一多项式中最小的次数。凯莱-哈密顿方法使用特征多项式(次数等于矩阵阶数),而最小多项式通常次数更小,能大幅简化代数运算。

For a diagonalisable matrix with eigenvalues λ₁, …, λₖ, the minimal polynomial is m(λ) = (λ − λ₁)(λ − λ₂)…(λ − λₖ). For example, if A has eigenvalues 2, 2, and 3, the minimal polynomial might be (λ − 2)(λ − 3) rather than (λ − 2)²(λ − 3).

对于特征值为 λ₁, …, λₖ 的可对角化矩阵,最小多项式为 m(λ) = (λ − λ₁)(λ − λ₂)…(λ − λₖ)。例如,若 A 的特征值为 2、2、3,最小多项式可能是 (λ − 2)(λ − 3),而非 (λ − 2)²(λ − 3)。

Using the minimal polynomial, we can express A² as a linear combination of A and I with fewer terms (or even A alone if the minimal polynomial is linear). This reduces the recurrence system to a smaller size:

利用最小多项式,我们可以将 A² 表示为 A 和 I 的线性组合,且项数更少(如果最小多项式是一次式,甚至只需 A 本身)。这可以将递推系统降至更小规模:

A² = (λ₁ + λ₂)A − λ₁λ₂I (if minimal polynomial is quadratic)

In general, if the minimal polynomial has degree m, then any power Aⁿ (n ≥ m) can be expressed as a linear combination of I, A, …, Aᵐ⁻¹. This insight is especially useful for 3 × 3 matrices with repeated eigenvalues.

一般地,如果最小多项式次数为 m,那么任意幂 Aⁿ(n ≥ m)可以表示为 I, A, …, Aᵐ⁻¹ 的线性组合。这一洞见对于具有重复特征值的 3 × 3 矩阵尤其有用。


10. Jordan Normal Form for Non-Diagonalisable Matrices | 不可对角化矩阵的 Jordan 标准形

When a matrix lacks a full set of eigenvectors, it cannot be diagonalised. The Jordan normal form provides a canonical representation A = P J P⁻¹ where J is block diagonal with Jordan blocks, each of the form λI + N.

当矩阵缺少完整的特征向量集时,它无法对角化。Jordan 标准形提供了规范表示 A = P J P⁻¹,其中 J 是 Jordan 块构成的分块对角矩阵,每个 Jordan 块形如 λI + N。

For a Jordan block Jₖ(λ) of size k, we use the binomial expansion from Section 8:

对于大小为 k 的 Jordan 块 Jₖ(λ),我们使用第 8 节的二项式展开:

[Jₖ(λ)]ⁿ = λⁿ I + nλⁿ⁻¹ N + C(n,2)λⁿ⁻² N² + …

The nilpotent part N has 1s on the superdiagonal, and since Nᵏ = 0, the sum terminates after k terms. For a 2 × 2 Jordan block, this gives explicitly:

幂零部分 N 的超对角线上为 1,且由于 Nᵏ = 0,求和在 k 项后终止。对于 2 × 2 Jordan 块,显式给出:

[[λ, 1], [0, λ]]ⁿ = [[λⁿ, nλⁿ⁻¹], [0, λⁿ]]

For example, A = [[2, 1], [0, 2]] has a repeated eigenvalue λ = 2. Then Aⁿ = [[2ⁿ, n·2ⁿ⁻¹], [0, 2ⁿ]]. The entry n·2ⁿ⁻¹ shows polynomial growth modulated by exponential growth.

例如,A = [[2, 1], [0, 2]] 有重复特征值 λ = 2。则 Aⁿ = [[2ⁿ, n·2ⁿ⁻¹], [0, 2ⁿ]]。元素 n·2ⁿ⁻¹ 显示了由指数增长调制的多项式增长。


11. Block Diagonal and Special Structures | 分块对角与特殊结构

If A is block diagonal: A = diag(A₁, A₂, …, Aₖ), then Aⁿ = diag(A₁ⁿ, A₂ⁿ, …, Aₖⁿ). This decomposition reduces a large problem into smaller independent ones. Similarly, if A is a companion matrix or has rank-one structure, special formulas apply.

如果 A 是分块对角矩阵:A = diag(A₁, A₂, …, Aₖ),则 Aⁿ = diag(A₁ⁿ, A₂ⁿ, …, Aₖⁿ)。这种分解将大问题化为若干独立的小问题。类似地,如果 A 是友矩阵或具有秩一结构,也有特殊公式适用。

For a rank-one matrix A = uvᵀ, note that A² = (vᵀu)A = cA where c = vᵀu is a scalar. By induction, Aⁿ = cⁿ⁻¹A for n ≥ 1. This simple formula is surprisingly powerful in modelling growth processes.

对于秩一矩阵 A = uvᵀ,注意到 A² = (vᵀu)A = cA,其中 c = vᵀu 是标量。通过归纳,Aⁿ = cⁿ⁻¹A(n ≥ 1)。这个简单公式在建模增长过程中出奇地强大。

More generally, if A is idempotent (A² = A), then Aⁿ = A for all n ≥ 1. If A is involutory (A² = I), then Aⁿ alternates between I and A depending on parity. Recognising these structures can save significant computation time.

更一般地,如果 A 是幂等的(A² = A),则对所有 n ≥ 1 有 Aⁿ = A。如果 A 是对合的(A² = I),则 Aⁿ 根据奇偶性在 I 和 A 之间交替。识别这些结构可以节省大量计算时间。


12. Practical Tips and Common Pitfalls | 实用技巧与常见陷阱

First, always check whether A is diagonalisable before attempting diagonalisation. Compute the eigenvalues first: if they are all distinct, diagonalisation is guaranteed. If repeated eigenvalues occur, investigate the geometric multiplicity.

首先,在尝试对角化之前,务必检查 A 是否可对角化。先计算特征值:如果全部互异,则对角化有保证。如果出现重特征值,需考察几何重数。

Second, when using the Cayley-Hamilton method, verify the direction of the recurrence. Many students misapply the theorem by using A² = (det)A − (trace)A instead of the correct order. Always derive from the characteristic equation: λ² − (trace)λ + det = 0.

其次,使用凯莱-哈密顿方法时,务必核验递推方向。许多学生误用定理,写成 A² = (行列式)A − (迹)A 而非正确顺序。始终从特征方程推导:λ² − (迹)λ + 行列式 = 0。

Third, when using binary exponentiation in handwritten work, keep the intermediate matrices neatly labelled. Computational errors in matrix multiplication are the most frequent source of mistakes. Double-check each product using the row-column rule.

第三,在手算中使用二进制幂法时,请清晰标注中间矩阵。矩阵乘法中的计算错误是失误最常见的来源。用行列规则仔细复核每个乘积。

Finally, remember the special cases: nilpotent matrices (Aᵏ = 0 for some k) have Aⁿ = 0 for n ≥ k; projection matrices satisfy A² = A; and rotation matrices have powers expressible via trigonometric identities. Recognising these patterns is the quickest path to the answer.

最后,记住特殊情况:幂零矩阵(对某个 k 有 Aᵏ = 0)满足 n ≥ k 时 Aⁿ = 0;投影矩阵满足 A² = A;旋转矩阵的幂可以通过三角恒等式表达。识别这些模式是通往答案的最快路径。


Published by TutorHao | Mathematics Revision Series | aleveler.com

更多咨询请联系16621398022(同微信)

Comments

屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from aleveler.com

Subscribe now to keep reading and get access to the full archive.

Continue reading