Accelerating the pace of engineering and science

# Documentation Center

• Trial Software

# linalg::pascal

Pascal matrix

### Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

## Syntax

```linalg::pascal(n, <R>)
```

## Description

linalg::pascal(n) returns the n×n Pascal matrix P given by , 1 ≤ i, jn.

The entries of Pascal matrices are integer numbers. Note, however, that the returned matrix is not defined over the component domain Dom::Integer, but over the standard component domain Dom::ExpressionField(). Thus, no conversion is necessary when working with other functions that expect or return matrices over that component domain.

Use linalg::pascal(n, Dom::Integer) to define the n×n Pascal matrix over the ring of integer numbers.

Inverse Pascal matrices are provided by linalg::invpascal.

## Examples

### Example 1

We construct the 3×3 Pascal matrix:

`linalg::pascal(3)`

This is a matrix of the domain Dom::Matrix().

If you prefer a different component ring, the matrix may be converted to the desired domain after construction (see coerce, for example). Alternatively, one can specify the component ring when creating the Pascal matrix. For example, specification of the domain Dom::Float generates floating-point entries:

`linalg::pascal(3, Dom::Float)`

`domtype(%)`

### Example 2

The Cholesky factor of a Pascal matrix consists of the elements of Pascal's triangle:

`linalg::factorCholesky(linalg::pascal(4))`

## Parameters

 n The dimension of the matrix: a positive integer R The component ring: a domain of category Cat::Rng; default: Dom::ExpressionField()

## Return Values

n×n matrix of the domain Dom::Matrix(R).

## Algorithms

Pascal matrices are symmetric and positive definite.

The determinant of a Pascal matrix is 1.

The inverse of a Pascal matrix has integer entries.

If λ is an eigenvalue of a Pascal matrix, then is also an eigenvalue of the matrix.