# Documentation

### This is machine translation

Translated by
Mouse over text to see original. Click the button below to return to the English verison of the page.

# linalg::toeplitz

Toeplitz matrix

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

## Syntax

```linalg::toeplitz(`m`, `n`, `[t-k, …,t k]`, <`R`>)
linalg::toeplitz(`n`, `[t-k, …,t k]`, <`R`>)
linalg::toeplitz(`c`, `r`)
linalg::toeplitz(`r`)
```

## Description

```linalg::toeplitz(m, n, [t-k, ..., t-1, t0, t1, ..., tk])``` returns the m×n Toeplitz matrix

.

```linalg::toeplitz(n, [t-k, ..., tk])``` returns the square Toeplitz matrix of dimension n×n.

A number of entries [t-k, …, tk] must be an odd number 2 k + 1. There must be at least k diagonal bands above the diagonal and k diagonal bands below the diagonal: k must satisfy kmin(m, n) - 1. Entries with matrix indices (i, j) satisfying |i - j| > k are set to 0.

Toeplitz matrices of dimension n×n can be inverted with O(n2) operations. See `linalg::toeplitzSolve`.

`linalg::toeplitz(c, r)` generates a nonsymmetric Toeplitz matrix having `c` as its first column and `r` as its first row. If the first elements of `c` and `r` differ, `toeplitz` issues a warning and uses the first element of the column.

`linalg::toeplitz(r)` generates a symmetric Toeplitz matrix if `r` is real. If `r` is complex, but its first element is real, then this syntax generates the Hermitian Toeplitz matrix formed from `r`. If the first element of `r` is complex, then the resulting matrix is Hermitian off the main diagonal, meaning that Tij = conjugate(Tji) for i ≠ j.

When you use matrices in MuPAD® computations, both computational efficiency and memory use can depend on whether the matrix is sparse or dense. The first two syntaxes are optimized for generating sparse matrices and, therefore, these syntaxes are preferable. For details about improving performance when working with matrices, see Use Sparse and Dense Matrices.

## Examples

### Example 1

Construct a 4×4 Toeplitz matrix with three bands:

`linalg::toeplitz(4, [-1, 2, 1])`
``` ```

Construct a 3×5 Toeplitz matrix with symbolic entries:

`linalg::toeplitz(3, 5, [a, b, c])`
``` ```

### Example 2

Construct a Toeplitz matrix by using a vector to specify its first row. For a real vector, the resulting matrix is symmetric:

```r := matrix([1, 2, 3]): linalg::toeplitz(r)```
``` ```

For a complex vector, the resulting matrix is Hermitian off the main diagonal:

```r := matrix([1 + I, 2 + I, 3 + I]): T := linalg::toeplitz(r); htranspose(T)```
``` ```
``` ```

### Example 3

Construct a Toeplitz matrix by using two vectors to specify its first column and first row:

```c := matrix([1, a/2, b/2]): r := [1, a, b]: linalg::toeplitz(c, r)```
``` ```

If the first elements of the vectors differ, `linalg::toeplitz` issues a warning and uses the first element of the column:

```c := matrix([1, a/2, b/2]): r := [2, a, b]: linalg::toeplitz(c, r)```
```Warning: First element of input column does not match first element of input row. Column wins diagonal conflict. [linalg::toeplitz] ```
``` ```

## Parameters

 `m`, `n` Row and column dimensions of the matrix: positive integers. `t-k,…,tk` Arithmetical expressions or elements of the component ring `R`. `R` Component ring: a domain of category `Cat::Rng`. The default ring is `Dom::ExpressionField``()`. `c` Vector specifying the first column of a Toeplitz matrix. `r` Vector specifying the first row of a Toeplitz matrix.

## Return Values

Matrix of the domain `Dom::Matrix``(R)`.