First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

If p is a polynomial, then matrix.companion(p) returns a matrix which has p as its characteristic polynomial. Since such matrices are not unique, you shouldn't expect it to give the precise matrix that you've specified.