mc_factorize: Factorise multi-companion matrices

View source: R/mc.R

mc_factorizeR Documentation

Factorise multi-companion matrices

Description

Companion factorization of multi-companion matrices.

Usage

mc_factorize(x, mo, mo.col)
mc_leftc(x, mo, mo.col)

Arguments

x

a multi-companion matrix or its top.

mo

multi-companion order, number of structural top rows.

mo.col

number of non-trivial columns in the top of the matrix.

Details

The companion factorization of a multi-companion matrix, X, of (multi-companion) order p is X=A_1\times\cdots\times A_p, where A_i, i=1,\dots,p, are companion matrices.

mc_leftc factorises a multi-companion matrix into a product of companion times multi-companion.

mc_factorize calls mc_leftc a number of times to compute the full factorisation.

If x is not a matrix an attempt is made to convert it to matrix. If x is a vector it is converted to a matrix with 1 row.

x may be the whole matrix or its top. If mo is missing x is assumed to be the top of the matrix and the multi-companion order is set to its number of rows.

mo.col defaults to the number of columns of x. It is important to specify mo.col if there are columns of zeroes in the top of the matrix. Otherwise the factorisation usually fails with a message (from solve) that the system is exactly singular. Note however that for objects of class MultiCompanion this situation is handled automatically (unless the user overwrites the default behaviour).

Value

for mc_factorize, a matrix whose i-th row is the first row of the i-th companion factor.

for mc_leftc, a numeric vector containing the first row of the companion factor.

Level

0

Note

The companion factorisation does not always exist but currently this possibility is not handled. Even if it exists, it may be numerically unstable.

Also, if mo.col is smaller than the number of columns, then the factorisation is not unique, the one having mo.col non-zero entries is computed. The existence is not treated.

mc_leftc is probably the first function I wrote for multi-companion matrices. It does not do checks consistently. The MultiCompanion class can be used here.

Author(s)

Georgi N. Boshnakov

References

\insertRef

boshnakov2002mcmcompanion

See Also

mc_from_factors

Examples

mat2 <- make_mcmatrix(eigval = c(1), co = cbind(c(1,1,1,1), c(0,1,0,0)), dim = 4, len.block = c(2))
mat2
eigen(mat2)
mc_leftc(mat2, mo = 4, mo.col = 2)
mCompanion(mat2)
mCompanion(mat2, mo=4, mo.col=2)
mc_leftc(mCompanion(mat2), mo = 4, mo.col = 2)
mc_eigen(mCompanion(mat2), mo = 4, mo.col = 2)
mc_eigen(mCompanion(mat2, mo=4, mo.col=2), mo = 4, mo.col = 2)

mcompanion documentation built on Sept. 22, 2023, 5:12 p.m.