krylov {fastmatrix}R Documentation

Computes a Krylov matrix

Description

Given A\bold{A} an nn by nn real matrix and an nn-vector b\bold{b}, this function constructs the Krylov matrix K\bold{K}, where

K=[b,Ab,,Am1b].\bold{K} = [\bold{b},\bold{Ab},\dots,\bold{A}^{m-1}\bold{b}].

Usage

krylov(a, b, m = ncol(a))

Arguments

a

a numeric square matrix of order nn by nn for which the Krylov matrix is to be computed.

b

a numeric vector of length nn.

m

length of the Krylov sequence.

Value

Returns an nn by mm matrix.

Examples

a <- matrix(c(1, 3, 2, -5, 1, 7, 1, 5, -4), ncol = 3, byrow = TRUE)
b <- c(1, 1, 1)
k <- krylov(a, b, m = 4)
k

[Package fastmatrix version 0.5-772 Index]