TOEPLITZ Function

TOEPLITZ (a) ;

The TOEPLITZ function generates a Toeplitz matrix from a vector, or a block Toeplitz matrix from a matrix. A block Toeplitz matrix has the property that all matrices on the diagonals are the same. The argument a is an $(np) \times p$ or $p \times (np)$ matrix; the value returned is the $(np) \times (np)$ result.

The TOEPLITZ function uses the first $p \times p$ submatrix, $\mb {A}_1$, of the argument matrix as the blocks of the main diagonal. The second $p \times p$ submatrix, $\mb {A}_2$, of the argument matrix forms one secondary diagonal, with the transpose $\mb {A}_2^{\prime }$ forming the other. The remaining diagonals are formed accordingly. If the first $p \times p$ submatrix of the argument matrix is symmetric, the result is also symmetric. If $\mb {A}$ is $(np) \times p$, the first $p$ columns of the returned matrix, $\mb {R}$, are the same as $\mb {A}$. If $\mb {A}$ is $p \times (np)$, the first $p$ rows of $\mb {R}$ are the same as $\mb {A}$.

The TOEPLITZ function is especially useful in time series applications, where the covariance matrix of a set of variables with its lagged set of variables is often assumed to be a block Toeplitz matrix.

If

\[  \mb {A} = \left[ \mb {A}_1 | \mb {A}_2 | \mb {A}_3 |\cdots | \mb {A}_ n \right]  \]

and if $\mb {R}$ is the matrix formed by the TOEPLITZ function, then

\[  \mb {R} = \left[ \begin{array}{ccccccccc} \mb {A}_1 &  | &  \mb {A}_2 &  | &  \mb {A}_3 &  | &  \cdots &  | &  \mb {A}_ n \\ \mb {A}_2^{\prime } &  | &  \mb {A}_1 &  | &  \mb {A}_2 &  | &  \cdots &  | &  \mb {A}_{n-1} \\ \mb {A}_3^{\prime } &  | &  \mb {A}_2^{\prime } &  | &  \mb {A}_1 &  | &  \cdots &  | &  \mb {A}_{n-2} \\ \vdots & & & & & & \\ \mb {A}_ n^{\prime } &  | &  \mb {A}_{n-1}^{\prime } &  | &  \mb {A}_{n-2}^{\prime } &  | &  \cdots &  | &  \mb {A}_1 \end{array} \right]  \]

If

\[  \mb {A} = \left[ \begin{array}{c} \mb {A}_1 \\ \mb {A}_2 \\ \vdots \\ \mb {A}_ n \end{array} \right]  \]

and if $\mb {R}$ is the matrix formed by the TOEPLITZ function, then

\[  \mb {R} = \left[ \begin{array}{ccccccccc} \mb {A}_1 &  | &  \mb {A}_2^{\prime } &  | &  \mb {A}_3^{\prime } &  | &  \cdots &  | &  \mb {A}_ n^{\prime } \\ \mb {A}_2 &  | &  \mb {A}_1 &  | &  \mb {A}_2^{\prime } &  | &  \cdots &  | &  \mb {A}_{n-1}^{\prime } \\ \vdots & & & & & & \\ \mb {A}_ n &  | &  \mb {A}_{n-1} &  | &  \mb {A}_{n-2} &  | &  \cdots &  | &  \mb {A}_1 \end{array} \right] ~   \]

Three examples follow:

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

Figure 24.408: Toeplitz Matrices

r1
1 2 3 4 5
2 1 2 3 4
3 2 1 2 3
4 3 2 1 2
5 4 3 2 1

r2
1 2 5 7
3 4 6 8
5 6 1 2
7 8 3 4

r3
1 2 3 4
5 6 7 8
3 7 1 2
4 8 5 6