Ask Your Question

Revision history [back]

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.