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.
Download Help Document
What kind of issue would you like to report? (Optional)