Contents Previous Next Subchapters

Compute the companion matrix corresponding to polynomial
Syntax compan(c)
See Also

Description
Returns the companion matrix corresponding to the descending polynomial represented by the vector c. The corresponding companion matrix is given by

         _                                                        _
        |  -c(2)/c(1)   -c(3)/c(1)  ...  -c(n)/c(1)  -c(n+1)/c(1)  |
        |       1            0      ...       0             0      |
        |       0            1      ...       0             0      |
    A = |       .            .   .            .             .      |
        |       .            .       .        .             .      |
        |       .            .           .    .             .      |
        |_      0            0      ...       1             0     _|

The eigenvalues of the companion matrix are equal to the roots of the polynomial.

Example
If you enter
     c = [ 1, 2, 3, 4]
     compan(c)
O-Matrix will reply
     {
     [ -2 , -3 , -4 ]
     [ 1 , 0 , 0 ]
     [ 0 , 1 , 0 ]
     }