logo

Hankel Matrix 📂Matrix Algebra

Hankel Matrix

Definition

H=[h11h12h13h1nh21h22h23h2nh31h32h33h3nhm1hm2hm3hmn] H = \begin{bmatrix} h_{11} & h_{12} & h_{13} & \cdots & h_{1n} \\ h_{21} & h_{22} & h_{23} & \cdots & h_{2n} \\ h_{31} & h_{32} & h_{33} & \cdots & h_{3n} \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ h_{m1} & h_{m2} & h_{m3} & \cdots & h_{mn} \end{bmatrix} A given matrix H=(hij)Rm×nH = \left( h_{ij} \right) \in \mathbb{R}^{m \times n} is called a Hankel Matrix if it satisfies the following for all k=2,3,,m+nk = 2 , 3 , \cdots , m+n: i1+j1=k=i2+j2    hi1j1=hi2j2 i_{1} + j_{1} = k = i_{2} + j_{2} \implies h_{i_{1} j_{1}} = h_{i_{2} j_{2}} In other words, a Hankel matrix is a matrix where the elements along the anti-diagonals are all the same. H=[h2h3h4h1+nh3h4h5h2+nh4h5h6h3+nhm+1hm+2hm+3hm+n] H = \begin{bmatrix} h_{2} & h_{3} & h_{4} & \cdots & h_{1+n} \\ h_{3} & h_{4} & h_{5} & \cdots & h_{2+n} \\ h_{4} & h_{5} & h_{6} & \cdots & h_{3+n} \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ h_{m+1} & h_{m+2} & h_{m+3} & \cdots & h_{m+n} \end{bmatrix}

Explanation

If the Hankel matrix is a square matrix, then because of H=HTH = H^{T} it is also a symmetric matrix, and a diagonal matrix is a Hankel matrix.

Hankel Matrix Analysis

H=[y1y2y3yqy2y3y4yq+1y3y4y5yq+2ypyp+1yq+2yp+q] H = \begin{bmatrix} y_{1} & y_{2} & y_{3} & \cdots & y_{q} \\ y_{2} & y_{3} & y_{4} & \cdots & y_{q+1} \\ y_{3} & y_{4} & y_{5} & \cdots & y_{q+2} \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ y_{p} & y_{p+1} & y_{q+2} & \cdots & y_{p+q} \end{bmatrix} For time series data {yt}t=1(p+q)\left\{ y_{t} \right\}_{t=1}^{(p+q)}, constructing a Hankel matrix as above and its singular value decomposition H=UΣVT H = U \Sigma V^{T} are said to reveal hierarchical decomposition in UU and VV 1. 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]
    end
    return 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]
    end
    return H
end

Hankelizer([elements; 1], 3, 8)
Hankelizer([elements; 1], 2, 9)

  1. Brunton. (2017). Chaos as an intermittently forced linear system: Supplementary Material p7. ↩︎