logo

Hankel Matrix 📂Matrix Algebra

Hankel Matrix

Definition

$$ 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 = \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 , \cdots , m+n$: $$ 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 = \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 = H^{T}$ it is also a symmetric matrix, and a diagonal matrix is a Hankel matrix.

Hankel Matrix Analysis

$$ 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 $\left\{ y_{t} \right\}_{t=1}^{(p+q)}$, constructing a Hankel matrix as above and its singular value decomposition $$ H = U \Sigma V^{T} $$ are said to reveal hierarchical decomposition in $U$ and $V$ 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. ↩︎