← LibraryPolynomials and Matrices | KEVOS® MathematicsProject Delivery · Project ManagementLesson 117/189← PrevNext →
ArticlePublished 8 Aug 202623 min readBy Kevin Jogin
Skip to content

Engineering/Mathematics/Eigenvalues

Polynomials and Matrices

A polynomial needs only addition, scalar multiplication and powers, and square matrices support all three. Substituting a matrix for the variable is therefore natural, provided the constant term is read as a multiple of the identity.

  • Advanced level
  • Stream: eigen
  • Reading time 12 min
  • Ref KVS-ENG-MATH-0079
Taxonomy
Engineering / Mathematics
Applies to
Square matrices only
Constant term
a0 becomes a0In, never a scalar
Convention
A0=In
Key property
Factored and expanded forms agree
Eigen link
Ax=λxp(A)x=p(λ)x

Overview

A polynomial is built from three ingredients: powers of the variable, multiplication by scalar coefficients, and addition. Division never appears. Square matrices support exactly the same three operations — they can be multiplied by scalars, added to one another, and raised to positive integer powers by repeated matrix multiplication — and, crucially, all of those operations preserve the size of a square matrix. Substituting a matrix for the variable of a polynomial is therefore a well-defined operation with a matrix result.

The only genuine subtlety is the constant term. In the scalar polynomial a0+a1x++amxm the leading term is a number; in the matrix version it must be a matrix of the right size, and the only sensible candidate is a0In. This follows from the convention A0=In, which makes the constant term the degree-zero term like any other. Writing p(A)=a0+a1A+ with a bare scalar is a common abbreviation, but it is an abbreviation, and taking it literally in code is one of the reliable ways to compute the wrong answer.

The second observation is that the factored form of a polynomial may be substituted just as freely as the expanded form, and gives the same matrix. That is not automatic: matrix multiplication does not commute in general, so expanding a product of matrix factors normally requires care about ordering. Here it is safe, because every factor is a polynomial in the single matrix A, and any two polynomials in the same matrix commute with one another. The factored form is often both cheaper to evaluate and far more informative.

Matrix polynomials are not an idle generalisation. They are the machinery behind the proof that every square matrix has an eigenvalue, behind the Cayley-Hamilton theorem, behind Krylov subspace iterative solvers, behind pole-placement formulas in control, and behind closed-form rotation formulas in kinematics. Wherever a matrix appears inside an expression built from sums, scalar multiples and powers, a matrix polynomial is what is actually being evaluated.

Definition

Polynomial Evaluated at a Matrix

PM

Let p(x)=a0+a1x+a2x2++amxm be a polynomial with coefficients in , and let A be a square matrix of size n. Then

  • p(A)=a0In+a1A+a2A2++amAm,
a square matrix of size n. Each power Ak is the k-fold matrix product of A with itself, and the degree-zero term uses A0=In.

The requirement that A be square is essential twice over: a non-square matrix cannot be multiplied by itself, and the sum a0In+a1A requires the identity to have the same shape as A.

Matrix Power

MP

For a square matrix A and a non-negative integer k, the power Ak is defined recursively by A0=In and Ak=AAk1 for k1. The convention A0=In is what makes the index laws AjAk=Aj+k hold without exception, and it is the reason the constant term of a polynomial becomes a multiple of the identity.

This is not the entrywise power. Raising each entry of A to the power k gives a completely different matrix, and several programming languages make the entrywise operation the default for the ** operator.

Annihilating Polynomial

AP

A non-zero polynomial p with p(A)=O, the zero matrix, is said to annihilate A. A weaker and equally useful notion fixes a single vector: p annihilates A at x when p(A)x=0. Such polynomials always exist, and factoring them is the route by which eigenvalues can be extracted without ever computing a determinant.

Concepts

The constant term is a matrix

Every term of p(A) must be an n×n matrix, because they are being added together. The terms a1A, a2A2 and so on are matrices automatically. The degree-zero term is a0A0, and since A0=In this is the matrix a0In: the scalar a0 on the diagonal and zeros everywhere else. It is not the scalar a0, and it is emphatically not the matrix with a0 in every position. This distinction is invisible in the standard abbreviated notation and highly visible in a wrong answer.

Why the factored form may be substituted

Matrix multiplication is not commutative, so expanding (AbIn)(AcIn) appears to demand care. It does not, because A commutes with itself and with every multiple of the identity. Consequently any two polynomials in the same matrix A commute: p(A)q(A)=q(A)p(A), and both equal (pq)(A), the polynomial product evaluated at A. Substituting A into a factored polynomial therefore gives exactly the same matrix as substituting into its expanded form, and the factors may be applied in any order.

The factored form is usually the better one

Beyond convenience, the factored form carries structure. Each factor AbiIn is a shifted matrix, and its null space is the eigenspace of A for the eigenvalue bi. A product of such factors annihilates any vector lying in the eigenspace of any of the roots. That observation drives the constructive proof that every square matrix has an eigenvalue: build an annihilating polynomial for a chosen vector, factor it, and apply the factors one at a time until the result becomes the zero vector. The last factor applied identifies an eigenvalue.

Action on an eigenvector

If Ax=λx then Akx=λkx by repeated application, and therefore p(A)x=p(λ)x for every polynomial p. An eigenvector of A is an eigenvector of every polynomial in A, with the eigenvalue transformed by the same polynomial. This is the spectral mapping property in its most elementary form, and it explains why p(A)=O forces every eigenvalue of A to be a root of p.

Degree can always be reduced

The powers In,A,A2, cannot be independent forever: the space of n×n matrices has dimension n2, so at most n2 of them can be linearly independent, and the Cayley-Hamilton theorem sharpens this dramatically by showing that An is a combination of the lower powers. Every polynomial in A therefore equals a polynomial of degree less than n. In practice this means that evaluating a high-degree matrix polynomial should begin by reducing the polynomial modulo the characteristic polynomial, not by computing high powers.

Powers are where the numerical trouble lives

The entries of Ak grow or decay roughly like ρ(A)k, where ρ is the spectral radius. For ρ>1 the powers overflow; for ρ<1 they underflow to zero; and for a non-normal matrix the intermediate powers can be enormous even when both A and Ak are modest, producing catastrophic cancellation when the terms are summed. Matrix polynomials are also destructive of sparsity: each multiplication by A propagates non-zeros further from the diagonal, so Ak of a sparse matrix is generally dense.

Evaluating a matrix polynomial

Confirm the matrix is squarePowers and the addition of a0In both require it. A rectangular matrix cannot be substituted into a polynomial at all.
Reduce the degree if it is largeAny polynomial in A equals one of degree less than n. Divide by the characteristic polynomial and keep the remainder before computing anything.
Factor if the roots are knownA product of shifted matrices AbiIn is usually cheaper to form and reveals the eigenstructure. The factors commute, so the order is free.
Otherwise use Horner's schemeEvaluate as (((amA+am1In)A+am2In)A+), which needs m1 matrix multiplications and never forms a high power explicitly.
Write the constant term as a0InNever add a bare scalar to a matrix. In array-based languages that operation silently adds the scalar to every entry.
VerifyCheck against the factored form, or apply the result to a known eigenvector and confirm the output equals p(λ)x.

Equations

Polynomial evaluated at a matrix

EQ-PM-01
p(A)=a0In+a1A+a2A2++amAm=k=0makAk

Each term is an n×n matrix. The degree-zero term is a0In, not the scalar a0.

Matrix powers

EQ-PM-02
A0=In,Ak=AAk1,AjAk=Aj+k

The recursive definition of a matrix power and the index law it satisfies. The convention A0=In is what makes the index law hold for j=0.

Factored form substituted

EQ-PM-03
p(x)=i=1m(xbi)p(A)=(Ab1In)(Ab2In)(AbmIn)

Over every polynomial factors into linear factors. The matrix factors commute, so the ordering is immaterial and the product equals the expanded form.

Polynomials in one matrix commute

EQ-PM-04
p(A)q(A)=q(A)p(A)=(pq)(A)

The reason the factored substitution is legitimate. It fails for polynomials in two different matrices unless those matrices themselves commute.

Action on an eigenvector

EQ-PM-05
Ax=λxp(A)x=p(λ)x

An eigenvector of A is an eigenvector of every polynomial in A, with the eigenvalue mapped through the same polynomial.

Horner's scheme for a matrix argument

EQ-PM-06
p(A)=(((amA+am1In)A+am2In)A+)+a0In

Evaluates a degree-m polynomial in m1 matrix multiplications without ever forming a high power explicitly, which limits both cost and overflow.

Annihilating polynomial at a vector

EQ-PM-07
p(A)x=0,x0

The relation that a linear dependence among x,Ax,A2x, produces. Factoring such a p and applying the factors in turn extracts an eigenvalue of A.

Variable Definitions

Symbols used on this page
SymbolNameMeaningDomain / type
AMatrix argumentThe square matrix substituted for the polynomial variablen x n matrix over C
nSizeCommon row and column count of A and of Inpositive integer
p(x)PolynomialThe scalar polynomial whose variable is replaced by a matrixpolynomial with complex coefficients
mDegreeDegree of the polynomial, the highest power appearingnon-negative integer
akCoefficientScalar multiplier of the k-th power termcomplex scalar
biRootA root of p, appearing in the factor AbiIncomplex scalar
InIdentity matrixThe size-n identity, equal to A0 and carrier of the constant termn x n matrix
AkMatrix powerThe k-fold matrix product of A with itself; not the entrywise powern x n matrix
OZero matrixThe matrix with every entry zero, the result when p annihilates An x n matrix

Worked Numerical Example

Problem statement

A discrete-time state transition matrix in companion form governs a third-order digital filter. Evaluate the quadratic q(x)=x23x+2 at that matrix, first from the expanded form and then from the factored form (x1)(x2), and interpret the structure of the result.

  1. State the matrix and the polynomial

    The companion matrix D shifts the state and forms the new entry from the feedback coefficients in its last row. The polynomial to be evaluated is q(x)=x23x+2, whose constant term will contribute 2I3.

    D=[0100016116],q(x)=x23x+2
  2. Compute the required powers

    Only D0, D1 and D2 are needed. Because the first two rows of D are shifted unit vectors, the first two rows of D2 are simply the second and third rows of D; only the last row requires arithmetic, as 6(0,1,0)11(0,0,1)+6(6,11,6)=(36,60,25).

    D0=I3=[100010001],D2=[0016116366025]
  3. Assemble the expanded form

    Combine the three matrices with the coefficients 1, 3 and 2. The constant term enters as 2I3, contributing 2 to each diagonal entry and nothing elsewhere — not 2 to every entry.

    q(D)=D23D+2I3=[0016116366025][030003183318]+[200020002]
  4. Complete the entrywise arithmetic

    Adding the three matrices entry by entry gives the result. For instance the (3,3) entry is 2518+2=9, and the (2,2) entry is 110+2=9.

    q(D)=[23169318279]
  5. Form the factored version

    The polynomial factors as q(x)=(x1)(x2), so q(D)=(DI3)(D2I3). Each factor is D with a constant subtracted from the diagonal only.

    DI3=[1100116115],D2I3=[2100216114]
  6. Multiply the factors and compare

    The first row of the product is (1)(2,1,0)+(1)(0,2,1)+(0)(6,11,4)=(2,3,1), matching the expanded result. The remaining rows agree likewise. Because polynomials in D commute, reversing the two factors gives the same matrix.

    (DI3)(D2I3)=[23169318279]=q(D)
  7. Read the structure of the result

    Every row of q(D) is a multiple of (2,3,1) and every column is a multiple of (1,3,9), so q(D) has rank one. That column direction is not accidental: D(1,3,9)=(3,9,633+54)=(3,9,27)=3(1,3,9), so it is an eigenvector of D for the eigenvalue 3 — the one root of the cubic x36x2+11x6 that q does not remove.

    D[139]=[3927]=3[139]
  8. Extend to the annihilating polynomial

    Multiplying by the remaining factor gives the zero matrix, since q(D)(D3I3) has first row 2(3,1,0)3(0,3,1)+1(6,11,3)=(0,0,0) and the other rows are multiples of the first. Hence p(D)=O for p(x)=(x1)(x2)(x3)=x36x2+11x6, which is exactly the characteristic polynomial encoded in the last row of the companion matrix.

    (DI3)(D2I3)(D3I3)=O
Result

The quadratic evaluates to a rank-one matrix whose column space is the eigenspace of D for the eigenvalue 3: the factors (DI3) and (D2I3) have annihilated the other two eigendirections and left only the third. Applying the final factor annihilates that one too, so the cubic is an annihilating polynomial for D. For the filter this is the statement that its state transition matrix satisfies its own difference equation — the feedback coefficients in the last row of D are precisely the coefficients of the polynomial that kills it.

Applications &amp; Industry Use

Control systems

Pole placement and state transition

Ackermann's formula computes a state-feedback gain as a row vector times the desired characteristic polynomial evaluated at the plant matrix, pd(A). Separately, the discrete-time state transition over k steps is Ak, and Cayley-Hamilton lets that power be written as a polynomial of degree less than n, which is how transition matrices are evaluated without repeated multiplication.

Robotics and kinematics

Closed-form rotation from a skew matrix

Rodrigues' formula expresses a rotation about a unit axis as R=I3+sinθK+(1cosθ)K2, where K is the skew-symmetric cross-product matrix of the axis. This is a quadratic polynomial in K; higher powers are unnecessary because K3=K collapses them back. Evaluating it is a matrix polynomial evaluation performed millions of times per second in motion planning code.

Numerical linear algebra

Krylov subspace iterative solvers

Conjugate gradients, GMRES and their relatives construct approximate solutions of the form xk=x0+q(A)r0 for a polynomial q of degree k1. The residual after k steps is p(A)r0 with p(0)=1, and the entire convergence theory of these methods is the question of how small such a polynomial can be made on the spectrum of A.

Network analysis

Walk counting and graph polynomials

For an adjacency matrix A, the entry [Ak]ij counts walks of length exactly k from node i to node j. A polynomial in A therefore counts weighted combinations of walks, which is how communicability, Katz centrality and network resilience measures are defined and computed in transport and communication network engineering.

Signal processing

Filters as polynomials in a shift operator

A finite impulse response filter applied to a finite signal is a polynomial in the shift matrix, with the filter taps as coefficients. Cascading two filters corresponds to multiplying their polynomials, and because polynomials in one matrix commute, the order in which two filters are applied does not change the result — a fact filter designers rely on when reordering a processing chain.

Structural and thermal analysis

Polynomial approximation of matrix functions

Transient heat conduction and structural response require the matrix exponential eAt, which is approximated in practice by a truncated or Chebyshev polynomial in A, or by a rational approximation whose numerator and denominator are both matrix polynomials. The evaluation strategy — Horner, Paterson-Stockmeyer, scaling and squaring — is chosen entirely on matrix-polynomial grounds.

Design Considerations

Write the constant term as a0In in code as well as on paper

In array-based languages, adding a scalar to a matrix broadcasts: A + 2 adds 2 to every entry, not to the diagonal. The correct expression is A + 2*np.eye(n). The bug produces a plausible matrix of the right shape and is easily missed in review, so it should be caught by an explicit unit test on a diagonal input.

Reduce the degree before evaluating

By Cayley-Hamilton, any polynomial in A equals one of degree less than n. For a high-degree polynomial, divide by the characteristic polynomial and evaluate only the remainder. This can turn an evaluation requiring hundreds of matrix multiplications into one requiring a handful, and it also avoids forming the high powers where overflow lives.

Never form high powers explicitly

Computing A20 by nineteen multiplications is both slow and numerically poor. Horner's scheme evaluates a degree-m polynomial in m1 multiplications with no explicit high powers; the Paterson-Stockmeyer scheme reduces that to about 2m. Where only Ak itself is wanted, binary exponentiation needs about log2k multiplications.

Expect sparsity to be destroyed

Each multiplication by a sparse A spreads non-zeros further, so Ak is generally dense even when A is not. Matrix polynomials of sparse matrices should therefore be applied to vectors rather than formed as matrices: computing p(A)v by repeated sparse matrix-vector products costs m sparse products and never materialises a dense intermediate.

Prefer the factored form when the roots are known and real

Forming (AbiIn) requires only diagonal subtractions plus m1 multiplications, avoids computing coefficients that may be enormous, and exposes the eigenstructure. If the roots are complex and the matrix real, pair conjugate roots into real quadratic factors to keep the arithmetic real.

Watch conditioning for non-normal matrices

For a matrix that is far from normal, intermediate powers can be many orders of magnitude larger than either the matrix or the final answer, so summing the terms of an expanded polynomial cancels catastrophically. Where accuracy matters, evaluate through a Schur decomposition or a scaling-and-squaring scheme rather than by direct summation.

Standards &amp; Codes

Notation, interchange and numerical standards that govern how this material is written down, stored and computed in production systems.

Applicable standards, conventions and reference implementations
ReferenceTitleRelevance to this topic
ISO 80000-2Quantities and units — Part 2: MathematicsGoverns the notation for matrix powers, the identity matrix In and polynomial coefficients, and the typographic distinction between the scalar variable x and the matrix argument A.
BLAS Level 3 (xGEMM)Basic Linear Algebra Subprograms — matrix-matrix operationsEvery matrix multiplication in a polynomial evaluation is a GEMM call. Its accumulate form CαAB+βC implements one Horner step directly, which is why Horner's scheme maps so cleanly onto optimised libraries.
IEEE 754-2019IEEE Standard for Floating-Point ArithmeticDefines the overflow and underflow limits that matrix powers reach quickly when the spectral radius departs from one, and the rounding model behind the cancellation seen in expanded-form evaluation.
ISO/IEC 14882Programming languages — C++Relevant to the operator-overloading conventions that determine whether A * A means a matrix product or an entrywise product; the Eigen library distinguishes them explicitly with A * A and A.array() * A.array().
IEC 61131-3Programmable controllers — Programming languagesApplies where a small matrix polynomial — a Rodrigues rotation or a fixed-gain state observer — is evaluated inside deterministic control logic, constraining the arithmetic types and the permissible loop structure.

Material Selection

For a mathematical topic, "material" is the numeric representation: the scalar field, storage format and precision the computation is built from.

Representation and precision selection
RepresentationSelect whenTrade-off
Exact integer arithmeticCompanion matrices, adjacency matrices and combinatorial walk counting where entries are integers and the answer must be exact.Exactly correct with no rounding, but the entries of Ak grow geometrically and a fixed-width type will overflow for modest k.
Exact rational or symbolic coefficientsDeriving an annihilating or characteristic polynomial, or evaluating a polynomial containing a design parameter.Yields a factorable exact result, but expression size grows rapidly with the degree and the matrix size.
IEEE 754 binary64, dense storageGeneral numerical evaluation of moderate-degree polynomials at matrices of moderate size.Fast, well supported by BLAS Level 3, but vulnerable to overflow at high powers and to cancellation for non-normal matrices.
Sparse storage with matrix-vector applicationVery large sparse matrices where only p(A)v is required, as in Krylov solvers and network centrality measures.Keeps memory linear in the number of non-zeros and never densifies, but cannot deliver the matrix p(A) itself.
IEEE 754 binary32 on acceleratorsGraphics and robotics kernels such as Rodrigues rotations, evaluated at very high rates and at low degree.Halves bandwidth and maps well to hardware, but the reduced exponent range makes even modest powers risky and accumulated drift requires periodic re-normalisation.
Finite field arithmeticCoding theory and cryptography, where companion matrices over 𝔽q implement polynomial arithmetic.No overflow and exact results with fixed operand size, but the factorisation of a polynomial over a finite field differs from its factorisation over .

Manufacturing Notes

Implementation notes — how the result is actually produced by hand, by algorithm and by library, including cost and numerical behaviour.

Operation counts

Naive evaluation of a degree-m polynomial by forming each power separately costs m1 matrix multiplications, each about 2n3 operations. Horner's scheme costs the same number of multiplications but avoids storing the powers. The Paterson-Stockmeyer scheme reduces the count to roughly 2m multiplications by grouping terms, which is the standard technique inside matrix-exponential implementations.

Hand procedure

Compute the powers one at a time, each from the previous, and write them out fully before combining. Scale each by its coefficient, then add entry by entry, taking the diagonal contribution of a0In last so that it is not forgotten. Where the polynomial factors, form the shifted matrices instead — subtracting a constant from the diagonal is far less error-prone than computing a cube.

Library behaviour

numpy.linalg.matrix_power performs true matrix exponentiation by binary powering, whereas A ** 2 on a NumPy array is entrywise. numpy.polyvalfromroots and numpy.polyval are scalar routines and must not be applied to a matrix argument. SymPy evaluates matrix polynomials symbolically and Matrix.charpoly() supplies the characteristic polynomial for degree reduction. scipy.linalg.funm and expm implement matrix functions using polynomial and rational approximations internally.

Verification

Three checks are worth running. Compare the expanded and factored evaluations, which exercise entirely different arithmetic. Apply the result to a known eigenvector and confirm the output equals p(λ)x. Finally, check the trace: the trace of p(A) equals ip(λi) over the eigenvalues with multiplicity, which is a cheap scalar test of the whole computation.

Numerical stability

Direct summation of an expanded matrix polynomial is stable only when the terms do not vary wildly in magnitude. For non-normal matrices, or for polynomials of high degree, use a Schur decomposition to reduce A to triangular form and evaluate there, or apply scaling and squaring so that every polynomial evaluation is performed on a matrix of small norm.

Failure Modes &amp; Common Mistakes

Failure modes, root causes and prevention
Failure mode / mistakeImpactRoot causePrevention & detection
Adding the constant term as a scalarhighWriting A + a0 in an array language, which broadcasts the scalar to every entry instead of forming a0In.Always write a0In explicitly. Unit-test with a diagonal matrix, where the wrong result is immediately visible in the off-diagonal entries.
Using entrywise powers instead of matrix powershighThe ** or .^ operator meaning elementwise exponentiation in NumPy, MATLAB and similar environments.Use the explicit matrix-power function (numpy.linalg.matrix_power, MATLAB's ^) and verify on a matrix where the two differ, such as one with a zero on the diagonal.
Taking A0 to be the zero matrixmediumCarrying over the intuition that a zero exponent contributes nothing, which deletes the entire constant term.Fix A0=In as a stated convention and check that a constant polynomial p(x)=c evaluates to cIn.
Substituting into a non-square matrixmediumApplying a polynomial to a rectangular matrix, where neither A2 nor A+I is defined.Assert squareness at the entry point of any routine that evaluates a matrix polynomial.
Overflow when forming high powershighComputing Ak directly for large k when the spectral radius exceeds one, so intermediate entries leave the representable range.Reduce the polynomial degree using the characteristic polynomial, use Horner's scheme, or scale the matrix before evaluation and undo the scaling afterwards.
Catastrophic cancellation in the expanded formmediumSumming terms of vastly different magnitude for a non-normal matrix, so the significant digits of the answer are lost.Evaluate through the factored form or a Schur decomposition, and compare the two routes on a representative case.
Densifying a sparse matrixmediumForming p(A) explicitly for a large sparse A, where each power fills in more entries until memory is exhausted.Apply the polynomial to a vector by repeated sparse matrix-vector products rather than forming the polynomial as a matrix.
Assuming factors of polynomials in two different matrices commutelowOver-generalising the commutation property, which holds for polynomials in a single matrix but not for p(A) and q(B) with ABBA.Check that every factor is a polynomial in the same matrix before reordering. If two matrices are involved, verify AB=BA explicitly.

FAQs

Why does the constant term become a multiple of the identity?

Because every term in the sum must be a matrix of the same size for the addition to be defined. The degree-zero term is a0A0, and A0=In by the same convention that makes x0=1 for scalars, so the term is a0In. Writing it as a bare scalar is a widely used abbreviation, not a literal instruction.

Does substituting into the factored form really give the same matrix?

Yes, and the reason is commutativity. Every factor AbiIn is a polynomial in A, and any two polynomials in the same matrix commute with one another. Expanding the product therefore behaves exactly as the scalar expansion does, and the factors may be applied in any order without changing the result.

Can I substitute a matrix into a polynomial that involves division?

Not in general. Polynomials are built only from addition, scalar multiplication and powers, all of which square matrices support. Rational functions require inverses, which exist only for non-singular matrices, and even then A1B and BA1 differ. Rational matrix functions are studied, but they are a substantially more delicate object.

What does it mean for a polynomial to annihilate a matrix?

It means p(A)=O, the zero matrix. Such polynomials always exist — the Cayley-Hamilton theorem shows the characteristic polynomial is one — and every eigenvalue of A must be a root of any annihilating polynomial, because p(A)x=p(λ)x for an eigenvector x. That is how factoring an annihilating polynomial exposes eigenvalues.

Why is the factored form often preferred computationally?

Forming each factor AbiIn requires only subtractions on the diagonal, so no large intermediate coefficients ever appear, and the product needs m1 multiplications, the same as Horner's scheme. The factored form also makes the structure visible: each factor annihilates one eigenspace, which is why a partially applied product has a recognisable rank and column space.

How do I evaluate a very high degree polynomial in a matrix efficiently?

First reduce the degree. By Cayley-Hamilton, An is a linear combination of lower powers, so dividing the polynomial by the characteristic polynomial and keeping the remainder leaves an equivalent polynomial of degree less than n. Then evaluate the remainder by Horner's scheme, or by the Paterson-Stockmeyer grouping if the degree is still large.

What happens to eigenvalues when a polynomial is applied?

They are mapped through the same polynomial. If Ax=λx then p(A)x=p(λ)x, so the eigenvectors are unchanged and each eigenvalue λ becomes p(λ). This is why p(A)=O forces p(λ)=0 for every eigenvalue, and why a factor (AbIn) annihilates exactly the eigenspace for b.

References

  1. Beezer, R. A. A First Course in Linear Algebra, Version 0.70. University of Puget Sound, 2006. Section EE, Subsection PM. Licensed under the GNU Free Documentation License v1.2.
  2. ISO 80000-2:2019, Quantities and units — Part 2: Mathematics. International Organization for Standardization.
  3. Higham, N. J. Functions of Matrices: Theory and Computation. Society for Industrial and Applied Mathematics, 2008.
  4. Golub, G. H. and Van Loan, C. F. Matrix Computations, 4th edition. Johns Hopkins University Press, 2013.
  5. Paterson, M. S. and Stockmeyer, L. J. On the Number of Nonscalar Multiplications Necessary to Evaluate Polynomials. SIAM Journal on Computing, 1973.

AI Suggested Questions

  • Show how the Paterson-Stockmeyer scheme evaluates a degree-16 matrix polynomial in about eight matrix multiplications instead of fifteen.
  • Given a 4×4 matrix, reduce A20 to a polynomial of degree three using the characteristic polynomial, and verify the reduction numerically.
  • Why does K3=K hold for the skew-symmetric cross-product matrix of a unit vector, and how does that truncate Rodrigues' rotation formula?
  • Construct a non-normal matrix for which the expanded and factored evaluations of the same polynomial differ noticeably in floating point.
  • Explain how the residual of GMRES after k steps is a matrix polynomial applied to the initial residual, and what that implies about convergence.
  • For a sparse adjacency matrix, compare the cost of forming p(A) explicitly with applying p(A) to a single vector.

Related Calculators

Continue learning

Algebraic and Geometric Multiplicities of Eigenvalues | KEVOS® MathematicsArticle · Project ManagementAmitsur’s Theorem on the Radical of a Polynomial Ring | KEVOS®Article · Project ManagementAmitsur’s Theorem on the Radical of an Algebra of Small Dimension | KEVOS®Article · Project ManagementArchetypes: Reference Catalogue of Worked Systems | KEVOS® MathematicsArticle · Project Management