Skip to contents

Creates an eigenvector of a multicompanion matrix from the eigenvalue and the seed parameters.

Usage

make_mcev(eigval, co, dim, what.co = "bottom")
make_mcgev(eigval, co, v, what.co = "bottom")

Arguments

eigval

the eigenvalue.

co

the bottom (default) or the top seed elements of the vector.

dim

the size of the matrix.

what.co

type of co: "bottom" or "top".

v

the previous vector in the chain.

Details

make_mcev computes an eigenvector for a multi-companion dim x dim matrix by filling its top or bottom part with co and completing the remaining elements using the general pattern of eigenvectors of such matrices (Boshnakov 2002) .

Similarly, make_mcgev computes the next generalised eigenvector in a chain whose previous element is v.

what.co cannot be "top" if the eigenvalue is 0. Generalised eigenvectors corresponding to the zero eigenvalue have some specifics, so it is better to use the specialised functions in that case.

Value

make_mcev returns the required eigenvector.

make_mcgev returns the required generalised eigenvector.

References

Boshnakov GN (2002). “Multi-companion matrices.” Linear Algebra Appl., 354, 53--83. ISSN 0024-3795, doi:10.1016/S0024-3795(01)00475-X .

Author

Georgi N. Boshnakov

Examples

v1 <- make_mcev(0.5, c(1, 1), dim = 4)
v1
#> [1] 0.5 0.5 1.0 1.0
make_mcev(0.5, c(1, 1), dim = 4, what.co = "top")
#> [1] 1 1 2 2

v2 <- make_mcgev(0.5, c(0, 1), v = v1, what.co = "top")
v2
#> [1]  0  1 -2  0
make_mcgev(0.5, c(0, 1), v = v2, what.co = "top")
#> [1] 0 1 4 2