H=h11h21h31⋮hm1h12h22h32⋮hm2h13h23h33⋮hm3⋯⋯⋯⋱⋯h1nh2nh3n⋮hmn
A given matrixH=(hij)∈Rm×n is called a Hankel Matrix if it satisfies the following for all k=2,3,⋯,m+n:
i1+j1=k=i2+j2⟹hi1j1=hi2j2
In other words, a Hankel matrix is a matrix where the elements along the anti-diagonals are all the same.
H=h2h3h4⋮hm+1h3h4h5⋮hm+2h4h5h6⋮hm+3⋯⋯⋯⋱⋯h1+nh2+nh3+n⋮hm+n
H=y1y2y3⋮ypy2y3y4⋮yp+1y3y4y5⋮yq+2⋯⋯⋯⋱⋯yqyq+1yq+2⋮yp+q
For time series data{yt}t=1(p+q), constructing a Hankel matrix as above and its singular value decompositionH=UΣVT
are said to reveal hierarchical decomposition in U and V1. This method of transforming time series data into a matrix for analysis is called Hankel Matrix Analysis.
Code
The following is a function written in Julia that takes a vector and constructs a Hankel matrix.
function Hankelizer(vec)
@assert length(vec) % 2 == 1"vector must have odd length"
m = (length(vec) ÷ 2) + 1
H = zeros(eltype(vec), m, m)
for i ∈ 1:m, j ∈ 1:m
H[i,j] = vec[i+j-1]
endreturn H
end
elements = [8,2,0,6,5,1,5,4,0]
Hankelizer(elements)
function Hankelizer(vec, m, n)
@assert length(vec) == (m+n-1) "wrong dimensions"
H = zeros(eltype(vec), m, n)
for i ∈ 1:m, j ∈ 1:n
H[i,j] = vec[i+j-1]
endreturn H
end
Hankelizer([elements; 1], 3, 8)
Hankelizer([elements; 1], 2, 9)
Brunton. (2017). Chaos as an intermittently forced linear system: Supplementary Material p7. ↩︎