Diagonalisation, Cayley-Hamilton, LU Solution, De Moivre's Theorem and Analytic Functions

This chapter belongs to Section XE0 (Engineering Mathematics) of the Engineering Sciences (XE) paper, the 15-mark part common to every candidate. It fills the gaps the shared chapters leave in XE0.1, XE0.4 and XE0.8: “Eigenvalues and eigen vectors of matrices; Properties of eigenvalues and eigen vectors of symmetric matrices, diagonalization of matrices; Cayley-Hamilton Theorem”, “De Moivre's theorem; Definition and examples of Analytic functions; Cauchy-Riemann equations” and “Solution of systems of linear equations using LU decomposition, Gauss elimination method.” The shared chapters give the eigenvalue shortcuts, rank, the criterion for diagonalisability and the Cauchy-Riemann equations in Cartesian form. Here you carry out diagonalisation and use it for powers of a matrix, see why symmetric matrices diagonalise orthogonally, use Cayley-Hamilton for inverses and high powers, solve a 3 × 3 system by LU and by elimination, compute powers and roots with De Moivre's theorem and test elementary functions for analyticity including the polar Cauchy-Riemann equations. The numericals are a matrix power, a Fibonacci matrix power, an LU solution and a power of a complex number.

1. Diagonalisation and powers of a matrix

An n × n matrix A is diagonalisable if there is an invertible P with P⁻¹AP = D diagonal. This happens exactly when A has n linearly independent eigenvectors; then the columns of P are those eigenvectors and the diagonal of D holds the matching eigenvalues, in the same order. Distinct eigenvalues guarantee diagonalisability; a repeated eigenvalue needs as many independent eigenvectors as its multiplicity.

Worked. A = [[4, 1], [2, 3]]. det(A − λI) = λ² − 7λ + 10 = (λ − 5)(λ − 2), so λ = 5, 2. For λ = 5, (A − 5I)v = 0 gives −x + y = 0, v = (1, 1). For λ = 2, 2x + y = 0, v = (1, −2). So P = [[1, 1], [1, −2]], D = diag(5, 2). Then Aᵏ = P Dᵏ P⁻¹, and A⁵ = [[2094, 1031], [2062, 1063]]. The eigenvalues of Aᵏ are λᵏ, with the same eigenvectors, so tr(A⁶) = 5⁶ + 2⁶ = 15689. Check: tr(A) = 7 = 5 + 2 and det A = 10 = 5 × 2.

⚠️ Repeated eigenvalue does not mean non-diagonalisable
The identity matrix has the repeated eigenvalue 1 and is already diagonal; [[3, 1], [0, 3]] has the same repeated eigenvalue 3 but only one independent eigenvector, so it is not diagonalisable. The test is the count of independent eigenvectors, not the repetition. Also, P must have its columns in the same order as the eigenvalues in D.

2. Symmetric matrices

For a real symmetric matrix (A = Aᵀ):
(i) all eigenvalues are real;
(ii) eigenvectors belonging to distinct eigenvalues are orthogonal;
(iii) A is always diagonalisable, even with repeated eigenvalues, and an orthonormal set of n eigenvectors can be chosen. Collecting these as the columns of Q gives QᵀAQ = D with Q⁻¹ = Qᵀ. Proof of (ii): if Av = λv and Aw = μw then λ vᵀw = (Av)ᵀw = vᵀAw = μ vᵀw, so (λ − μ) vᵀw = 0 and vᵀw = 0 whenever λ ≠ μ.

Worked. S = [[2, 1], [1, 2]]: λ = 3 with v = (1, 1)/√2, and λ = 1 with v = (1, −1)/√2. These are orthogonal, and Q = (1/√2)[[1, 1], [1, −1]] has QᵀSQ = diag(3, 1). A non-symmetric matrix such as [[4, 1], [2, 3]] has eigenvectors (1, 1) and (1, −2) whose dot product is −1 ≠ 0, so the orthogonality result needs symmetry. A skew-symmetric real matrix has purely imaginary (or zero) eigenvalues; an orthogonal matrix has eigenvalues of modulus 1.

3. Cayley-Hamilton theorem

Every square matrix satisfies its own characteristic equation. If p(λ) = det(A − λI) = (−1)ⁿ(λⁿ + c₁λⁿ⁻¹ + … + cₙ), then Aⁿ + c₁Aⁿ⁻¹ + … + cₙI = 0 (the constant term is cₙ = (−1)ⁿ det A). Two uses:
(i) a high power Aᵏ is reduced to a polynomial of degree n − 1 in A;
(ii) the inverse: if cₙ ≠ 0, multiply by A⁻¹ to get A⁻¹ = −(Aⁿ⁻¹ + c₁Aⁿ⁻² + … + cₙ₋₁I)/cₙ.

Worked 1 (inverse). A = [[2, 1], [1, 3]]: λ² − 5λ + 5 = 0, so A² − 5A + 5I = 0 and A⁻¹ = (5I − A)/5 = (1/5)[[3, −1], [−1, 2]]. Verify: A·(5I − A) = [[5, 0], [0, 5]]. Worked 2 (3 × 3). A = [[2, 1, 0], [0, 2, 1], [0, 0, 3]] has eigenvalues 2, 2, 3 (triangular), characteristic equation (λ − 2)²(λ − 3) = λ³ − 7λ² + 16λ − 12 = 0, so A³ = 7A² − 16A + 12I, and A⁻¹ = (A² − 7A + 16I)/12. Its (3, 3) entry is (9 − 21 + 16)/12 = 1/3, as it should be (1/3 is the reciprocal of the last diagonal entry).

High power by Cayley-Hamilton. For F = [[1, 1], [1, 0]]: λ² = λ + 1, so F² = F + I. Repeatedly, Fⁿ = FₙF + Fₙ₋₁I where Fₙ are the Fibonacci numbers (F₁ = F₂ = 1). So F¹⁰ = 55F + 34I = [[89, 55], [55, 34]], and its top-left entry is 89. Squaring ten times by hand would take far longer.

⚠️ The theorem does not give A⁻¹ when det A = 0
If the constant term of the characteristic polynomial is zero, A is singular and the division by cₙ fails. Also, replacing λ by A in det(A − λI) gives det(A − A) = 0, which is meaningless: substitute into the polynomial, not into the determinant.

4. Gauss elimination and LU decomposition

Gauss elimination reduces Ax = b to an upper triangular system by subtracting multiples mᵢⱼ = (entry)/(pivot) of the pivot row; back-substitution then gives x. LU decomposition stores those multipliers: A = LU with L unit lower triangular (the multipliers below the diagonal) and U the final upper triangular matrix. To solve Ax = b: forward substitution Ly = b, then back substitution Ux = y. det A = product of the pivots (the diagonal of U), and the same L, U serve every new right-hand side.

Worked. A = [[2, 1, 1], [4, 3, 3], [8, 7, 9]], b = (6, 14, 36). Eliminate: m₂₁ = 2, m₃₁ = 4; after the first step the second and third rows are (0, 1, 1) and (0, 3, 5); m₃₂ = 3 gives (0, 0, 2). So L = [[1, 0, 0], [2, 1, 0], [4, 3, 1]], U = [[2, 1, 1], [0, 1, 1], [0, 0, 2]], and det A = 2 × 1 × 2 = 4. Forward: y₁ = 6, y₂ = 14 − 2(6) = 2, y₃ = 36 − 4(6) − 3(2) = 6. Backward: z = 6/2 = 3, y = 2 − 3 = −1, x = (6 + 1 − 3)/2 = 2. The solution is (x, y, z) = (2, −1, 3), and substitution into the original three equations returns 6, 14, 36.

⚠️ Multipliers go in L with their sign
If row 2 is replaced by row 2 − 2 × row 1, then L₂₁ = +2 (the multiplier used), not −2. A zero pivot needs a row exchange, and then A = PᵀLU with a permutation P. In the intermediate y, never use x values; y is the solution of the lower system only.

5. De Moivre's theorem: powers and roots

In polar form z = r(cos θ + i sin θ) = re^(iθ). De Moivre's theorem: (cos θ + i sin θ)ⁿ = cos nθ + i sin nθ, so zⁿ = rⁿ(cos nθ + i sin nθ). The n-th roots of z = re^(iθ) are w_k = r^(1/n) e^(i(θ + 2πk)/n), k = 0, 1, …, n − 1: n values equally spaced on a circle of radius r^(1/n), and for n ≥ 2 they sum to zero.

Worked. (i) √3 + i = 2e^(iπ/6), so (√3 + i)⁶ = 64e^(iπ) = −64. (ii) (1 + i)⁸ = (√2)⁸e^(i2π) = 16. (iii) Cube roots of −8 = 8e^(iπ): 2e^(i(π + 2πk)/3) = 1 + i√3, −2, 1 − i√3. (iv) Expanding (cos θ + i sin θ)³ and equating real parts gives cos 3θ = 4cos³θ − 3cos θ. Take the angle of z in (−π, π] (principal argument) before applying the formula, and never forget the other n − 1 roots.

6. Analytic functions: examples and the polar Cauchy-Riemann equations

f = u + iv is analytic at a point if it is complex-differentiable in a neighbourhood of that point. With continuous partials, this is equivalent to the Cauchy-Riemann equations u_x = v_y, u_y = −v_x there. In polar form, with z = re^(iθ): u_r = v_θ/r and v_r = −u_θ/r, and then f′(z) = e^(−iθ)(u_r + i v_r). Check with Log z = ln r + iθ: u_r = 1/r = v_θ/r and v_r = 0 = −u_θ/r, so Log z is analytic, with f′ = e^(−iθ)/r = 1/z.

Where common functions are analytic
FunctionAnalyticReason
eᶻ = eˣ(cos y + i sin y)everywhere (entire)Cauchy-Riemann holds at every point
sin z, cos zeverywhere (entire)built from eᶻ; unbounded, sin(iy) = i sinh y
1/z, tan zexcept 0; except z = π/2 + kπpoles where the denominator is zero
Log z = ln|z| + i Arg zexcept the origin and the negative real axisthe branch cut: Arg jumps by 2π
z̄, |z|², Re znowhereCauchy-Riemann fails (|z|² only at 0, and a single point is not a neighbourhood)
⚠️ u must be harmonic
Real and imaginary parts of an analytic function satisfy Laplace's equation. u = x² + y² has u_xx + u_yy = 4 ≠ 0, so it is never the real part of an analytic function, while u = x² − y² (the real part of z²) is. A function can satisfy the Cauchy-Riemann equations at a single point without being analytic.

Key takeaways

  • Diagonalise by finding n independent eigenvectors: P = [v₁ … vₙ], P⁻¹AP = D, Aᵏ = PDᵏP⁻¹ and eigenvalues of Aᵏ are λᵏ.
  • Real symmetric matrices have real eigenvalues, orthogonal eigenvectors for distinct eigenvalues and an orthonormal eigenbasis, QᵀAQ = D.
  • Cayley-Hamilton: p(A) = 0. It reduces high powers (Fibonacci matrix) and gives A⁻¹ from the characteristic polynomial when the constant term is nonzero.
  • LU: A = LU with the elimination multipliers in L; solve Ly = b forward, Ux = y backward; det A is the product of the pivots.
  • De Moivre: zⁿ = rⁿe^(inθ); the n-th roots are r^(1/n)e^(i(θ + 2πk)/n), k = 0 … n − 1, equally spaced, with sum zero.
  • eᶻ, sin z, cos z are entire; Log z is analytic off the negative real axis; z̄ and |z|² are nowhere analytic; polar CR: u_r = v_θ/r, v_r = −u_θ/r.

Practice questions (17)

Attempt each one before opening the answer. Every explanation names the tempting wrong option as well as the right one, because that is where marks are lost.

  1. An n × n real matrix is diagonalisable if and only if:

    1. all its eigenvalues are distinct
    2. it is symmetric
    3. it has n linearly independent eigenvectors
    4. its determinant is non-zero
    Show answer

    Answer: C — it has n linearly independent eigenvectors

    Diagonalisation P⁻¹AP = D needs n independent columns for P, which are eigenvectors. Distinct eigenvalues and symmetry are sufficient but not necessary (the identity is diagonalisable with a single repeated eigenvalue), and invertibility has no bearing on diagonalisability.
  2. A = [[4, 1], [2, 3]] has eigenvalues 5 and 2. The eigenvalues of A² and the corresponding eigenvectors are:

    1. 25 and 4, with eigenvectors that are squared
    2. 25 and 4, with the same eigenvectors as A
    3. 10 and 4, with the same eigenvectors as A
    4. 5 and 2, with the same eigenvectors as A
    Show answer

    Answer: B — 25 and 4, with the same eigenvectors as A

    If Av = λv then A²v = λAv = λ²v, so the eigenvalues are squared (25, 4) and the eigenvectors are unchanged. Check: tr(A²) = 18 + 11 = 29 = 25 + 4. Doubling the eigenvalue (10) confuses A² with 2A.
  3. S = [[2, 1], [1, 2]] is real symmetric. Which statement is correct?

    1. its eigenvectors for λ = 3 and λ = 1 are parallel
    2. its eigenvalues are complex conjugates, since the matrix is real
    3. it is not diagonalisable, because its two columns are not orthogonal
    4. its eigenvectors for λ = 3 and λ = 1 are orthogonal, so S = QDQᵀ with orthogonal Q
    Show answer

    Answer: D — its eigenvectors for λ = 3 and λ = 1 are orthogonal, so S = QDQᵀ with orthogonal Q

    The eigenvectors (1, 1) for 3 and (1, −1) for 1 have dot product 0. Real symmetric matrices have real eigenvalues, so complex conjugate pairs cannot occur; the columns of S need not be orthogonal; the eigenvectors of distinct eigenvalues are never parallel.
  4. A = [[2, 1], [1, 3]] has characteristic equation λ² − 5λ + 5 = 0. By the Cayley-Hamilton theorem, A⁻¹ equals:

    1. (1/5)[[2, −1], [−1, 3]]
    2. (1/5)[[3, −1], [−1, 2]]
    3. (1/5)[[3, 1], [1, 2]]
    4. 5I − A
    Show answer

    Answer: B — (1/5)[[3, −1], [−1, 2]]

    A² − 5A + 5I = 0 gives A(5I − A) = 5I, so A⁻¹ = (5I − A)/5 = (1/5)[[3, −1], [−1, 2]]; check det A = 5. The matrix 5I − A without the factor 1/5 equals 5A⁻¹, and the other forms fail A·A⁻¹ = I.
  5. The upper triangular matrix A = [[2, 1, 0], [0, 2, 1], [0, 0, 3]] has characteristic polynomial λ³ − 7λ² + 16λ − 12. By Cayley-Hamilton A³ = 7A² − 16A + cI. The value of c is:

    1. −12
    2. 6
    3. 16
    4. 12
    Show answer

    Answer: D — 12

    A³ − 7A² + 16A − 12I = 0 gives A³ = 7A² − 16A + 12I, so c = 12 = det A (the product 2 × 2 × 3 of the diagonal entries). The sign −12 is the constant in the polynomial, before moving it across the equals sign.
  6. Gauss elimination on A = [[2, 1, 1], [4, 3, 3], [8, 7, 9]] gives pivots 2, 1 and 2. The determinant of A and the multiplier used to eliminate the second-column entry of the last row (after the first step) are:

    1. det A = 5, multiplier 3
    2. det A = 4, multiplier 7
    3. det A = 4, multiplier 3
    4. det A = 56, multiplier 4
    Show answer

    Answer: C — det A = 4, multiplier 3

    The determinant is the product of the pivots, 2 × 1 × 2 = 4 (no row exchanges were made). After the first step the last row is (0, 3, 5) under the pivot row (0, 1, 1), so the multiplier is 3/1 = 3, which becomes L₃₂ = 3.
  7. The value of (1 + i)⁸ is:

    1. 16i
    2. 16
    3. −16
    4. 256
    Show answer

    Answer: B — 16

    1 + i = √2 e^(iπ/4), so (1 + i)⁸ = (√2)⁸e^(i2π) = 16 × 1 = 16. Squaring gives (1 + i)² = 2i, (2i)² = −4, (−4)² = 16 in agreement. 256 would result from using the modulus 2 instead of √2.
  8. The sum of the four fourth roots of −16 is:

    1. −16
    2. 2
    3. 0
    4. 2i
    Show answer

    Answer: C — 0

    The roots 2e^(i(π + 2πk)/4), k = 0 to 3, are the vertices of a square centred on the origin, so they sum to zero (equivalently the λ³ coefficient of λ⁴ + 16 is 0). Each root has modulus 2, which is why a sum of 2 or 2i is tempting, but their directions cancel.
  9. The function Log z = ln|z| + i Arg z (principal argument in (−π, π]) is analytic on:

    1. the whole plane
    2. the plane without the origin only
    3. the plane with the origin and the negative real axis removed
    4. the upper half-plane only
    Show answer

    Answer: C — the plane with the origin and the negative real axis removed

    Arg z jumps by 2π across the negative real axis, so Log z is discontinuous there and cannot be differentiable; it is analytic everywhere else except at 0, where it is undefined. Removing only the origin is not enough, and the analytic domain is far larger than the upper half-plane.
  10. Which statements about eigenvalues and diagonalisation are correct?

    1. A real symmetric matrix has only real eigenvalues
    2. Eigenvectors of a real symmetric matrix for distinct eigenvalues are orthogonal
    3. A matrix with a repeated eigenvalue can never be diagonalised
    4. A 3 × 3 matrix with three distinct eigenvalues is diagonalisable
    Show answer

    Answer: A — A real symmetric matrix has only real eigenvalues; B — Eigenvectors of a real symmetric matrix for distinct eigenvalues are orthogonal; D — A 3 × 3 matrix with three distinct eigenvalues is diagonalisable

    Symmetric matrices have real eigenvalues and orthogonal eigenvectors for distinct eigenvalues, and distinct eigenvalues give independent eigenvectors. A repeated eigenvalue does not prevent diagonalisation: the identity matrix is already diagonal.
  11. Which statements about the Cayley-Hamilton theorem are correct?

    1. Every square matrix satisfies its own characteristic equation
    2. It can be used to find the inverse of a singular matrix
    3. A⁻¹ can be written as a polynomial in A when det A ≠ 0
    4. The characteristic equation is obtained by replacing λ with A inside det(A − λI)
    Show answer

    Answer: A — Every square matrix satisfies its own characteristic equation; C — A⁻¹ can be written as a polynomial in A when det A ≠ 0

    The theorem holds for every square matrix, and when the constant term (det A up to sign) is non-zero it gives A⁻¹ as a polynomial in A. A singular matrix has no inverse to find, and the substitution into the determinant gives det(0) = 0, which is not the theorem; the matrix is substituted into the polynomial p(λ).
  12. Which statements about analytic functions are correct?

    1. eᶻ is analytic at every point of the complex plane
    2. f(z) = z̄ is analytic, because its real and imaginary parts are x and −y
    3. Log z (principal branch) is analytic away from the origin and the negative real axis
    4. u = x² + y² can be the real part of an analytic function
    Show answer

    Answer: A — eᶻ is analytic at every point of the complex plane; C — Log z (principal branch) is analytic away from the origin and the negative real axis

    eᶻ is entire and Log z is analytic off its branch cut. For z̄, u_x = 1 but v_y = −1, so Cauchy-Riemann fails everywhere. u = x² + y² has u_xx + u_yy = 4 ≠ 0, so it is not harmonic and cannot be a real part.
  13. For A = [[4, 1], [2, 3]], the trace of A⁶ is ____.

    Numerical answer — type the value.

    Show answer

    Answer: 15689

    The eigenvalues of A are 5 and 2 (λ² − 7λ + 10 = 0), so those of A⁶ are 5⁶ = 15625 and 2⁶ = 64 and the trace is 15689. Second way: A³ = [[86, 39], [78, 47]] and A⁶ = (A³)² has diagonal entries 10438 and 5251, which add to 15689.
  14. Let F = [[1, 1], [1, 0]]. Using the Cayley-Hamilton theorem (or otherwise), the top-left entry of F¹⁰ is ____.

    Numerical answer — type the value.

    Show answer

    Answer: 89

    λ² = λ + 1 so F² = F + I and Fⁿ = FₙF + Fₙ₋₁I with Fibonacci numbers; F₁₀ = 55 and F₉ = 34 give F¹⁰ = 55F + 34I, top-left 55 + 34 = 89. Direct repeated matrix multiplication in Python gives [[89, 55], [55, 34]].
  15. Solve Ax = b with A = [[2, 1, 1], [4, 3, 3], [8, 7, 9]] and b = (6, 14, 36) by LU decomposition (L has unit diagonal). The value of x + y + z is ____.

    Numerical answer — type the value.

    Show answer

    Answer: 4

    L = [[1, 0, 0], [2, 1, 0], [4, 3, 1]], U = [[2, 1, 1], [0, 1, 1], [0, 0, 2]]. Ly = b gives y = (6, 2, 6); Ux = y gives z = 3, y = −1, x = 2. So x + y + z = 4. Substitution into the original equations returns (6, 14, 36); LU product check also reproduces A.
  16. The real part of (√3 + i)⁶ is ____.

    Numerical answer — type the value.

    Show answer

    Answer: -64

    √3 + i = 2(cos 30° + i sin 30°), so by De Moivre the sixth power is 64(cos 180° + i sin 180°) = −64, real part −64. Python complex arithmetic gives −64 with imaginary part of the order 10⁻¹⁴ (rounding).
  17. For f = u + iv analytic with u = r² cos 2θ (polar coordinates), the polar Cauchy-Riemann equation v_r = −u_θ/r gives v_r equal to:

    1. r sin 2θ
    2. −2r sin 2θ
    3. 2r cos 2θ
    4. 2r sin 2θ
    Show answer

    Answer: D — 2r sin 2θ

    u_θ = −2r² sin 2θ, so v_r = −u_θ/r = 2r sin 2θ, which integrates to v = r² sin 2θ: f = r²e^(2iθ) = z². The sign in −u_θ/r cancels the sign of u_θ. Dropping the 1/r gives 2r² sin 2θ, which has the wrong power of r.