creation.matrix: Creation Matrix

Description Usage Arguments Details Value Note Author(s) References Examples

View source: R/creation.matrix.R

Description

This function returns the order n creation matrix, a square matrix with the sequence 1, 2, ..., n - 1 on the sub-diagonal below the principal diagonal.

Usage

1

Arguments

n

a positive integer greater than 1

Details

The order n creation matrix is also called the derivation matrix and is used in numerical mathematics and physics. It arises in the solution of linear dynamical systems. The form of the matrix is ≤ft[ {\begin{array}{*{20}{c}} 0&0&0& \cdots &0&0\\ 1&0&0& \cdots &0&0\\ 0&2&0& \cdots &0&0\\ 0&0&3& \ddots &0&0\\ \vdots & \vdots & \vdots & \ddots & \ddots &{}\\ 0&0&0& \cdots &{n - 1}&0 \end{array}} \right].

Value

An order n matrix.

Note

If the argument n is not an integer that is greater than 1, the function presents an error message and stops.

Author(s)

Frederick Novomestky fnovomes@poly.edu

References

Aceto, L. and D. Trigiante (2001). Matrices of Pascal and Other Greats, American Mathematical Monthly, March 2001, 108(3), 232-245.

Weinberg, S. (1995). The Quantum Theory of Fields, Cambridge University Press.

Examples

1
2
H <- creation.matrix( 10 )
print( H )

Example output

      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
 [1,]    0    0    0    0    0    0    0    0    0     0
 [2,]    1    0    0    0    0    0    0    0    0     0
 [3,]    0    2    0    0    0    0    0    0    0     0
 [4,]    0    0    3    0    0    0    0    0    0     0
 [5,]    0    0    0    4    0    0    0    0    0     0
 [6,]    0    0    0    0    5    0    0    0    0     0
 [7,]    0    0    0    0    0    6    0    0    0     0
 [8,]    0    0    0    0    0    0    7    0    0     0
 [9,]    0    0    0    0    0    0    0    8    0     0
[10,]    0    0    0    0    0    0    0    0    9     0

matrixcalc documentation built on May 2, 2019, 1:45 p.m.