companion matrix associated with a polynomial
monic univariate polynomial in x
name (the variable)
Important: The linalg package has been deprecated. Use the superseding command LinearAlgebra[CompanionMatrix], instead.
- For information on migrating linalg code to the new packages, see examples/LinearAlgebraMigration.
The call companion(p, x) will return a companion matrix associated with the polynomial p(x).
If C := companion(p, x) and p is a0+a1⁢x+...+xn (a monic univariate polynomial) then Ci,n=−coeff⁡p,x,i−1 (i=1..n), Ci,i−1=1 (i=2..n), and Ci,j=0 for other values of i and j.
The command with(linalg,companion) allows the use of the abbreviated form of this command.
p ≔ x4+9⁢x3+2⁢x2+17⁢x+5
q ≔ expand⁡z+2⁢z−5⁢z+3
Download Help Document
What kind of issue would you like to report? (Optional)
Thank you for submitting feedback on this help document. Your feedback will be used
to improve Maple's help in the future.