Skip to content

Latest commit

 

History

History
52 lines (38 loc) · 2.07 KB

README.md

File metadata and controls

52 lines (38 loc) · 2.07 KB

KroneckerTools

WORK IN PROGRESS

KroneckerTools computes chains of Kronecker products as described in Kamenik (2005).

The following computations are performed

  • c = (Ip ⊗ A ⊗ Iq)*b
  • c = (Ip ⊗ AT ⊗ Iq)*b
  • c = (A ⊗ A ⊗ ... ⊗ A)*b
  • d = (AT ⊗ AT ⊗ ... ⊗ AT ⊗ B)*c
  • C = A * (B ⊗ B ⊗ .... ⊗ B)
  • D = A * B * (C ⊗ C ⊗ .... ⊗ C)
  • D = AT * B * (C ⊗ C ⊗ .... ⊗ C)
  • E = AB(C ⊗ D ⊗ ... ⊗ D)

Installation

julia> using Pkg
julia> Pkg.add("KroneckerTools")

Documentation

Algorithms

We exploit the following property of the Kronecker product: vec(A * B * C) = (CT ⊗ A) * vec(B), so as never to form the matrix corresponding to the Kronecker product and whenever possible use matrix product instead.

Let A, a m * n matrix, B, a matrix whose size depends on the context, and b = vec(B). It follows that

  • c = (Ip ⊗ A) * b = vec(A * B), where B is a n * p matrix.
  • c = (A ⊗ Iq) * b = vec(B * AT), where B is a q * m matrix
  • c = (Ip ⊗ A ⊗ Iq) * b is computed in p blocks ci = vec(Bi * AT), i = 1, ..., p where Bi is the ith block of q * n elements of vector b

A chain of Kronecker products, (A1 ⊗ A2 ⊗ ... ⊗ An) * b can be written as (A1 ⊗ Ip1)* (Ip2 ⊗ A2 ⊗ Ip2)* ... * (Ipn ⊗ An)b where b is a vector and p1>, p2, ..., pn, q1, q2, ...,qn are such as making each group in brackets conformable.

References

O. Kamenik (2005), "Solving SDGE models: A new algorithm for the Sylvester equation", Computational Economics 25, 167--187.