Syntax Supported by the IML Procedure and the iml Action

HANKEL Function

HANKEL (matrix) ;

This function is supported by the IML procedure and the iml action.

The HANKEL function generates a Hankel matrix from a vector or a block Hankel matrix from a matrix. A block Hankel matrix has the property that all matrices on the reverse diagonals are the same. The argument matrix is an left-parenthesis n p right-parenthesis times p or p times left-parenthesis n p right-parenthesis matrix; the value returned is the left-parenthesis n p right-parenthesis times left-parenthesis n p right-parenthesis result.

The Hankel function uses the first p times p submatrix bold upper A 1 of the argument matrix as the blocks of the first reverse diagonal. The second p times p submatrix bold upper A 2 of the argument matrix forms the second reverse diagonal. The remaining reverse diagonals are formed accordingly. After the values in the argument matrix have all been placed, the rest of the matrix is filled in with 0. If bold upper A is left-parenthesis n p right-parenthesis times p, then the first p columns of the returned matrix, bold upper R, are the same as bold upper A. If bold upper A is p times left-parenthesis n p right-parenthesis, then the first p rows of bold upper R are the same as bold upper A.

The HANKEL function is especially useful in time series applications that involve a set of variables that represent the present and past and a set of variables that represent the present and future. In this situation, the covariance matrix between the sets of variables is often assumed to be a block Hankel matrix. If

bold upper A equals left-bracket bold upper A 1 StartAbsoluteValue bold upper A 2 EndAbsoluteValue bold upper A 3 StartAbsoluteValue midline-horizontal-ellipsis EndAbsoluteValue bold upper A Subscript n Baseline right-bracket

and if bold upper R is the matrix formed by the HANKEL function, then

bold upper R equals Start 5 By 9 Matrix 1st Row 1st Column bold upper A 1 2nd Column vertical-bar 3rd Column bold upper A 2 4th Column vertical-bar 5th Column bold upper A 3 6th Column vertical-bar 7th Column midline-horizontal-ellipsis 8th Column vertical-bar 9th Column bold upper A Subscript n Baseline 2nd Row 1st Column bold upper A 2 2nd Column vertical-bar 3rd Column bold upper A 3 4th Column vertical-bar 5th Column bold upper A 4 6th Column vertical-bar 7th Column midline-horizontal-ellipsis 8th Column vertical-bar 9th Column bold 0 3rd Row 1st Column bold upper A 3 2nd Column vertical-bar 3rd Column bold upper A 4 4th Column vertical-bar 5th Column bold upper A 5 6th Column vertical-bar 7th Column midline-horizontal-ellipsis 8th Column vertical-bar 9th Column bold 0 4th Row 1st Column vertical-ellipsis 2nd Column Blank 3rd Column Blank 4th Column Blank 5th Column Blank 6th Column Blank 7th Column Blank 8th Column Blank 9th Column Blank 5th Row 1st Column bold upper A Subscript n Baseline 2nd Column vertical-bar 3rd Column bold 0 4th Column vertical-bar 5th Column bold 0 6th Column vertical-bar 7th Column midline-horizontal-ellipsis 8th Column vertical-bar 9th Column bold 0 EndMatrix

If

bold upper A equals Start 4 By 1 Matrix 1st Row  bold upper A 1 2nd Row  bold upper A 2 3rd Row  vertical-ellipsis 4th Row  bold upper A Subscript n EndMatrix

and if bold upper R is the matrix formed by the HANKEL function, then

bold upper R equals Start 4 By 9 Matrix 1st Row 1st Column bold upper A 1 2nd Column vertical-bar 3rd Column bold upper A 2 4th Column vertical-bar 5th Column bold upper A 3 6th Column vertical-bar 7th Column midline-horizontal-ellipsis 8th Column vertical-bar 9th Column bold upper A Subscript n Baseline 2nd Row 1st Column bold upper A 2 2nd Column vertical-bar 3rd Column bold upper A 3 4th Column vertical-bar 5th Column bold upper A 4 6th Column vertical-bar 7th Column midline-horizontal-ellipsis 8th Column vertical-bar 9th Column bold 0 3rd Row 1st Column vertical-ellipsis 4th Row 1st Column bold upper A Subscript n Baseline 2nd Column vertical-bar 3rd Column bold 0 4th Column vertical-bar 5th Column bold 0 6th Column vertical-bar 7th Column midline-horizontal-ellipsis 8th Column vertical-bar 9th Column bold 0 EndMatrix

For example, the following statements produce Hankel matrices, as shown in Figure 143:

r1 = hankel({1 2 3 4 5});
r2 = hankel({1 2 ,
             3 4 ,
             5 6 ,
             7 8});
r3 = hankel({1 2 3 4 ,
             5 6 7 8});
print r1, r2, r3;

Figure 143: Hankel Matrices

r1
12345
23450
34500
45000
50000

r2
1256
3478
5600
7800

r3
1234
5678
3400
7800


Last updated: March 08, 2024